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

Stylelint vs. Prettier compatibility issue #22

Open
adamkudrna opened this issue Nov 2, 2021 · 3 comments
Open

Stylelint vs. Prettier compatibility issue #22

adamkudrna opened this issue Nov 2, 2021 · 3 comments
Labels
bug Something isn't working
Projects

Comments

@adamkudrna
Copy link
Contributor

Prettier prefers:

margin-bottom: tools.rem2em(
    tokens.$space-6,
    tools.rem2em(tokens.$heading-small-desktop)
);

Stylelint prefers:

margin-bottom: tools.rem2em(tokens.$space-6, tools.rem2em(tokens.$heading-small-desktop));

This does not work either:

margin-bottom:
    tools.rem2em(
        tokens.$space-6,
        tools.rem2em(tokens.$heading-small-desktop)
    );

Workaround: disable either Stylelint or Prettier for that line / code block.

It seems there might be a conflict of declaration-colon-space-after and declaration-colon-newline-after Stylelint rules.

@adamkudrna adamkudrna added the bug Something isn't working label Nov 2, 2021
@literat
Copy link
Contributor

literat commented Nov 2, 2021

@adamkudrna What about to extend those rules with project specific configuration?

@adamkudrna
Copy link
Contributor Author

Well, because it would be project specific 🙂. I think this is a compatibility issue in configuration of two linters commonly used together. I believe our configs should be mutually compatible, so I filed this bug.

This particular problem may get resolved by #21 (the single-line version is 95 characters long), but it's just a question of time when it bubbles up again.

@literat
Copy link
Contributor

literat commented Nov 25, 2021

I think that this is a problem with line width. I have just merged configuration of prettier where we are setting line width to 120, see #29.

I think this should fix this issue. Please check it and let me know if this works. Thanks.

@literat literat added this to Todo in Maintenance Nov 25, 2021
@literat literat moved this from Todo to In progress in Maintenance Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Maintenance
  
In progress
Development

No branches or pull requests

2 participants