Update eslint to use eslint-plugin-vue for vue files instead of eslint-plugin-html

This commit is contained in:
Kevin MacMartin 2018-11-12 15:03:34 -05:00
parent 8e5e06cc8c
commit 891eaba8c3
2 changed files with 128 additions and 107 deletions

View file

@ -11,6 +11,6 @@ Configurations for linters used at WNY
## Javascript
* Linter: [eslint](https://github.com/eslint/eslint)
* Modules: [babel-eslint](https://github.com/babel/babel-eslint), [eslint-plugin-html](https://github.com/BenoitZugmeyer/eslint-plugin-html)
* Modules: [babel-eslint](https://github.com/babel/babel-eslint), [eslint-plugin-vue@next](https://github.com/vuejs/eslint-plugin-vue)
* Config: `eslintrc`
* Install: `~/.eslintrc`

View file

@ -1,10 +1,14 @@
{
"parser": "babel-eslint",
"parserOptions": {
"parser": "babel-eslint",
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [ "html" ],
"extends": [
"plugin:vue/essential"
],
"rules": {
"strict": 0,
"comma-dangle": [ "warn" ],
@ -103,6 +107,23 @@
"space-infix-ops": [ "warn" ],
"space-unary-ops": [ "warn" ],
"spaced-comment": [ "warn" ],
"wrap-regex": [ "warn" ]
"wrap-regex": [ "warn" ],
},
"overrides": [
{
"files": [ "*.vue" ],
"rules": {
"indent": "off",
"vue/script-indent": [ "warn", 4, { "baseIndent": 1, "switchCase": 1, "ignores": [ "VariableDeclaration" ] } ],
"vue/no-spaces-around-equal-signs-in-attribute": [ "warn" ],
"vue/component-name-in-template-casing": [ "warn", "kebab-case" ],
"vue/no-unused-components": [ "warn" ],
"vue/no-unused-vars": [ "warn" ],
"vue/no-use-v-if-with-v-for": [ "warn" ],
"vue/require-v-for-key": "off"
}
}
]
}