Skip to content

Commit bcd9fe1

Browse files
committed
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
1 parent c2147db commit bcd9fe1

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

.eslintrc.json

+8-10
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
"no-var": "error",
130130
"no-void": ["error", { "allowAsStatement": true }],
131131
"no-with": "error",
132+
"no-return-await": "error",
132133
"object-shorthand": ["error", "properties"],
133134
"one-var": ["error", { "initialized": "never" }],
134135
"prefer-const": ["error", { "destructuring": "all" }],
@@ -184,8 +185,6 @@
184185
"no-undef": "off",
185186
"no-dupe-class-members": "off",
186187
"@typescript-eslint/no-dupe-class-members": "error",
187-
"no-loss-of-precision": "off",
188-
"@typescript-eslint/no-loss-of-precision": "error",
189188
"no-unused-vars": "off",
190189
"@typescript-eslint/no-unused-vars": [
191190
"error",
@@ -216,7 +215,7 @@
216215
{ "builtinGlobals": false }
217216
],
218217
"no-throw-literal": "off",
219-
"@typescript-eslint/no-throw-literal": "error",
218+
"@typescript-eslint/only-throw-error": "error",
220219
"no-unused-expressions": "off",
221220
"@typescript-eslint/no-unused-expressions": [
222221
"error",
@@ -228,14 +227,15 @@
228227
],
229228
"no-useless-constructor": "off",
230229
"@typescript-eslint/no-useless-constructor": "error",
231-
"@typescript-eslint/no-useless-template-literals": "error",
230+
"@typescript-eslint/no-unnecessary-template-expression": "error",
232231

233232
"@typescript-eslint/adjacent-overload-signatures": "error",
234233
"@typescript-eslint/array-type": [
235234
"error",
236235
{ "default": "array-simple" }
237236
],
238-
"@typescript-eslint/ban-types": "error",
237+
"@typescript-eslint/no-unsafe-function-type": "error",
238+
"@typescript-eslint/no-wrapper-object-types": "error",
239239
"@typescript-eslint/consistent-type-definitions": [
240240
"error",
241241
"interface"
@@ -280,7 +280,6 @@
280280
],
281281
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
282282
"@typescript-eslint/no-unnecessary-type-assertion": "error",
283-
"@typescript-eslint/no-var-requires": "error",
284283
"@typescript-eslint/no-require-imports": "error",
285284
"@typescript-eslint/no-unsafe-unary-minus": "error",
286285
"@typescript-eslint/no-array-delete": "error",
@@ -299,7 +298,6 @@
299298
"@typescript-eslint/prefer-readonly": "error",
300299
"@typescript-eslint/prefer-reduce-type-parameter": "error",
301300
"@typescript-eslint/prefer-return-this-type": "error",
302-
"@typescript-eslint/prefer-ts-expect-error": "error",
303301
"@typescript-eslint/promise-function-async": "error",
304302
"prefer-promise-reject-errors": "off",
305303
"@typescript-eslint/prefer-promise-reject-errors": "error",
@@ -315,7 +313,8 @@
315313
"error",
316314
{ "allowNumber": true }
317315
],
318-
"@typescript-eslint/return-await": ["error", "always"],
316+
"no-return-await": "off",
317+
"@typescript-eslint/return-await": "error",
319318
"@typescript-eslint/strict-boolean-expressions": [
320319
"error",
321320
{
@@ -327,8 +326,7 @@
327326
"allowNullableNumber": false,
328327
"allowAny": false
329328
}
330-
],
331-
"@typescript-eslint/type-annotation-spacing": "error"
329+
]
332330
}
333331
}
334332
]

0 commit comments

Comments
 (0)