1
1
mirror of https://github.com/theoludwig/eslint-config-conventions.git synced 2024-12-18 21:45:04 +01:00

fix: remove deprecated TypeScript ESLint rules

`@typescript-eslint/no-loss-of-precision`
`@typescript-eslint/no-var-requires`
`@typescript-eslint/prefer-ts-expect-error`
`@typescript-eslint/no-throw-literal`
`@typescript-eslint/no-useless-template-literals`
`@typescript-eslint/ban-types`
`@typescript-eslint/type-annotation-spacing`

Fixes #4
This commit is contained in:
Théo LUDWIG 2024-09-17 23:43:56 +02:00
parent c2147dbc7a
commit bcd9fe10d3
Signed by: theoludwig
GPG Key ID: ADFE5A563D718F3B

View File

@ -129,6 +129,7 @@
"no-var": "error", "no-var": "error",
"no-void": ["error", { "allowAsStatement": true }], "no-void": ["error", { "allowAsStatement": true }],
"no-with": "error", "no-with": "error",
"no-return-await": "error",
"object-shorthand": ["error", "properties"], "object-shorthand": ["error", "properties"],
"one-var": ["error", { "initialized": "never" }], "one-var": ["error", { "initialized": "never" }],
"prefer-const": ["error", { "destructuring": "all" }], "prefer-const": ["error", { "destructuring": "all" }],
@ -184,8 +185,6 @@
"no-undef": "off", "no-undef": "off",
"no-dupe-class-members": "off", "no-dupe-class-members": "off",
"@typescript-eslint/no-dupe-class-members": "error", "@typescript-eslint/no-dupe-class-members": "error",
"no-loss-of-precision": "off",
"@typescript-eslint/no-loss-of-precision": "error",
"no-unused-vars": "off", "no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [ "@typescript-eslint/no-unused-vars": [
"error", "error",
@ -216,7 +215,7 @@
{ "builtinGlobals": false } { "builtinGlobals": false }
], ],
"no-throw-literal": "off", "no-throw-literal": "off",
"@typescript-eslint/no-throw-literal": "error", "@typescript-eslint/only-throw-error": "error",
"no-unused-expressions": "off", "no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": [ "@typescript-eslint/no-unused-expressions": [
"error", "error",
@ -228,14 +227,15 @@
], ],
"no-useless-constructor": "off", "no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "error", "@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-useless-template-literals": "error", "@typescript-eslint/no-unnecessary-template-expression": "error",
"@typescript-eslint/adjacent-overload-signatures": "error", "@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": [ "@typescript-eslint/array-type": [
"error", "error",
{ "default": "array-simple" } { "default": "array-simple" }
], ],
"@typescript-eslint/ban-types": "error", "@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/consistent-type-definitions": [ "@typescript-eslint/consistent-type-definitions": [
"error", "error",
"interface" "interface"
@ -280,7 +280,6 @@
], ],
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error", "@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-require-imports": "error", "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unsafe-unary-minus": "error", "@typescript-eslint/no-unsafe-unary-minus": "error",
"@typescript-eslint/no-array-delete": "error", "@typescript-eslint/no-array-delete": "error",
@ -299,7 +298,6 @@
"@typescript-eslint/prefer-readonly": "error", "@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error", "@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-return-this-type": "error", "@typescript-eslint/prefer-return-this-type": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/promise-function-async": "error", "@typescript-eslint/promise-function-async": "error",
"prefer-promise-reject-errors": "off", "prefer-promise-reject-errors": "off",
"@typescript-eslint/prefer-promise-reject-errors": "error", "@typescript-eslint/prefer-promise-reject-errors": "error",
@ -315,7 +313,8 @@
"error", "error",
{ "allowNumber": true } { "allowNumber": true }
], ],
"@typescript-eslint/return-await": ["error", "always"], "no-return-await": "off",
"@typescript-eslint/return-await": "error",
"@typescript-eslint/strict-boolean-expressions": [ "@typescript-eslint/strict-boolean-expressions": [
"error", "error",
{ {
@ -327,8 +326,7 @@
"allowNullableNumber": false, "allowNullableNumber": false,
"allowAny": false "allowAny": false
} }
], ]
"@typescript-eslint/type-annotation-spacing": "error"
} }
} }
] ]