aboutsummaryrefslogtreecommitdiff
path: root/.eslintrc.json
diff options
context:
space:
mode:
Diffstat (limited to '.eslintrc.json')
-rw-r--r--.eslintrc.json107
1 files changed, 105 insertions, 2 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index 32bbdaec..30d495d2 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -32,7 +32,10 @@
"jsonc",
"unused-imports",
"@typescript-eslint",
- "@stylistic"
+ "@stylistic",
+ "unicorn",
+ "sonarjs",
+ "import"
],
"ignorePatterns": [
"/ext/lib/",
@@ -247,7 +250,107 @@
"eslint-comments/no-unused-disable": "error",
- "unused-imports/no-unused-imports": "error"
+ "unused-imports/no-unused-imports": "error",
+
+ "import/extensions": ["error", "ignorePackages"],
+
+ "unicorn/catch-error-name": ["error", {"ignore": ["^(e|error2?)$"]}],
+ "unicorn/custom-error-definition": "error",
+ "unicorn/empty-brace-spaces": "error",
+ "unicorn/error-message": "error",
+ "unicorn/expiring-todo-comments": "error",
+ "unicorn/explicit-length-check": "error",
+ "unicorn/new-for-builtins": "error",
+ "unicorn/no-abusive-eslint-disable": "error",
+ "unicorn/no-array-for-each": "error",
+ "unicorn/no-array-method-this-argument": "error",
+ "unicorn/no-array-push-push": "error",
+ "unicorn/no-array-reduce": "error",
+ "unicorn/no-console-spaces": "error",
+ "unicorn/no-document-cookie": "error",
+ "unicorn/no-empty-file": "error",
+ "unicorn/no-hex-escape": "error",
+ "unicorn/no-instanceof-array": "error",
+ "unicorn/no-invalid-remove-event-listener": "error",
+ "unicorn/no-lonely-if": "error",
+ "unicorn/no-nested-ternary": "error",
+ "unicorn/no-new-buffer": "error",
+ "unicorn/no-object-as-default-parameter": "error",
+ "unicorn/no-static-only-class": "error",
+ "unicorn/no-thenable": "error",
+ "unicorn/no-unnecessary-await": "error",
+ "unicorn/no-unnecessary-polyfills": "error",
+ "unicorn/no-unreadable-array-destructuring": "error",
+ "unicorn/no-unreadable-iife": "error",
+ "unicorn/no-useless-fallback-in-spread": "error",
+ "unicorn/no-useless-length-check": "error",
+ "unicorn/no-useless-promise-resolve-reject": "error",
+ "unicorn/no-useless-spread": "error",
+ "unicorn/no-useless-switch-case": "error",
+ "unicorn/no-useless-undefined": "error",
+ "unicorn/no-zero-fractions": "error",
+ "unicorn/prefer-array-find": "error",
+ "unicorn/prefer-array-flat": "error",
+ "unicorn/prefer-array-flat-map": "error",
+ "unicorn/prefer-array-index-of": "error",
+ "unicorn/prefer-array-some": "error",
+ "unicorn/prefer-date-now": "error",
+ "unicorn/prefer-default-parameters": "error",
+ "unicorn/prefer-dom-node-dataset": "error",
+ "unicorn/prefer-dom-node-text-content": "error",
+ "unicorn/prefer-event-target": "error",
+ "unicorn/prefer-export-from": "error",
+ "unicorn/prefer-includes": "error",
+ "unicorn/prefer-keyboard-event-key": "error",
+ "unicorn/prefer-logical-operator-over-ternary": "error",
+ "unicorn/prefer-modern-math-apis": "error",
+ "unicorn/prefer-module": "error",
+ "unicorn/prefer-native-coercion-functions": "error",
+ "unicorn/prefer-negative-index": "error",
+ "unicorn/prefer-number-properties": "error",
+ "unicorn/prefer-object-from-entries": "error",
+ "unicorn/prefer-prototype-methods": "error",
+ "unicorn/prefer-reflect-apply": "error",
+ "unicorn/prefer-regexp-test": "error",
+ "unicorn/prefer-set-has": "error",
+ "unicorn/prefer-set-size": "error",
+ "unicorn/prefer-spread": "error",
+ "unicorn/prefer-string-starts-ends-with": "error",
+ "unicorn/prefer-string-trim-start-end": "error",
+ "unicorn/prefer-switch": "error",
+ "unicorn/prefer-ternary": "error",
+ "unicorn/relative-url-style": "error",
+ "unicorn/require-array-join-separator": "error",
+ "unicorn/require-number-to-fixed-digits-argument": "error",
+ "unicorn/template-indent": "error",
+ "unicorn/throw-new-error": "error",
+
+ "sonarjs/max-switch-cases": "error",
+ "sonarjs/no-all-duplicated-branches": "error",
+ "sonarjs/no-collapsible-if": "error",
+ "sonarjs/no-collection-size-mischeck": "error",
+ "sonarjs/no-duplicated-branches": "error",
+ "sonarjs/no-element-overwrite": "error",
+ "sonarjs/no-empty-collection": "error",
+ "sonarjs/no-extra-arguments": "error",
+ "sonarjs/no-gratuitous-expressions": "error",
+ "sonarjs/no-identical-conditions": "error",
+ "sonarjs/no-identical-expressions": "error",
+ "sonarjs/no-identical-functions": "error",
+ "sonarjs/no-ignored-return": "error",
+ "sonarjs/no-inverted-boolean-check": "error",
+ "sonarjs/no-one-iteration-loop": "error",
+ "sonarjs/no-redundant-boolean": "error",
+ "sonarjs/no-redundant-jump": "error",
+ "sonarjs/no-same-line-conditional": "error",
+ "sonarjs/no-unused-collection": "error",
+ "sonarjs/no-use-of-empty-return-value": "error",
+ "sonarjs/no-useless-catch": "error",
+ "sonarjs/non-existent-operator": "error",
+ "sonarjs/prefer-immediate-return": "error",
+ "sonarjs/prefer-object-literal": "error",
+ "sonarjs/prefer-single-boolean-return": "error",
+ "sonarjs/prefer-while": "error"
},
"overrides": [
{