ESLint plugin for Vue.js projects
npm install --save-dev eslint-plugin-vue- create a file named
.eslintrcin your project:
{
extends: [ /* your usual extends */ ],
plugins: ["vue"],
rules: {
'vue/jsx-uses-vars': 2,
},
}- OPTIONAL: install eslint-config-vue:
npm install --save-dev eslint-config-vue - OPTIONAL: then use the recommended configurations in your
.eslintrc:
{
extends: ["vue", /* your other extends */],
plugins: ["vue"],
rules: {
/* your overrides -- vue/jsx-uses-vars is included in eslint-config-vue */
},
}