Pattern: Unused error parameter in catch clause
Issue: -
When a catch
block doesn't use the error parameter, it can be omitted for cleaner code. Modern JavaScript allows catch clauses without binding parameters.
Example of incorrect code:
try {
// ...
} catch (e) {}
Example of correct code:
try {
// ...
} catch {}