mirror of
https://github.com/WilliamsNY/linter-configs.git
synced 2024-11-09 19:46:39 -05:00
Update eslint to use eslint-plugin-vue for vue files instead of eslint-plugin-html
This commit is contained in:
parent
8e5e06cc8c
commit
891eaba8c3
2 changed files with 128 additions and 107 deletions
|
@ -11,6 +11,6 @@ Configurations for linters used at WNY
|
||||||
## Javascript
|
## Javascript
|
||||||
|
|
||||||
* Linter: [eslint](https://github.com/eslint/eslint)
|
* 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`
|
* Config: `eslintrc`
|
||||||
* Install: `~/.eslintrc`
|
* Install: `~/.eslintrc`
|
||||||
|
|
27
eslintrc
27
eslintrc
|
@ -1,10 +1,14 @@
|
||||||
{
|
{
|
||||||
"parser": "babel-eslint",
|
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
|
"parser": "babel-eslint",
|
||||||
"ecmaVersion": 6,
|
"ecmaVersion": 6,
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"plugins": [ "html" ],
|
|
||||||
|
"extends": [
|
||||||
|
"plugin:vue/essential"
|
||||||
|
],
|
||||||
|
|
||||||
"rules": {
|
"rules": {
|
||||||
"strict": 0,
|
"strict": 0,
|
||||||
"comma-dangle": [ "warn" ],
|
"comma-dangle": [ "warn" ],
|
||||||
|
@ -103,6 +107,23 @@
|
||||||
"space-infix-ops": [ "warn" ],
|
"space-infix-ops": [ "warn" ],
|
||||||
"space-unary-ops": [ "warn" ],
|
"space-unary-ops": [ "warn" ],
|
||||||
"spaced-comment": [ "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"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue