prefer-optional-catch-binding
March 27, 2026 ยท View on GitHub
๐ Prefer omitting the catch binding parameter.
๐ผ This rule is enabled in the following configs: โ
recommended, โ๏ธ unopinionated.
๐ง This rule is automatically fixable by the --fix CLI option.
If the catch binding parameter is not used, it should be omitted.
Examples
// โ
try {} catch (notUsedError) {}
// โ
try {} catch ({message}) {}
// โ
try {} catch {}