I have configured stylelint for my project and it is running smoothly from the command line. Here is an example of the output when I run the following command:
$ stylelint 'css/**/*.css' --fix
css/style.css
20:18 × Expected newline after ":" with a multi-line declaration declaration-colon-newline-after
...
...
However, when I try to run it as part of an npm script
, there is no visible output (other than logging the command) and it appears that errors are being ignored:
$ npm run stylelint
> project lint:css path/project
> stylelint 'css/**/*.css' --fix
This is how it looks in my package.json file:
"scripts": {
...
"stylelint": "stylelint 'css/**/*.css' --fix"
},
Do you have any suggestions on how to display console output and exit on errors when running stylelint as an npm script?