Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 325 Bytes

prefer-optional-catch-binding.md

File metadata and controls

27 lines (19 loc) · 325 Bytes

Prefer omitting the catch binding parameter

If the catch binding parameter is not used, it should be omitted.

This rule is fixable.

Fail

try {} catch (notUsedError) {}
try {} catch ({message}) {}

Pass

try {} catch {}
try {} catch (error) {
	console.error(error);
}