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
Create no-conditional-expect
& deprecate no-try-expect
#588
Conversation
@SimenB I'm wondering if While the rule name wouldn't quite match the behaviour when the option is enabled, implementation wise it should be a case of just doing |
ESLint 5 is apparently not having a good time in CI:
|
Oh and I'm also thinking we should at some point move the |
88cdc94
to
a8feb64
Compare
a879820
to
d0c6646
Compare
🎉 This PR is included in version 23.16.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@G-Rath this breaks on of our builds after updating from 23.13.2 to 23.16.0. Not really a big deal since its easily fixable, I was just wondering if it was intended to add a new rule to the recommended configuration that breaks existing setups with a feature update? Shouldn't this be considered a breaking change? |
@janvennemann yes changing the recommended ruleset is considered a breaking change, which is why this wasn't added to the recommended ruleset. Would you be able to share your eslint config and more details on your setup, and the errors you got? |
@G-Rath Duh, for whatever reason we had both |
Closes #482
I originally was playing around with actually not caring if the
expect
was in a test, since overall it doesn't really matter where theexpect
is, it's still best to not have it in a condition, which worked nicely except it would require more logic for handling early returns and early throws.I think it's doable, but adds more complexity than needed right now, as it started heavily crossing into the territory of other rules like
no-test-return-statement
.