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

Padding between it and describe blocks. #17

Closed
hally9k opened this issue Nov 19, 2017 · 6 comments · Fixed by #1563
Closed

Padding between it and describe blocks. #17

hally9k opened this issue Nov 19, 2017 · 6 comments · Fixed by #1563

Comments

@hally9k
Copy link

hally9k commented Nov 19, 2017

I have been looking for a rule to enforce padding around all it and describe blocks. Is this the correct place for that? Maybe jest/padding-it-blocks and jest/padding-describe-blocks rules?

it('My awesome test.', () => {
  expect(true).toBe(true)
})
// Enforcing this line of padding between the it blocks below this comment...

it('My other awesome test.', () => {
  expect(false).toBe(false)
})
@thymikee
Copy link
Member

I'm not sure if we want to add any styling preferences.

@SimenB
Copy link
Member

SimenB commented Nov 21, 2017

I agree that styling at this level is not something we want. it vs test is also styling, but makes more sense (#12).

@hally9k would https://eslint.org/docs/rules/padded-blocks work for you?

EDIT: Hmm, maybe not... I'd suggest looking for another plugin, or just create one 🙂

@SimenB
Copy link
Member

SimenB commented Nov 29, 2017

Closing as we won't be adding it.

If you create a plugin for it, we could link to it 🙂

@dangreenisrael
Copy link
Contributor

dangreenisrael commented May 4, 2019

Hey @SimenB. We we looking for this functionality, and following your advice I created a plugin for it. Any chance you would be willing to link to it and/or give any feedback on it?

Also, @hally9k is this what you were looking for?

https://github.com/dangreenisrael/eslint-plugin-jest-formatting
https://www.npmjs.com/package/eslint-plugin-jest-formatting

@SimenB
Copy link
Member

SimenB commented May 5, 2019

Cool! Please send a PR adding a link to it in our readme :) A PR to awesome-jest as well would be cool

Copy link

github-actions bot commented Aug 7, 2024

🎉 This issue has been resolved in version 28.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.

4 participants