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: new no-unnecessary-act rule #365

Merged
merged 22 commits into from
May 11, 2021
Merged

feat: new no-unnecessary-act rule #365

merged 22 commits into from
May 11, 2021

Conversation

Belco90
Copy link
Member

@Belco90 Belco90 commented May 2, 2021

Closes #259

Co-authored-by: @alessbell

I've found few issues detecting Testing Library packages during the development of this rule. I've fixed one of them, and I'll pinpoint the rest of them in this very PR so I can fix them separately after this rule gets merged.

README.md Show resolved Hide resolved
}
);

const isReactDomTestUtilsAct = (() => {
Copy link
Member Author

Choose a reason for hiding this comment

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

I know there are several IIFE used here and some blocks could be refactored or extracted. I'm gonna leave it like this so first I fix the issues found and then, having proper context, I'll refactor and extract corresponding functions.

lib/node-utils/index.ts Show resolved Hide resolved
lib/node-utils/index.ts Show resolved Hide resolved
lib/node-utils/index.ts Show resolved Hide resolved
tests/lib/rules/no-unnecessary-act.test.ts Show resolved Hide resolved
@Belco90 Belco90 marked this pull request as ready for review May 4, 2021 21:35
@Belco90 Belco90 self-assigned this May 4, 2021
@Belco90
Copy link
Member Author

Belco90 commented May 6, 2021

forever alone meme

@Belco90 Belco90 added the new rule New rule to be included in the plugin label May 6, 2021
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

I don't know enough about this plugin to provide very valuable feedback on the code, but here's one bit of feedback on the docs

docs/rules/no-unnecessary-act.md Outdated Show resolved Hide resolved
@kentcdodds
Copy link
Member

Other than that, this looks great!

gndelia
gndelia previously approved these changes May 6, 2021
Copy link
Collaborator

@gndelia gndelia left a comment

Choose a reason for hiding this comment

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

This looks great. I left some minor suggestions, but LGTM. Kudos to @alessbell and @Belco90 ! 🚀

@Belco90 Belco90 merged commit 88416b2 into main May 11, 2021
@Belco90 Belco90 deleted the 259_no-unnecessary-act branch May 11, 2021 21:30
@github-actions
Copy link

🎉 This PR is included in version 4.3.0 🎉

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
Labels
new rule New rule to be included in the plugin released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add no-unnecessary-act rule
4 participants