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 prefer-hooks-in-order rule #1098

Merged
merged 11 commits into from May 28, 2022

Conversation

aaron012
Copy link
Contributor

@aaron012 aaron012 commented May 5, 2022

The tests on your branch were a major help for implementing this @G-Rath. Thanks!

Resolves #992

@SimenB
Copy link
Member

SimenB commented May 6, 2022

there's a conflict, could you resolve? 🙂

@SimenB SimenB requested a review from G-Rath May 6, 2022 07:09
Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

Looks good - could you throw in some more complex examples (the correct and incorrect samples from the doc would be a good start - we want to make sure that the tracking works correctly around nested cases; also can you chuck in an example with multiple hooks of the same name?), and you need to apply formatting + regenerate the docs (yarn run tools:regenerate-docs).

@aaron012 aaron012 requested a review from G-Rath May 16, 2022 19:05
Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

Looks good - I've got a few suggestions & nitpicks which'd be good to be addressed before merging, but I don't think need to stop merging if it comes to it.

Let me know if you're happy to action them or if you'd like me to :)

src/rules/prefer-hooks-in-order.ts Outdated Show resolved Hide resolved
src/rules/prefer-hooks-in-order.ts Outdated Show resolved Hide resolved
src/rules/prefer-hooks-in-order.ts Show resolved Hide resolved
src/rules/prefer-hooks-in-order.ts Outdated Show resolved Hide resolved
@aaron012
Copy link
Contributor Author

Looks good - I've got a few suggestions & nitpicks which'd be good to be addressed before merging, but I don't think need to stop merging if it comes to it.

Let me know if you're happy to action them or if you'd like me to :)

Thanks! I have fixed those 😄

@aaron012 aaron012 requested a review from G-Rath May 18, 2022 06:19
@G-Rath G-Rath changed the title Prefer hooks in order feat: create prefer-hooks-in-order rule May 28, 2022
@G-Rath G-Rath merged commit 384654c into jest-community:main May 28, 2022
github-actions bot pushed a commit that referenced this pull request May 28, 2022
# [26.3.0](v26.2.2...v26.3.0) (2022-05-28)

### Features

* create `prefer-hooks-in-order` rule ([#1098](#1098)) ([384654c](384654c))
@github-actions
Copy link

🎉 This PR is included in version 26.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[prefer-hooks-on-top]: allow enforcing order of hooks
3 participants