Skip to content

unicorn/catch-error-name Style ​

🚧 An auto-fix is still under development.

What it does ​

This rule enforces naming conventions for catch statements.

Why is this bad? ​

Examples ​

Examples of incorrect code for this rule:

javascript
try {
} catch (foo) {}

Examples of correct code for this rule:

javascript
try {
} catch (error) {}

References ​

Released under the MIT License.