From bcd9fe10d399ce41f527a92fe3ea5d2cbfb7b936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Tue, 17 Sep 2024 23:43:56 +0200 Subject: [PATCH] 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 --- .eslintrc.json | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index bc0d788..df54184 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -129,6 +129,7 @@ "no-var": "error", "no-void": ["error", { "allowAsStatement": true }], "no-with": "error", + "no-return-await": "error", "object-shorthand": ["error", "properties"], "one-var": ["error", { "initialized": "never" }], "prefer-const": ["error", { "destructuring": "all" }], @@ -184,8 +185,6 @@ "no-undef": "off", "no-dupe-class-members": "off", "@typescript-eslint/no-dupe-class-members": "error", - "no-loss-of-precision": "off", - "@typescript-eslint/no-loss-of-precision": "error", "no-unused-vars": "off", "@typescript-eslint/no-unused-vars": [ "error", @@ -216,7 +215,7 @@ { "builtinGlobals": false } ], "no-throw-literal": "off", - "@typescript-eslint/no-throw-literal": "error", + "@typescript-eslint/only-throw-error": "error", "no-unused-expressions": "off", "@typescript-eslint/no-unused-expressions": [ "error", @@ -228,14 +227,15 @@ ], "no-useless-constructor": "off", "@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/array-type": [ "error", { "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": [ "error", "interface" @@ -280,7 +280,6 @@ ], "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-var-requires": "error", "@typescript-eslint/no-require-imports": "error", "@typescript-eslint/no-unsafe-unary-minus": "error", "@typescript-eslint/no-array-delete": "error", @@ -299,7 +298,6 @@ "@typescript-eslint/prefer-readonly": "error", "@typescript-eslint/prefer-reduce-type-parameter": "error", "@typescript-eslint/prefer-return-this-type": "error", - "@typescript-eslint/prefer-ts-expect-error": "error", "@typescript-eslint/promise-function-async": "error", "prefer-promise-reject-errors": "off", "@typescript-eslint/prefer-promise-reject-errors": "error", @@ -315,7 +313,8 @@ "error", { "allowNumber": true } ], - "@typescript-eslint/return-await": ["error", "always"], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", "@typescript-eslint/strict-boolean-expressions": [ "error", { @@ -327,8 +326,7 @@ "allowNullableNumber": false, "allowAny": false } - ], - "@typescript-eslint/type-annotation-spacing": "error" + ] } } ]