Answer the question
In order to leave comments, you need to log in
Is it possible to format code using rules from .stylelintrc?
This refers to the "Format Document" function.
I tried to do as described here
It did not work. The code is formatted in a standard way.
Or how to change the Prettier configuration file?
This is described here, but it also did not work out (put .prettierrc in the root of the project).
Answer the question
In order to leave comments, you need to log in
You need to install the stylelint extension in the editor.
Install `stylelint` in devdependencies.
I also set `stylelint-order` to check the order of the style rules.
Enable format option on save:
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question