From 4714d6b20494fc077805147948c76673fcd15fe5 Mon Sep 17 00:00:00 2001 From: Nicolas Sutter Date: Wed, 19 Jul 2023 14:04:44 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20ajoute=20pattern=20d'ignore=20pour=20le?= =?UTF-8?q?s=20variables=20dans=20la=20r=C3=A8gle=20`@typescript-eslint/no?= =?UTF-8?q?-unused-vars`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/typescript/index.ts | 3 ++- src/vue-typescript/index.ts | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/typescript/index.ts b/src/typescript/index.ts index 7403c50..7dbfca2 100644 --- a/src/typescript/index.ts +++ b/src/typescript/index.ts @@ -24,7 +24,7 @@ function getConfig() { rules: { '@typescript-eslint/no-unused-vars': [ 'error', - { args: 'all', argsIgnorePattern: '^_' }, + { args: 'all', argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, ], /** @@ -73,6 +73,7 @@ function getConfig() { }, }, ], + 'no-unused-vars': 'off', }, }, ], diff --git a/src/vue-typescript/index.ts b/src/vue-typescript/index.ts index 3017c31..6a285be 100644 --- a/src/vue-typescript/index.ts +++ b/src/vue-typescript/index.ts @@ -38,12 +38,11 @@ function getConfig() { rules: typescriptConfig.rules, overrides: [ + ...(typescriptConfig.overrides ?? []), { - files: ['*.{vue,ts,tsx}'], + files: ['*.vue'], rules: { - // On utilise la règle de TS qui fait déjà le boulot 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': 'off', }, }, ],