diff --git a/eslint.config.mjs b/eslint.config.mjs index 78ae2d107..8eca04608 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -113,6 +113,14 @@ export default [ selector: 'CallExpression[callee.property.name="catch"] > ArrowFunctionExpression[params.length<=1][body.value=null]', 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]', + message: 'Usage of .catch(() => undefined) is not allowed. Please handle the error appropriately.', + }, + { + selector: 'CallExpression[callee.property.name="catch"] > ArrowFunctionExpression[params.length<=1] > ArrayExpression[elements.length<=1]', + message: "Usage of .catch(() => []]) is not allowed. Please handle the error appropriately." + } ], 'no-unneeded-ternary': 'error',