Open wedi opened 2 years ago
Came here as I was baffled that a linter isn't integrated with the actual formatting command lol. Glad I'm not the only one.
Not only SCSS, but also cannot format CSS files.
Amazing ... A VSCode formatter extension that cannot format any file ...
You can enable format on save by adding this to your config:
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": "explicit"
}
It's in the README of the project. I agree it's a bit strange to configure it this way compared to other formatters, but heh it works 🤷
What problem does this feature solve?
It would be cool, if the stylelint extension could be enabled as formatter for SCSS files just like it's possible to enable it for validation.
I gave it a shot but I wasn't very surprised it didn't work.
To enable validating SCSS files, you need to tweak a setting like so
It would be amazing if you could add a similar option for formatting to enable SCSS.
I looked into your pull request #200 @adalinesimonian but I have no experience with coding VSCode extensions at all and it's hard to tell where to start with this.
How does this feature solve the problem?
It allows to use stylelint for SCSS (and possibly more postcss files).
What are some alternatives to this feature?
No response
Code of Conduct