FrontendDeveloper.in

Vue.js question detail

How do you apply linting for css?

The stylelint linter supports linting style parts of Vue single file components. You can run linter on particular vue file as below,

stylelint MyComponent.vue

Other option is configuring stylelint-webpack-plugin in webpack. It can be configured as a dev dependency.

// 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}'],
})
]
}
Back to all Vue.js questions
Get LinkedIn Premium at Rs 399