The stylelint linter supports linting style parts of Vue single file components. You can run linter on particular vue file as below:
1 | stylelint MyComponent.vue |
Other option is configuring stylelint-webpack-plugin in webpack. It can be configured as a dev dependency.
1 2 3 4 5 6 7 8 9 10 | // webpack.config.js const StyleLintPlugin = require('stylelint-webpack-plugin'); module.exports = { // ... other options plugins: [ new StyleLintPlugin({ files: ['**/*.{vue,htm,html,css,sss,less,scss,sass}'], }) ] } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.