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