Skip to content

feat: Add an option to remove the matching of findBy queries by the prefer-explicit-assert rule #452

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

Merged

Conversation

julienw
Copy link
Contributor

@julienw julienw commented Aug 16, 2021

A recent patch implemented matching findBy* queries by the
prefer-explicit-assert rule. This patch makes it possible to disable it
in cases where it's too distracting.

Checks

  • I have read the contributing guidelines.
  • If some rule is added/updated/removed, I've regenerated the rules list.
  • If some rule meta info is changed, I've regenerated the plugin shared configs.

Changes

This adds an option so that a user can globally disable that findBy queries are checked by the role.

Context

Fixes #449

…refer-explicit-assert rule

A recent patch implemented matching findBy* queries by the
prefer-explicit-assert rule. This patch makes it possible to disable it
in cases where it's too distracting.

Fixes testing-library#449
@julienw julienw force-pushed the 449-add-option-to-explicit-assert branch from f985c17 to 1b1a661 Compare August 16, 2021 15:30
@julienw
Copy link
Contributor Author

julienw commented Aug 16, 2021

I believe this is ready for review now. Also I guess somebody needs to approve the test workflows :-)

Copy link
Member

@Belco90 Belco90 left a comment

Choose a reason for hiding this comment

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

Hey @julienw! Thanks for your PR, it looks good to me!

@Belco90 Belco90 merged commit 172a5ac into testing-library:main Aug 16, 2021
@Belco90
Copy link
Member

Belco90 commented Aug 16, 2021

The step for publishing the new package version failed, I'm checking why.

@github-actions
Copy link

🎉 This PR is included in version 4.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Belco90
Copy link
Member

Belco90 commented Aug 16, 2021

@all-contributors please add @julienw for bug, code, test

@allcontributors
Copy link
Contributor

@Belco90

I've put up a pull request to add @julienw! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please provide an option to remove the matching of findBy queries by the prefer-explicit-assert rule
2 participants