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

feat: create no-conditional-in-test rule #1027

Merged
merged 1 commit into from
Feb 6, 2022
Merged

feat: create no-conditional-in-test rule #1027

merged 1 commit into from
Feb 6, 2022

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Jan 14, 2022

This replace is meant to replace no-if: in addition to making the name and documentation consistent (since the rule supports more than just if statements), it greatly simplifies it by reporting any condition in a test state.

If developers have a good reason for a condition within a test, then they can disable the rule with an inline disable.

This fixes #1026

I'll do a follow-up PR deprecating no-if, so that there's a changelog entry for visibility.

@G-Rath G-Rath requested a review from SimenB January 14, 2022 19:15
@G-Rath G-Rath force-pushed the replace-no-if branch 4 times, most recently from 468c0c0 to 86fb738 Compare January 25, 2022 00:08
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it

@G-Rath G-Rath changed the base branch from main to next February 6, 2022 20:35
@G-Rath G-Rath merged commit 004ddc5 into next Feb 6, 2022
@G-Rath G-Rath deleted the replace-no-if branch February 6, 2022 20:36
github-actions bot pushed a commit that referenced this pull request Feb 6, 2022
# [26.1.0-next.1](v26.0.0...v26.1.0-next.1) (2022-02-06)

### Features

* create `no-conditional-in-test` rule ([#1027](#1027)) ([004ddc5](004ddc5))
@github-actions
Copy link

github-actions bot commented Feb 6, 2022

🎉 This PR is included in version 26.1.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

G-Rath added a commit that referenced this pull request Feb 6, 2022
G-Rath pushed a commit that referenced this pull request Feb 6, 2022
# [26.1.0-next.1](v26.0.0...v26.1.0-next.1) (2022-02-06)

### Features

* create `no-conditional-in-test` rule ([#1027](#1027)) ([004ddc5](004ddc5))
github-actions bot pushed a commit that referenced this pull request Feb 6, 2022
# [26.1.0](v26.0.0...v26.1.0) (2022-02-06)

### Features

* create `no-conditional-in-test` rule ([#1027](#1027)) ([d551850](d551850))
* create `prefer-snapshot-hint` rule ([#1012](#1012)) ([d854723](d854723))
* deprecate `no-if` in favor of `no-conditional-in-test` ([#1049](#1049)) ([35f32cc](35f32cc))
@G-Rath G-Rath mentioned this pull request Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no-if rule doesn't work in many cases
2 participants