-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
feat(lint): add prettier formatter to assert LESS files whitespaces #2611
feat(lint): add prettier formatter to assert LESS files whitespaces #2611
Conversation
d47a5c4
to
d368a93
Compare
57f31d9
to
da9a4f9
Compare
342bde2
to
d302347
Compare
PR is done, Prettier fixes with patches looks reasonable. Compiled |
Please resolve conflicts |
Seriously? This is really hacky. You want to use a tool, which does not do what we need... Why not fork prettier.io instead and use that? |
d302347
to
c3915f3
Compare
Compared to Stylelint, Prettier is very simple tool and I am quite supprised Stylelint is deprecating the whitespace rules in favor of Prettier. For LESS it seems ok, for JS, we should never enable Prettier as formatting is part of a code and improves readability.
As Prettier is an opinionated formatter instead of an linter, we need to satisfy it everywhere without exceptions.
When I was crafting this PR, I found several Prettier issues and proposed changes to Prettier:
In this PR, these changes are contained and Prettier is patched before it is run. Once the changes are merged in prettier and stable release is made, they can be removed.
This PR fixes minor whitespaces unfixed/undetected in GH-2610.
And also asserts:
Prettier has no built in support to dump the diff - prettier/prettier#6885 - so we dump it in the CI using git.