Files
anthill-pot/.eslintrc.json

179 lines
5.8 KiB
JSON

{
"env": {
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:promise/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "unused-imports", "promise"],
"rules": {
"no-console": ["error"],
"semi": "off",
"@typescript-eslint/semi": ["error", "always"],
"quotes": ["error", "double"],
"no-multiple-empty-lines": [
"error",
{
"max": 1,
"maxEOF": 1
}
],
"spaced-comment": ["error", "always"],
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "import",
"next": "*"
},
{
"blankLine": "never",
"prev": "import",
"next": "import"
},
{
"blankLine": "always",
"prev": "class",
"next": "*"
}
],
"lines-between-class-members": "off",
"@typescript-eslint/lines-between-class-members": [
"error",
"always",
{
"exceptAfterSingleLine": true
}
],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/explicit-member-accessibility": "error",
"require-await": "off",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/unbound-method": "error",
"no-var": "error",
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error",
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-parameter-properties": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "error",
"no-extra-semi": "off",
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-implied-eval": "error",
"comma-spacing": "off",
"@typescript-eslint/comma-spacing": "error",
"func-call-spacing": "off",
"@typescript-eslint/func-call-spacing": "error",
"space-before-function-paren": "off",
"@typescript-eslint/space-before-function-paren": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"no-magic-numbers": "off",
"@typescript-eslint/no-magic-numbers": [
"error",
{
"ignoreArrayIndexes": true,
"ignore": [-1, 1, 0, 2, 3]
}
],
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "warn",
"@typescript-eslint/no-unnecessary-type-arguments": "warn",
"@typescript-eslint/member-ordering": [
"error",
{
"default": {
"memberTypes": [
"public-static-field",
"public-field",
"protected-static-field",
"protected-field",
"private-static-field",
"private-field",
"public-constructor",
"protected-constructor",
"private-constructor",
["public-get", "public-set"],
["protected-get", "protected-set"],
["private-get", "private-set"],
"signature",
"public-static-method",
"public-method",
"protected-static-method",
"protected-method",
"private-static-method",
"private-method"
],
"order": "as-written"
}
}
],
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/prefer-as-const": "warn",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-namespace-keyword": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-readonly": "warn",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-inferrable-types": [
"warn",
{
"ignoreParameters": true
}
],
"no-unused-vars": "off",
"unused-imports/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"indent": "off",
"@typescript-eslint/indent": ["error", 2],
"import/no-unresolved": [2, { "ignore": ["^#.+$"] }]
}
}