misc/.ts-eslintrc.json

231 lines
7.5 KiB
JSON
Raw Normal View History

2023-04-12 11:27:37 +02:00
{
2023-06-13 14:51:33 +02:00
"plugins": ["jest", "@typescript-eslint"],
2023-04-12 11:27:37 +02:00
"env": {
"es6": true,
2023-06-13 14:51:33 +02:00
"node": true,
"jest/globals": true
2023-04-12 11:27:37 +02:00
},
"extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended" ],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"rules": {
2023-06-13 14:51:33 +02:00
"@typescript-eslint/no-unused-vars": "off",
2023-04-12 11:27:37 +02:00
"accessor-pairs": "warn",
"array-callback-return": "warn",
2023-06-13 14:51:33 +02:00
"array-bracket-newline": ["warn", "consistent"],
"array-bracket-spacing": ["warn", "always", { "objectsInArrays": false, "arraysInArrays": false }],
// "arrow-parens": "warn",
2023-04-12 11:27:37 +02:00
"arrow-spacing": "warn",
"block-scoped-var": "warn",
2023-06-13 14:51:33 +02:00
"block-spacing": ["warn", "always"],
"brace-style": ["warn", "1tbs"],
2023-04-12 11:27:37 +02:00
"callback-return": "warn",
"camelcase": "warn",
2023-06-13 14:51:33 +02:00
"comma-dangle": ["warn", "only-multiline"],
2023-04-12 11:27:37 +02:00
"comma-spacing": [
"warn",
{
"after": true,
"before": false
}
],
"comma-style": "warn",
"computed-property-spacing": [
"warn",
"never"
],
"consistent-this": "warn",
"dot-notation": [
"warn",
{
"allowKeywords": true
}
],
"dot-location": [
"error",
"property"
],
"eol-last": [
"warn",
"never"
],
"eqeqeq": "warn",
"func-call-spacing": "warn",
"func-name-matching": "warn",
"func-names": "warn",
"func-style": "warn",
"function-paren-newline": "warn",
"generator-star-spacing": "warn",
"grouped-accessor-pairs": "warn",
"guard-for-in": "warn",
"handle-callback-err": "warn",
"id-blacklist": "warn",
"id-match": "warn",
"implicit-arrow-linebreak": "warn",
"indent": "warn",
"init-declarations": "warn",
2023-06-13 14:51:33 +02:00
"jsx-quotes": ["warn", "prefer-single"],
"key-spacing": ["warn", { "beforeColon": false, "afterColon": true }],
"keyword-spacing": ["warn", { "after": true, "before": true }],
2023-04-12 11:27:37 +02:00
"linebreak-style": [
"error",
"unix"
],
"lines-around-comment": "warn",
"lines-around-directive": "warn",
"max-classes-per-file": "warn",
"max-nested-callbacks": "warn",
2023-06-13 14:51:33 +02:00
"max-len": ["warn", {
"code": 140,
"ignoreComments": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}],
"max-lines-per-function": ["warn", 100],
"max-depth": ["warn", 3],
2023-04-12 11:27:37 +02:00
"new-parens": "warn",
"no-alert": "warn",
"no-array-constructor": "warn",
"no-bitwise": "warn",
"no-buffer-constructor": "warn",
"no-caller": "warn",
"no-console": "warn",
"no-div-regex": "warn",
"no-dupe-else-if": "warn",
"no-duplicate-imports": "warn",
"no-else-return": "warn",
"no-empty-function": "warn",
"no-eq-null": "warn",
"no-eval": "warn",
"no-extend-native": "warn",
"no-extra-bind": "warn",
"no-extra-label": "warn",
"no-floating-decimal": "warn",
"no-implicit-coercion": "warn",
"no-implicit-globals": "warn",
"no-implied-eval": "error",
"no-import-assign": "warn",
"no-invalid-this": "warn",
"no-iterator": "warn",
"no-label-var": "warn",
"no-lone-blocks": "warn",
"no-lonely-if": "warn",
"no-loop-func": "warn",
"no-mixed-requires": "warn",
"no-multi-assign": "warn",
"no-multi-spaces": "warn",
"no-multi-str": "warn",
"no-multiple-empty-lines": "warn",
"no-native-reassign": "warn",
"no-negated-in-lhs": "warn",
"no-negated-condition": "error",
"no-nested-ternary": "warn",
"no-new": "warn",
"no-new-func": "warn",
"no-new-object": "warn",
"no-new-require": "warn",
"no-new-wrappers": "warn",
"no-octal-escape": "warn",
"no-path-concat": "warn",
"no-process-exit": "warn",
"no-proto": "warn",
"no-restricted-globals": "warn",
"no-restricted-imports": "warn",
"no-restricted-modules": "warn",
"no-restricted-properties": "warn",
"no-restricted-syntax": "warn",
"no-return-assign": "warn",
"no-return-await": "warn",
"no-script-url": "warn",
"no-self-compare": "warn",
"no-sequences": "warn",
"no-setter-return": "warn",
"no-spaced-func": "warn",
2023-06-14 16:34:48 +02:00
"@typescript-eslint/no-shadow": "error",
2023-04-12 11:27:37 +02:00
"no-tabs": "warn",
"no-template-curly-in-string": "error",
"no-throw-literal": "warn",
"no-undef-init": "error",
"no-undefined": "error",
"no-unmodified-loop-condition": "warn",
"no-unneeded-ternary": "error",
"no-unused-expressions": "warn",
2023-06-14 22:35:55 +02:00
"@typescript-eslint/no-use-before-define": "error",
2023-04-12 11:27:37 +02:00
"no-useless-call": "warn",
"no-useless-computed-key": "warn",
"no-useless-concat": "warn",
"no-useless-constructor": "warn",
"no-useless-rename": "warn",
"no-useless-return": "warn",
"no-var": "warn",
"no-void": "warn",
"no-whitespace-before-property": "error",
2023-06-13 14:51:33 +02:00
"nonblock-statement-body-position": ["warn", "below"],
2023-04-12 11:27:37 +02:00
"object-curly-spacing": [
"warn",
"always"
],
2023-06-13 14:51:33 +02:00
"object-property-newline": ["warn", { "allowAllPropertiesOnSameLine": true }],
2023-04-12 11:27:37 +02:00
"object-shorthand": "warn",
"one-var-declaration-per-line": "warn",
"operator-assignment": "warn",
2023-06-13 14:51:33 +02:00
"operator-linebreak": ["warn", "before"],
2023-04-12 11:27:37 +02:00
"padding-line-between-statements": "warn",
2023-06-13 14:51:33 +02:00
"padded-blocks": ["warn", { "switches": "never" }, { "allowSingleLineBlocks": true }],
2023-04-12 11:27:37 +02:00
"prefer-arrow-callback": "warn",
"prefer-const": "warn",
"prefer-destructuring": "warn",
"prefer-exponentiation-operator": "warn",
"prefer-numeric-literals": "warn",
"prefer-object-spread": "error",
"prefer-promise-reject-errors": "warn",
"prefer-regex-literals": "warn",
"prefer-rest-params": "warn",
"prefer-spread": "warn",
"require-jsdoc": "warn",
"require-unicode-regexp": "warn",
"rest-spread-spacing": "warn",
"semi": "error",
"semi-spacing": "warn",
"semi-style": [
"warn",
"last"
],
"space-before-blocks": "warn",
2023-06-13 14:51:33 +02:00
"space-before-function-paren":["error", "always"],
2023-04-12 11:27:37 +02:00
"space-in-parens": [
"warn",
"never"
],
2023-06-13 14:51:33 +02:00
"spaced-comment": ["warn", "always"],
2023-04-12 11:27:37 +02:00
"strict": "warn",
"switch-colon-spacing": "warn",
"symbol-description": "warn",
"template-curly-spacing": [
"warn",
"never"
],
"template-tag-spacing": "warn",
"unicode-bom": [
"warn",
"never"
],
"vars-on-top": "warn",
"wrap-iife": "warn",
"wrap-regex": "error",
"yield-star-spacing": "warn",
"yoda": [
"warn",
"never"
]
}
}