Update '.ts-eslintrc.json'

This commit is contained in:
Erik 2023-06-13 14:51:33 +02:00
parent 7ee489e2fd
commit 8c0448f908

View File

@ -1,7 +1,9 @@
{ {
"plugins": ["jest", "@typescript-eslint"],
"env": { "env": {
"es6": true, "es6": true,
"node": true "node": true,
"jest/globals": true
}, },
"extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended" ], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended" ],
"globals": { "globals": {
@ -9,23 +11,24 @@
"SharedArrayBuffer": "readonly" "SharedArrayBuffer": "readonly"
}, },
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"plugins": [ "@typescript-eslint" ],
"parserOptions": { "parserOptions": {
"ecmaVersion": 2022, "ecmaVersion": 2022,
"sourceType": "module" "sourceType": "module"
}, },
"rules": { "rules": {
"@typescript-eslint/no-unused-vars": "off",
"accessor-pairs": "warn", "accessor-pairs": "warn",
"array-callback-return": "warn", "array-callback-return": "warn",
"array-bracket-newline": [ "warn", "consistent" ], "array-bracket-newline": ["warn", "consistent"],
"array-bracket-spacing": [ "warn", "always", { "objectsInArrays": false, "arraysInArrays": false }], "array-bracket-spacing": ["warn", "always", { "objectsInArrays": false, "arraysInArrays": false }],
// "arrow-parens": "warn",
"arrow-spacing": "warn", "arrow-spacing": "warn",
"block-scoped-var": "warn", "block-scoped-var": "warn",
"block-spacing": [ "warn", "always" ], "block-spacing": ["warn", "always"],
"brace-style": [ "warn", "1tbs" ], "brace-style": ["warn", "1tbs"],
"callback-return": "warn", "callback-return": "warn",
"camelcase": "warn", "camelcase": "warn",
"comma-dangle": [ "warn", "only-multiline" ], "comma-dangle": ["warn", "only-multiline"],
"comma-spacing": [ "comma-spacing": [
"warn", "warn",
{ {
@ -68,9 +71,9 @@
"implicit-arrow-linebreak": "warn", "implicit-arrow-linebreak": "warn",
"indent": "warn", "indent": "warn",
"init-declarations": "warn", "init-declarations": "warn",
"jsx-quotes": [ "warn", "prefer-single" ], "jsx-quotes": ["warn", "prefer-single"],
"key-spacing": [ "warn", { "beforeColon": false, "afterColon": true }], "key-spacing": ["warn", { "beforeColon": false, "afterColon": true }],
"keyword-spacing": [ "warn", { "after": true, "before": true }], "keyword-spacing": ["warn", { "after": true, "before": true }],
"linebreak-style": [ "linebreak-style": [
"error", "error",
"unix" "unix"
@ -79,6 +82,16 @@
"lines-around-directive": "warn", "lines-around-directive": "warn",
"max-classes-per-file": "warn", "max-classes-per-file": "warn",
"max-nested-callbacks": "warn", "max-nested-callbacks": "warn",
"max-len": ["warn", {
"code": 140,
"ignoreComments": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}],
"max-lines-per-function": ["warn", 100],
"max-depth": ["warn", 3],
"new-parens": "warn", "new-parens": "warn",
"no-alert": "warn", "no-alert": "warn",
"no-array-constructor": "warn", "no-array-constructor": "warn",
@ -96,7 +109,6 @@
"no-extend-native": "warn", "no-extend-native": "warn",
"no-extra-bind": "warn", "no-extra-bind": "warn",
"no-extra-label": "warn", "no-extra-label": "warn",
"no-extra-parens": "warn",
"no-floating-decimal": "warn", "no-floating-decimal": "warn",
"no-implicit-coercion": "warn", "no-implicit-coercion": "warn",
"no-implicit-globals": "warn", "no-implicit-globals": "warn",
@ -138,7 +150,7 @@
"no-sequences": "warn", "no-sequences": "warn",
"no-setter-return": "warn", "no-setter-return": "warn",
"no-spaced-func": "warn", "no-spaced-func": "warn",
"@typescript-eslint/no-shadow": "error", "no-shadow": "error",
"no-tabs": "warn", "no-tabs": "warn",
"no-template-curly-in-string": "error", "no-template-curly-in-string": "error",
"no-throw-literal": "warn", "no-throw-literal": "warn",
@ -157,18 +169,18 @@
"no-var": "warn", "no-var": "warn",
"no-void": "warn", "no-void": "warn",
"no-whitespace-before-property": "error", "no-whitespace-before-property": "error",
"nonblock-statement-body-position": [ "warn", "below" ], "nonblock-statement-body-position": ["warn", "below"],
"object-curly-spacing": [ "object-curly-spacing": [
"warn", "warn",
"always" "always"
], ],
"object-property-newline": [ "warn", { "allowAllPropertiesOnSameLine": true }], "object-property-newline": ["warn", { "allowAllPropertiesOnSameLine": true }],
"object-shorthand": "warn", "object-shorthand": "warn",
"one-var-declaration-per-line": "warn", "one-var-declaration-per-line": "warn",
"operator-assignment": "warn", "operator-assignment": "warn",
"operator-linebreak": [ "warn", "before" ], "operator-linebreak": ["warn", "before"],
"padding-line-between-statements": "warn", "padding-line-between-statements": "warn",
"padded-blocks": [ "warn", { "switches": "never" }, { "allowSingleLineBlocks": true }], "padded-blocks": ["warn", { "switches": "never" }, { "allowSingleLineBlocks": true }],
"prefer-arrow-callback": "warn", "prefer-arrow-callback": "warn",
"prefer-const": "warn", "prefer-const": "warn",
"prefer-destructuring": "warn", "prefer-destructuring": "warn",
@ -189,12 +201,12 @@
"last" "last"
], ],
"space-before-blocks": "warn", "space-before-blocks": "warn",
"space-before-function-paren": [ "error", "always" ], "space-before-function-paren":["error", "always"],
"space-in-parens": [ "space-in-parens": [
"warn", "warn",
"never" "never"
], ],
"spaced-comment": [ "warn", "always" ], "spaced-comment": ["warn", "always"],
"strict": "warn", "strict": "warn",
"switch-colon-spacing": "warn", "switch-colon-spacing": "warn",
"symbol-description": "warn", "symbol-description": "warn",