style(eslint): update no-unused-vars ignore pattern

This commit is contained in:
Tony
2025-11-04 20:50:23 +08:00
parent 2045b67aad
commit 6769806007
+11 -3
View File
@@ -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',