From f6dfcfd42a8e20ecb00949a6ac420e02f761efee Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Wed, 16 Oct 2024 13:31:28 +0000 Subject: [PATCH] feat!: @typescript-eslint/prefer-as-const --- src/rules.ts | 1 + src/test/_expected-exported-value.ts | 1 + src/test/_rules_to_consider.ts | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rules.ts b/src/rules.ts index b5fbbadc..7752f760 100644 --- a/src/rules.ts +++ b/src/rules.ts @@ -222,6 +222,7 @@ export const tseslintRules: Record = { 'error', { allowThrowingAny: false, allowThrowingUnknown: false }, ], + '@typescript-eslint/prefer-as-const': ['error'], '@typescript-eslint/prefer-function-type': ['error'], '@typescript-eslint/prefer-includes': ['error'], '@typescript-eslint/prefer-nullish-coalescing': [ diff --git a/src/test/_expected-exported-value.ts b/src/test/_expected-exported-value.ts index 1805cf11..2a88ceae 100644 --- a/src/test/_expected-exported-value.ts +++ b/src/test/_expected-exported-value.ts @@ -392,6 +392,7 @@ export const expectedTseslintRules: Record< 'error', { allowThrowingAny: false, allowThrowingUnknown: false }, ], + '@typescript-eslint/prefer-as-const': ['error'], '@typescript-eslint/prefer-function-type': ['error'], '@typescript-eslint/prefer-includes': ['error'], '@typescript-eslint/prefer-nullish-coalescing': [ diff --git a/src/test/_rules_to_consider.ts b/src/test/_rules_to_consider.ts index a5029e17..afc1002b 100644 --- a/src/test/_rules_to_consider.ts +++ b/src/test/_rules_to_consider.ts @@ -183,7 +183,6 @@ export const promiseRulesToConsider = [ export const tseslintRulesToConsider = [ '@typescript-eslint/parameter-properties', - '@typescript-eslint/prefer-as-const', '@typescript-eslint/prefer-destructuring', '@typescript-eslint/prefer-enum-initializers', '@typescript-eslint/prefer-find',