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

fix(no-wait-for-side-effects): false negatives in variables declarations #677

Merged
merged 1 commit into from Oct 17, 2022

Conversation

sjarva
Copy link
Collaborator

@sjarva sjarva commented Oct 17, 2022

Checks

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

Changes

  • adds a new helper function that checks if there are side effects (userEvent, fireEvent or render) in variable declarations
  • adds a new invalid unit test

Context

Closes #368

P.S. If you feel that this PR is following the rules of Hactoberfest and this gets merged, it would be wonderful if this PR would be tagged with a hacktoberfest-accepted tag/label. Thanks!

@sjarva sjarva requested a review from Belco90 October 17, 2022 18:24
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.

LGTM, thanks!!

@Belco90 Belco90 merged commit c3504a7 into main Oct 17, 2022
@Belco90 Belco90 deleted the pr/false-negatives-no-wait-for-side-effects branch October 17, 2022 18:38
@github-actions
Copy link

🎉 This PR is included in version 5.7.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 6.0.0-alpha.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

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-wait-for-side-effects: not reporting VariableDeclaration nodes
2 participants