FrontendDeveloper.in

Vue.js question detail

What is the purpose of eslint loader?

You can use eslint-loader for *.vue files in order to automatically linted on save during development. It can be installed as npm module,

npm install -D eslint eslint-loader

After that you need to add it as pre-loader,

// webpack.config.js
module.exports = {
// ... other options
module: {
rules: [
{
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /node_modules/
}
]
}
}
Back to all Vue.js questions
Get LinkedIn Premium at Rs 399