From aef4c241771735589ced0a4c9e3d6b91c34917f3 Mon Sep 17 00:00:00 2001 From: Konstantinos Paparas Date: Thu, 11 Jan 2024 23:34:21 +0100 Subject: [PATCH] fix: make sure that rule level is string Changes the level to as const to avoid issues integrating with the eslint-config --- docs/rules/no-deprecated-classes.md | 20 ++++++++++---------- scripts/update-recommended-rules.ts | 4 ++-- src/configs/recommended.ts | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/rules/no-deprecated-classes.md b/docs/rules/no-deprecated-classes.md index 86258fc..e08bd56 100644 --- a/docs/rules/no-deprecated-classes.md +++ b/docs/rules/no-deprecated-classes.md @@ -1,7 +1,7 @@ --- title: '@rotki/no-deprecated-classes' description: disallow the usage of vuetify css classes since they are replaced with tailwindcss -since: 0.1.0 +since: 0.0.1 --- # @rotki/no-deprecated-classes @@ -19,22 +19,22 @@ This rule reports usages of deprecated css classes in the code. ```vue - + - + - + - + - + - + - + - + ``` @@ -49,7 +49,7 @@ This rule reports usages of deprecated css classes in the code. ## :rocket: Version -This rule was introduced in @rotki/eslint-plugin v0.1.0 +This rule was introduced in @rotki/eslint-plugin v0.0.1 ## :mag: Implementation diff --git a/scripts/update-recommended-rules.ts b/scripts/update-recommended-rules.ts index 7d65a29..bd12579 100644 --- a/scripts/update-recommended-rules.ts +++ b/scripts/update-recommended-rules.ts @@ -17,7 +17,7 @@ async function main() { export = { extends: [require.resolve('./base')], parserOptions: { - ecmaVersion: 2018, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { jsx: true @@ -30,7 +30,7 @@ export = { rules: { ${rules .filter((rule) => rule.recommended) - .map((rule) => `'${rule.id}': 'warn',`) + .map((rule) => `'${rule.id}': 'warn' as const,`) .join('\n ')} }, }`, diff --git a/src/configs/recommended.ts b/src/configs/recommended.ts index 7ecd8b2..ebe2729 100644 --- a/src/configs/recommended.ts +++ b/src/configs/recommended.ts @@ -2,7 +2,7 @@ export = { extends: [require.resolve('./base')], parserOptions: { - ecmaVersion: 2018, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { jsx: true, @@ -13,6 +13,6 @@ export = { es6: true, }, rules: { - '@rotki/no-deprecated-classes': 'warn', + '@rotki/no-deprecated-classes': 'warn' as const, }, };