Use stylelint-prettier rules with stylelint#10725
Merged
alecslupu merged 2 commits intodecidim:developfrom Apr 18, 2023
Merged
Conversation
alecslupu
suggested changes
Apr 15, 2023
Contributor
alecslupu
left a comment
There was a problem hiding this comment.
I like the "recommended" part to be added. But I do not want to remove the prettier npm command in lint code.
It becomes very easy for first time contributors, or for people that do not have the prettier properly configured ( like me - running in docker, no npm command available ) to break things in the project structure.
alecslupu
approved these changes
Apr 18, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
After #10669 we no longer get the error lens inline errors in VSCode for the SCSS files which I personally found very useful in order to fix these issues on the fly and saving time in the development process.
Through
stylelint-prettierpackage, we can introduce the prettier rules to stylelint which would help this. This also makes the "Format SCSS files" step in the CI pipeline unnecessary because the stylelint step should already spot these issues.📌 Related Issues
Testing
{)npm run stylelint📷 Screenshots