How to lint Vue files with stylelint?

Create .stylelintrc

{
  "processors": ["stylelint-processor-html"],
  "extends": "stylelint-config-standard"
}

Install packages

npm i stylelint -D
npm i stylelint-processor-html -D
npm i stylelint-config-standard -D

Add scripts

Add lint:css to package.json

"scripts": {
  "lint:css": "stylelint '**/*.vue' --syntax scss"
},

Run stylelint lint:css script

npm run lint:css

No Comments Yet