I'm trying to configure a visual studio code project to format SCSS code according to WordPress standards. So far I've done the following but no indication of errors and no formatting occurs on save.
Installed the stylelint extension, also have prettier installed.
Installed the stylelint-config package:
npm install @wordpress/stylelint-config --save-dev
Added the following lines to package.json to format SCSS:
"stylelint": {
"extends": "@wordpress/stylelint-config/scss"
},
No errors are displayed and no formatting is corrected on save.
I have 'format on save' enabled.
As I want stylelint to format the code, I've added the following lines to settings.json to use stylelint instead of prettier for formatting SCSS:
"[scss]": {
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
}
Now I'm stuck for what to try.
Anyone got any ideas?
In case it's relevant, I'm using Windows 8.1.
Steve