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

Consider adding eslint-plugin-jest-formatting #145

Closed
manovotny opened this issue Jan 5, 2021 · 1 comment
Closed

Consider adding eslint-plugin-jest-formatting #145

manovotny opened this issue Jan 5, 2021 · 1 comment

Comments

@manovotny
Copy link
Owner

manovotny commented Jan 5, 2021

It was discovered that the following code does not produce a lint error.

describe('something', () => {
    beforeEach(() => {
        // TODO
    });
    test('should test something', () => {
        expect(true).toBe(false);
    });
});

It is desired to have a blank line between the beforeEach and test blocks.

I first went down the route of debugging padding-line-between-statements thinking that I configured multiline-block-like incorrectly, but that wasn't it. Turns out, multiline-expression causes it to fire an error correctly, but forces us to put blank links after a slew of other things we don't want to care about too.

That lead to some googling and discovery of jest-community/eslint-plugin-jest#17, which ultimately led to the promise land of https://github.com/dangreenisrael/eslint-plugin-jest-formatting.

We should look to incorporate that here.

@manovotny
Copy link
Owner Author

This will be fixed in the v7 release.

@manovotny manovotny mentioned this issue Jan 31, 2022
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant