From 2e962a278571113853435221e8c3d43bd9fa1421 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 11 Mar 2022 05:55:22 +0800 Subject: [PATCH] feat: improve `no-unused-vars` rule --- packages/basic/index.js | 6 ++++-- packages/typescript/index.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/basic/index.js b/packages/basic/index.js index 9b2569f..da489ef 100644 --- a/packages/basic/index.js +++ b/packages/basic/index.js @@ -18,11 +18,13 @@ module.exports = { 'dist', 'LICENSE*', 'output', - 'packages-lock.json', - 'pnpm-lock.yaml', + 'coverage', 'public', 'temp', + 'packages-lock.json', + 'pnpm-lock.yaml', 'yarn.lock', + '__snapshots__', '!.github', '!.vitepress', '!.vscode', diff --git a/packages/typescript/index.js b/packages/typescript/index.js index 9d034fd..ecd5f0e 100644 --- a/packages/typescript/index.js +++ b/packages/typescript/index.js @@ -25,7 +25,7 @@ module.exports = { 'indent': 'off', '@typescript-eslint/indent': ['error', 2], 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': 'error', + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], 'no-redeclare': 'off', '@typescript-eslint/no-redeclare': 'error', 'no-use-before-define': 'off',