From 6769806007b1ff82faa0788144f7c2cfd49f4c33 Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 4 Nov 2025 20:50:23 +0800 Subject: [PATCH] style(eslint): update no-unused-vars ignore pattern --- eslint.config.mjs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 9bd3082a4..5a95e8fa0 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -119,12 +119,12 @@ export default [ }, { selector: 'CallExpression[callee.property.name="catch"] > ArrowFunctionExpression[params.length=0] > ArrayExpression[elements.length=0]', - message: "Usage of .catch(() => []) is not allowed. Please handle the error appropriately." + message: 'Usage of .catch(() => []) is not allowed. Please handle the error appropriately.', }, { selector: 'CallExpression[callee.property.name="catch"] > ArrowFunctionExpression[params.length=0] > BlockStatement[body.length=0]', - message: "Usage of .catch(() => {}) is not allowed. Please handle the error appropriately." - } + message: 'Usage of .catch(() => {}) is not allowed. Please handle the error appropriately.', + }, ], 'no-unneeded-ternary': 'error', @@ -160,6 +160,14 @@ export default [ }, ], + '@typescript-eslint/no-unused-vars': [ + 'error', + { + args: 'all', + argsIgnorePattern: '^_', + }, + ], + // unicorn 'unicorn/consistent-function-scoping': 'warn', 'unicorn/explicit-length-check': 'off',