summaryrefslogtreecommitdiffstats
path: root/.eslintrc
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-07-27 23:01:25 +0200
committerGitHub <noreply@github.com>2020-07-27 17:01:25 -0400
commit78cbd0ca72619a25849edc3460ec0c492b838a59 (patch)
treeed76273e7e19c947ae26e226dc740f5a97131e3c /.eslintrc
parent8d6fa00da06e52cba1aaed5ba2a187fed8cd63de (diff)
downloadgitea-78cbd0ca72619a25849edc3460ec0c492b838a59.tar.gz
gitea-78cbd0ca72619a25849edc3460ec0c492b838a59.zip
Update JS deps and linting config (#12295)
- update js deps to latest versions - remove eslint-plugin-sonarjs to prevent a warning on install. can be added again once it's updated to support eslint 7.x - enable new linting rules from eslint-plugin-unicorn Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to '.eslintrc')
-rw-r--r--.eslintrc28
1 files changed, 2 insertions, 26 deletions
diff --git a/.eslintrc b/.eslintrc
index 7c6e734d9a..0adfb7e048 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -11,7 +11,6 @@ parserOptions:
plugins:
- eslint-plugin-unicorn
- eslint-plugin-import
- - eslint-plugin-sonarjs
env:
browser: true
@@ -311,31 +310,6 @@ rules:
semi-spacing: [2, {before: false, after: true}]
semi-style: [2, last]
semi: [2, always, {omitLastInOneLineBlock: true}]
- sonarjs/cognitive-complexity: [0]
- sonarjs/max-switch-cases: [0]
- sonarjs/no-all-duplicated-branches: [2]
- sonarjs/no-collapsible-if: [0]
- sonarjs/no-collection-size-mischeck: [2]
- sonarjs/no-duplicate-string: [0]
- sonarjs/no-duplicated-branches: [0]
- sonarjs/no-element-overwrite: [2]
- sonarjs/no-extra-arguments: [0]
- sonarjs/no-identical-conditions: [2]
- sonarjs/no-identical-expressions: [0]
- sonarjs/no-identical-functions: [0]
- sonarjs/no-inverted-boolean-check: [2]
- sonarjs/no-one-iteration-loop: [2]
- sonarjs/no-redundant-boolean: [2]
- sonarjs/no-redundant-jump: [0]
- sonarjs/no-same-line-conditional: [2]
- sonarjs/no-small-switch: [0]
- sonarjs/no-unused-collection: [2]
- sonarjs/no-use-of-empty-return-value: [2]
- sonarjs/no-useless-catch: [0]
- sonarjs/prefer-immediate-return: [0]
- sonarjs/prefer-object-literal: [2]
- sonarjs/prefer-single-boolean-return: [0]
- sonarjs/prefer-while: [2]
sort-imports: [0]
sort-keys: [0]
sort-vars: [0]
@@ -371,6 +345,7 @@ rules:
unicorn/no-nested-ternary: [0]
unicorn/no-new-buffer: [0]
unicorn/no-null: [0]
+ unicorn/no-object-as-default-parameter: [2]
unicorn/no-process-exit: [0]
unicorn/no-reduce: [2]
unicorn/no-unreadable-array-destructuring: [0]
@@ -380,6 +355,7 @@ rules:
unicorn/no-zero-fractions: [2]
unicorn/number-literal-case: [0]
unicorn/prefer-add-event-listener: [2]
+ unicorn/prefer-array-find: [2]
unicorn/prefer-dataset: [2]
unicorn/prefer-event-key: [2]
unicorn/prefer-includes: [2]