0 votes
in VueJS by

How do you use eslint plugin?

1 Answer

0 votes
by

The official eslint-plugin-vue supports linting both the template and script parts of Vue single file components. You can configure plugin in your ESLint config,

// .eslintrc.js
module.exports = {
  extends: [
    "plugin:vue/essential"
  ]
}

You can run linter on particular component as below,

eslint --ext js,vue MyComponent.vue
...