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

New rule: no duplicated hooks #231

Closed
eranshabi opened this issue Mar 3, 2019 · 4 comments · Fixed by #298
Closed

New rule: no duplicated hooks #231

eranshabi opened this issue Mar 3, 2019 · 4 comments · Fixed by #298

Comments

@eranshabi
Copy link
Contributor

A rule that disallows duplicated hooks in the same describe.
For example this code will fail, because you should combine the two beforeEachs into one:

describe('my describe', () => {
    beforeEach(() => {...});
    beforeEach(() => {...});

    it('my it', () => {...})
});
@SimenB
Copy link
Member

SimenB commented Mar 4, 2019

I like it! Wanna send a PR?

@Mark1626
Copy link
Contributor

I'll raise a PR for this

Mark1626 added a commit to m4rkforks/eslint-plugin-jest that referenced this issue Jul 11, 2019
Mark1626 added a commit to m4rkforks/eslint-plugin-jest that referenced this issue Jul 11, 2019
@Mark1626
Copy link
Contributor

@SimenB raised a PR for this

SimenB pushed a commit that referenced this issue Jul 15, 2019
SimenB pushed a commit that referenced this issue Jul 15, 2019
@SimenB
Copy link
Member

SimenB commented Jul 15, 2019

🎉 This issue has been resolved in version 22.8.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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants