summaryrefslogtreecommitdiffstats
path: root/.eslintrc.yaml
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-05-09 04:35:49 +0200
committerGitHub <noreply@github.com>2023-05-09 02:35:49 +0000
commitd5b2bf9044caad9fb473312c4816f6c6caad4698 (patch)
treef6f9d829e86a122bd49ae7268204e680d9088c7e /.eslintrc.yaml
parent1dd83dbb917d55bd253001646d6743f247a4d98b (diff)
downloadgitea-d5b2bf9044caad9fb473312c4816f6c6caad4698.tar.gz
gitea-d5b2bf9044caad9fb473312c4816f6c6caad4698.zip
Update JS dependencies, add new eslint rules (#24597)
- Update all JS dependencies - Enable new eslint rules, fix issue (some via autofix) - Fix some missed eslint rule renames from [unicorn v25](https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v25.0.0) - Tested Monaco, Katex, Swagger UI --------- Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to '.eslintrc.yaml')
-rw-r--r--.eslintrc.yaml28
1 files changed, 15 insertions, 13 deletions
diff --git a/.eslintrc.yaml b/.eslintrc.yaml
index 878b74cba4..c4e0b9de8c 100644
--- a/.eslintrc.yaml
+++ b/.eslintrc.yaml
@@ -113,9 +113,9 @@ rules:
import/namespace: [0]
import/newline-after-import: [0]
import/no-absolute-path: [0]
- import/no-amd: [0]
+ import/no-amd: [2]
import/no-anonymous-default-export: [0]
- import/no-commonjs: [0]
+ import/no-commonjs: [2]
import/no-cycle: [2, {ignoreExternal: true, maxDepth: 1}]
import/no-default-export: [0]
import/no-deprecated: [0]
@@ -576,7 +576,7 @@ rules:
sonarjs/no-nested-template-literals: [0]
sonarjs/no-one-iteration-loop: [2]
sonarjs/no-redundant-boolean: [2]
- sonarjs/no-redundant-jump: [0]
+ sonarjs/no-redundant-jump: [2]
sonarjs/no-same-line-conditional: [2]
sonarjs/no-small-switch: [0]
sonarjs/no-unused-collection: [2]
@@ -616,17 +616,18 @@ rules:
unicorn/import-style: [0]
unicorn/new-for-builtins: [2]
unicorn/no-abusive-eslint-disable: [0]
+ unicorn/no-array-callback-reference: [0]
unicorn/no-array-for-each: [2]
- unicorn/no-array-instanceof: [0]
unicorn/no-array-method-this-argument: [2]
unicorn/no-array-push-push: [2]
+ unicorn/no-array-reduce: [2]
unicorn/no-await-expression-member: [0]
unicorn/no-console-spaces: [0]
unicorn/no-document-cookie: [2]
unicorn/no-empty-file: [2]
- unicorn/no-fn-reference-in-iterator: [0]
unicorn/no-for-loop: [0]
unicorn/no-hex-escape: [0]
+ unicorn/no-instanceof-array: [0]
unicorn/no-invalid-remove-event-listener: [2]
unicorn/no-keyword-prefix: [0]
unicorn/no-lonely-if: [2]
@@ -637,7 +638,6 @@ rules:
unicorn/no-null: [0]
unicorn/no-object-as-default-parameter: [0]
unicorn/no-process-exit: [0]
- unicorn/no-reduce: [2]
unicorn/no-static-only-class: [2]
unicorn/no-thenable: [2]
unicorn/no-this-assignment: [2]
@@ -663,15 +663,19 @@ rules:
unicorn/prefer-array-index-of: [2]
unicorn/prefer-array-some: [2]
unicorn/prefer-at: [0]
+ unicorn/prefer-blob-reading-methods: [2]
unicorn/prefer-code-point: [0]
- unicorn/prefer-dataset: [2]
unicorn/prefer-date-now: [2]
unicorn/prefer-default-parameters: [0]
- unicorn/prefer-event-key: [2]
+ unicorn/prefer-dom-node-append: [2]
+ unicorn/prefer-dom-node-dataset: [0]
+ unicorn/prefer-dom-node-remove: [2]
+ unicorn/prefer-dom-node-text-content: [2]
unicorn/prefer-event-target: [2]
unicorn/prefer-export-from: [2, {ignoreUsedVariables: true}]
unicorn/prefer-includes: [2]
unicorn/prefer-json-parse-buffer: [0]
+ unicorn/prefer-keyboard-event-key: [2]
unicorn/prefer-logical-operator-over-ternary: [2]
unicorn/prefer-math-trunc: [2]
unicorn/prefer-modern-dom-apis: [0]
@@ -679,9 +683,7 @@ rules:
unicorn/prefer-module: [2]
unicorn/prefer-native-coercion-functions: [2]
unicorn/prefer-negative-index: [2]
- unicorn/prefer-node-append: [0]
unicorn/prefer-node-protocol: [2]
- unicorn/prefer-node-remove: [0]
unicorn/prefer-number-properties: [0]
unicorn/prefer-object-from-entries: [2]
unicorn/prefer-object-has-own: [0]
@@ -690,17 +692,17 @@ rules:
unicorn/prefer-query-selector: [0]
unicorn/prefer-reflect-apply: [0]
unicorn/prefer-regexp-test: [2]
- unicorn/prefer-replace-all: [0]
unicorn/prefer-set-has: [0]
unicorn/prefer-set-size: [2]
unicorn/prefer-spread: [0]
- unicorn/prefer-starts-ends-with: [2]
+ unicorn/prefer-string-replace-all: [0]
unicorn/prefer-string-slice: [0]
+ unicorn/prefer-string-starts-ends-with: [2]
+ unicorn/prefer-string-trim-start-end: [2]
unicorn/prefer-switch: [0]
unicorn/prefer-ternary: [0]
unicorn/prefer-text-content: [2]
unicorn/prefer-top-level-await: [0]
- unicorn/prefer-trim-start-end: [2]
unicorn/prefer-type-error: [0]
unicorn/prevent-abbreviations: [0]
unicorn/relative-url-style: [2]