mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 06:25:31 +00:00
[PORT] Unicorn eslint plugins configs
Ported from https://github.com/go-gitea/gitea/pull/31766 & https://github.com/go-gitea/gitea/pull/31402 & https://github.com/go-gitea/gitea/pull/30840
This commit is contained in:
parent
9272425bab
commit
b061a14e15
|
@ -705,6 +705,7 @@ rules:
|
||||||
unicorn/better-regex: [0]
|
unicorn/better-regex: [0]
|
||||||
unicorn/catch-error-name: [0]
|
unicorn/catch-error-name: [0]
|
||||||
unicorn/consistent-destructuring: [2]
|
unicorn/consistent-destructuring: [2]
|
||||||
|
unicorn/consistent-empty-array-spread: [2]
|
||||||
unicorn/consistent-function-scoping: [2]
|
unicorn/consistent-function-scoping: [2]
|
||||||
unicorn/custom-error-definition: [0]
|
unicorn/custom-error-definition: [0]
|
||||||
unicorn/empty-brace-spaces: [2]
|
unicorn/empty-brace-spaces: [2]
|
||||||
|
@ -731,10 +732,14 @@ rules:
|
||||||
unicorn/no-for-loop: [0]
|
unicorn/no-for-loop: [0]
|
||||||
unicorn/no-hex-escape: [0]
|
unicorn/no-hex-escape: [0]
|
||||||
unicorn/no-instanceof-array: [0]
|
unicorn/no-instanceof-array: [0]
|
||||||
|
unicorn/no-invalid-fetch-options: [2]
|
||||||
unicorn/no-invalid-remove-event-listener: [2]
|
unicorn/no-invalid-remove-event-listener: [2]
|
||||||
unicorn/no-keyword-prefix: [0]
|
unicorn/no-keyword-prefix: [0]
|
||||||
|
unicorn/no-length-as-slice-end: [2]
|
||||||
unicorn/no-lonely-if: [2]
|
unicorn/no-lonely-if: [2]
|
||||||
|
unicorn/no-magic-array-flat-depth: [0]
|
||||||
unicorn/no-negated-condition: [0]
|
unicorn/no-negated-condition: [0]
|
||||||
|
unicorn/no-negation-in-equality-check: [2]
|
||||||
unicorn/no-nested-ternary: [0]
|
unicorn/no-nested-ternary: [0]
|
||||||
unicorn/no-new-array: [0]
|
unicorn/no-new-array: [0]
|
||||||
unicorn/no-new-buffer: [0]
|
unicorn/no-new-buffer: [0]
|
||||||
|
@ -799,10 +804,12 @@ rules:
|
||||||
unicorn/prefer-set-has: [0]
|
unicorn/prefer-set-has: [0]
|
||||||
unicorn/prefer-set-size: [2]
|
unicorn/prefer-set-size: [2]
|
||||||
unicorn/prefer-spread: [0]
|
unicorn/prefer-spread: [0]
|
||||||
|
unicorn/prefer-string-raw: [0]
|
||||||
unicorn/prefer-string-replace-all: [0]
|
unicorn/prefer-string-replace-all: [0]
|
||||||
unicorn/prefer-string-slice: [0]
|
unicorn/prefer-string-slice: [0]
|
||||||
unicorn/prefer-string-starts-ends-with: [2]
|
unicorn/prefer-string-starts-ends-with: [2]
|
||||||
unicorn/prefer-string-trim-start-end: [2]
|
unicorn/prefer-string-trim-start-end: [2]
|
||||||
|
unicorn/prefer-structured-clone: [2]
|
||||||
unicorn/prefer-switch: [0]
|
unicorn/prefer-switch: [0]
|
||||||
unicorn/prefer-ternary: [0]
|
unicorn/prefer-ternary: [0]
|
||||||
unicorn/prefer-text-content: [2]
|
unicorn/prefer-text-content: [2]
|
||||||
|
|
|
@ -132,7 +132,7 @@ export default {
|
||||||
}));
|
}));
|
||||||
this.commits.reverse();
|
this.commits.reverse();
|
||||||
this.lastReviewCommitSha = results.last_review_commit_sha || null;
|
this.lastReviewCommitSha = results.last_review_commit_sha || null;
|
||||||
if (this.lastReviewCommitSha && this.commits.findIndex((x) => x.id === this.lastReviewCommitSha) === -1) {
|
if (this.lastReviewCommitSha && !this.commits.some((x) => x.id === this.lastReviewCommitSha)) {
|
||||||
// the lastReviewCommit is not available (probably due to a force push)
|
// the lastReviewCommit is not available (probably due to a force push)
|
||||||
// reset the last review commit sha
|
// reset the last review commit sha
|
||||||
this.lastReviewCommitSha = null;
|
this.lastReviewCommitSha = null;
|
||||||
|
|
Loading…
Reference in a new issue