0 votes
in VueJS by
What is the purpose of eslint loader in VueJS?

1 Answer

0 votes
by

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/
      }
    ]
  }
}

Related questions

0 votes
asked Sep 7, 2023 in VueJS by DavidAnderson
0 votes
asked Sep 14, 2023 in VueJS by AdilsonLima
...