chore(eslint): ensure proper error handling

This commit is contained in:
Tony 2025-09-30 01:23:32 +08:00
parent 3a8465a422
commit fff0cb0545
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ export default [
message: 'Usage of .catch(() => null) is not allowed. Please handle the error appropriately.',
},
{
selector: 'CallExpression[callee.property.name="catch"] > ArrowFunctionExpression[params.length<=1][body.name=undefined]',
selector: 'CallExpression[callee.property.name="catch"] > ArrowFunctionExpression[params.length<=1][body.type="Identifier"][body.name="undefined"]',
message: 'Usage of .catch(() => undefined) is not allowed. Please handle the error appropriately.',
},
{