Browse Source

feat: set up stylisticTypeChecked rule in eslint configuration

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
pull/3878/head
dw-0 11 months ago
parent
commit
210c09a754
  1. 21
      .eslintrc.json

21
.eslintrc.json

@ -34,9 +34,11 @@
{ {
"files": ["*.ts"], "files": ["*.ts"],
"plugins": ["eslint-plugin-import", "@typescript-eslint"], "plugins": ["eslint-plugin-import", "@typescript-eslint"],
"extends": ["plugin:@typescript-eslint/recommended-type-checked"], "extends": [
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked"
],
"rules": { "rules": {
"@typescript-eslint/consistent-type-definitions": "warn",
"@typescript-eslint/dot-notation": "off", "@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [ "@typescript-eslint/explicit-member-accessibility": [
"off", "off",
@ -46,7 +48,6 @@
], ],
"@typescript-eslint/member-ordering": "warn", "@typescript-eslint/member-ordering": "warn",
"@typescript-eslint/naming-convention": "off", "@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "warn", "@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/no-inferrable-types": [ "@typescript-eslint/no-inferrable-types": [
"warn", "warn",
@ -61,7 +62,6 @@
"hoist": "all" "hoist": "all"
} }
], ],
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/unified-signatures": "error", "@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/no-loss-of-precision": "warn", "@typescript-eslint/no-loss-of-precision": "warn",
"@typescript-eslint/no-var-requires": "warn", "@typescript-eslint/no-var-requires": "warn",
@ -114,7 +114,18 @@
"@typescript-eslint/require-await": "warn", "@typescript-eslint/require-await": "warn",
"@typescript-eslint/restrict-template-expressions": "warn", "@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/unbound-method": "warn", "@typescript-eslint/unbound-method": "warn",
"prefer-const": "warn" "prefer-const": "warn",
// The following rules are part of @typescript-eslint/stylistic-type-checked
// and can be remove once solved
"@typescript-eslint/consistent-type-definitions": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "warn", // requires strictNullChecks: true
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/consistent-indexed-object-style": "warn",
"@typescript-eslint/consistent-generic-constructors": "warn"
} }
} }
], ],

Loading…
Cancel
Save