-
Notifications
You must be signed in to change notification settings - Fork 61
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
Rule proposal: spaces between test blocks #145
Comments
Sounds like a good addition for this plugin 👍 . |
Oh, rather thought about requiring spaces between each test case: describe('some describe', () => {
it('should really have spacing after this', () => {})
})
describe('some describe', () => {
it('it had an empty line, good', () => {})
}) |
Agreed. Although the current rule only supports spacing between. But as I said if there is a demand for other options someone should file a dedicated feature request. |
Hey all, does it not work with Asking because we use |
I tried to get some combination of existing rules from eslint to describe this style, but couldn't quite do it without adversely affecting the code inside the test block.
I propose a rule that affects expression statements with a name of one of the mocha test functions (describe, it, before/after/etc) and enforces spacing before and after the test with options for always or never.
Example of bad code with option 'always':
Example of bad code with option 'never':
I have this written and was just going to include it in a custom plugin - but then I saw this project existed so I figured I'd share it.
The text was updated successfully, but these errors were encountered: