Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch-error-name - Support optional catch binding #187

Merged

Conversation

MrHen
Copy link
Contributor

@MrHen MrHen commented Sep 2, 2018

Fixes #186. The test runner choked on the new syntax and I couldn't figure out exactly what the problem was. My hunch is that either ava or the eslint test runner doesn't support optional catch bindings.

To test the fix, I used npm link and ran the scenario from the bug. Pushing true was the cleanest way to leave the rest of the code alone.

@MrHen MrHen changed the title Always pass missing catch binding catch-error-name optional catch binding Sep 2, 2018
@sindresorhus
Copy link
Owner

My hunch is that either ava or the eslint test runner doesn't support optional catch bindings.

It's AVA. Fixed in the latest version, but I can't upgrade yet because of jfmengels/eslint-ava-rule-tester#7

@sindresorhus sindresorhus changed the title catch-error-name optional catch binding catch-error-name - Support optional catch binding Sep 3, 2018
@sindresorhus sindresorhus merged commit 81613c1 into sindresorhus:master Sep 3, 2018
@MrHen MrHen deleted the bug/186-optional-catch-binding branch September 3, 2018 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] catch-error-name rule does not work with optional catch binding
2 participants