Stylelint Automatic Fixes

sage9

#1

With Sage 9’s new stylelint checks, I’m wondering has anyone implemented any tools to automatically correct formatting issues?


#2

With the upcoming update, you can do this with

yarn lint:styles -- --fix

Until then you can run the full command manually if you want:

stylelint 'resources/assets/styles/**/*.{css,sass,scss,sss,less}' --fix

or

node node_modules/.bin/stylelint 'resources/assets/styles/**/*.{css,sass,scss,sss,less}' --fix

#3

The bottom option is not working for me. It displays the issues but does not fix them.


#4

I’m facing the same problem here. Running any of those commands won’t make the trick. I’m dealing with plenty of minor errors which not let me build the main.css file.

Any idea?

Thanks in advance!


#5

#6

Thanks, have you integrated this? I’m interested to see how you configured things.