mirror of
https://github.com/WilliamsNY/linter-configs.git
synced 2024-12-22 09:40:24 -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
|
||||
|
||||
* 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`
|
||||
|
|
233
eslintrc
233
eslintrc
|
@ -1,108 +1,129 @@
|
|||
{
|
||||
"parser": "babel-eslint",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [ "html" ],
|
||||
"rules": {
|
||||
"strict": 0,
|
||||
"comma-dangle": [ "warn" ],
|
||||
"no-cond-assign": [ "warn" ],
|
||||
"no-dupe-args": [ "error" ],
|
||||
"no-dupe-keys": [ "error" ],
|
||||
"no-duplicate-case": [ "error" ],
|
||||
"no-empty": [ "warn" ],
|
||||
"no-empty-character-class": [ "warn" ],
|
||||
"no-ex-assign": [ "error" ],
|
||||
"no-extra-boolean-cast": [ "warn" ],
|
||||
"no-extra-parens": [ "warn" ],
|
||||
"no-extra-semi": [ "warn" ],
|
||||
"no-func-assign": [ "error" ],
|
||||
"no-invalid-regexp": [ "error" ],
|
||||
"no-irregular-whitespace": [ "error" ],
|
||||
"no-negated-in-lhs": [ "warn" ],
|
||||
"no-obj-calls": [ "error" ],
|
||||
"no-regex-spaces": [ "warn" ],
|
||||
"no-sparse-arrays": [ "warn" ],
|
||||
"no-unexpected-multiline": [ "warn" ],
|
||||
"no-unreachable": [ "warn" ],
|
||||
"no-unsafe-finally": [ "warn" ],
|
||||
"use-isnan": [ "warn" ],
|
||||
"valid-typeof": [ "error" ],
|
||||
"curly": [ "warn" ],
|
||||
"dot-location": [ "warn", "property" ],
|
||||
"eqeqeq": [ "warn", "smart" ],
|
||||
"guard-for-in": [ "warn" ],
|
||||
"no-alert": [ "warn" ],
|
||||
"no-case-declarations": [ "warn" ],
|
||||
"no-div-regex": [ "warn" ],
|
||||
"no-empty-function": [ "warn" ],
|
||||
"no-empty-pattern": [ "warn" ],
|
||||
"no-eq-null": [ "warn" ],
|
||||
"no-eval": [ "warn" ],
|
||||
"no-extend-native": [ "warn" ],
|
||||
"no-extra-bind": [ "warn" ],
|
||||
"no-extra-label": [ "warn" ],
|
||||
"no-floating-decimal": [ "warn" ],
|
||||
"no-implicit-coercion": [ "warn" ],
|
||||
"no-implied-eval": [ "warn" ],
|
||||
"no-iterator": [ "error" ],
|
||||
"no-lone-blocks": [ "warn" ],
|
||||
"no-loop-func": [ "warn" ],
|
||||
"no-multi-spaces": [ "warn" ],
|
||||
"no-multi-str": [ "warn" ],
|
||||
"no-native-reassign": [ "warn" ],
|
||||
"no-new-func": [ "warn" ],
|
||||
"no-new-wrappers": [ "warn" ],
|
||||
"no-octal": [ "warn" ],
|
||||
"no-octal-escape": [ "warn" ],
|
||||
"no-param-reassign": [ "warn" ],
|
||||
"no-proto": [ "error" ],
|
||||
"no-redeclare": [ "warn", { "builtinGlobals": true } ],
|
||||
"no-return-assign": [ "warn" ],
|
||||
"no-script-url": [ "warn" ],
|
||||
"no-self-assign": [ "warn" ],
|
||||
"no-self-compare": [ "warn" ],
|
||||
"no-sequences": [ "warn" ],
|
||||
"no-throw-literal": [ "warn" ],
|
||||
"no-unused-expressions": [ "warn" ],
|
||||
"no-unused-labels": [ "warn" ],
|
||||
"no-useless-call": [ "warn" ],
|
||||
"no-useless-concat": [ "warn" ],
|
||||
"no-void": [ "warn" ],
|
||||
"no-with": [ "warn" ],
|
||||
"radix": [ "warn" ],
|
||||
"vars-on-top": [ "warn" ],
|
||||
"wrap-iife": [ "warn" ],
|
||||
"yoda": [ "warn" ],
|
||||
"array-bracket-spacing": [ "warn", "always" ],
|
||||
"block-spacing": [ "warn" ],
|
||||
"brace-style": [ "warn", "1tbs", { "allowSingleLine": true } ],
|
||||
"comma-spacing": [ "warn" ],
|
||||
"comma-style": [ "warn" ],
|
||||
"computed-property-spacing": [ "warn" ],
|
||||
"indent": [ "warn", 4, { "SwitchCase": 1 } ],
|
||||
"key-spacing": [ "warn" ],
|
||||
"keyword-spacing": [ "warn" ],
|
||||
"linebreak-style": [ "warn" ],
|
||||
"newline-after-var": [ "warn" ],
|
||||
"no-lonely-if": [ "warn" ],
|
||||
"no-multiple-empty-lines": [ "warn", { "max": 1 } ],
|
||||
"no-spaced-func": [ "warn" ],
|
||||
"no-unneeded-ternary": [ "warn" ],
|
||||
"no-whitespace-before-property": [ "warn" ],
|
||||
"object-curly-spacing": [ "warn", "always" ],
|
||||
"padded-blocks": [ "warn", "never" ],
|
||||
"quotes": [ "warn" ],
|
||||
"semi": [ "warn" ],
|
||||
"semi-spacing": [ "warn" ],
|
||||
"space-before-blocks": [ "warn" ],
|
||||
"space-before-function-paren": [ "warn", "never" ],
|
||||
"space-in-parens": [ "warn" ],
|
||||
"space-infix-ops": [ "warn" ],
|
||||
"space-unary-ops": [ "warn" ],
|
||||
"spaced-comment": [ "warn" ],
|
||||
"wrap-regex": [ "warn" ]
|
||||
}
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint",
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module"
|
||||
},
|
||||
|
||||
"extends": [
|
||||
"plugin:vue/essential"
|
||||
],
|
||||
|
||||
"rules": {
|
||||
"strict": 0,
|
||||
"comma-dangle": [ "warn" ],
|
||||
"no-cond-assign": [ "warn" ],
|
||||
"no-dupe-args": [ "error" ],
|
||||
"no-dupe-keys": [ "error" ],
|
||||
"no-duplicate-case": [ "error" ],
|
||||
"no-empty": [ "warn" ],
|
||||
"no-empty-character-class": [ "warn" ],
|
||||
"no-ex-assign": [ "error" ],
|
||||
"no-extra-boolean-cast": [ "warn" ],
|
||||
"no-extra-parens": [ "warn" ],
|
||||
"no-extra-semi": [ "warn" ],
|
||||
"no-func-assign": [ "error" ],
|
||||
"no-invalid-regexp": [ "error" ],
|
||||
"no-irregular-whitespace": [ "error" ],
|
||||
"no-negated-in-lhs": [ "warn" ],
|
||||
"no-obj-calls": [ "error" ],
|
||||
"no-regex-spaces": [ "warn" ],
|
||||
"no-sparse-arrays": [ "warn" ],
|
||||
"no-unexpected-multiline": [ "warn" ],
|
||||
"no-unreachable": [ "warn" ],
|
||||
"no-unsafe-finally": [ "warn" ],
|
||||
"use-isnan": [ "warn" ],
|
||||
"valid-typeof": [ "error" ],
|
||||
"curly": [ "warn" ],
|
||||
"dot-location": [ "warn", "property" ],
|
||||
"eqeqeq": [ "warn", "smart" ],
|
||||
"guard-for-in": [ "warn" ],
|
||||
"no-alert": [ "warn" ],
|
||||
"no-case-declarations": [ "warn" ],
|
||||
"no-div-regex": [ "warn" ],
|
||||
"no-empty-function": [ "warn" ],
|
||||
"no-empty-pattern": [ "warn" ],
|
||||
"no-eq-null": [ "warn" ],
|
||||
"no-eval": [ "warn" ],
|
||||
"no-extend-native": [ "warn" ],
|
||||
"no-extra-bind": [ "warn" ],
|
||||
"no-extra-label": [ "warn" ],
|
||||
"no-floating-decimal": [ "warn" ],
|
||||
"no-implicit-coercion": [ "warn" ],
|
||||
"no-implied-eval": [ "warn" ],
|
||||
"no-iterator": [ "error" ],
|
||||
"no-lone-blocks": [ "warn" ],
|
||||
"no-loop-func": [ "warn" ],
|
||||
"no-multi-spaces": [ "warn" ],
|
||||
"no-multi-str": [ "warn" ],
|
||||
"no-native-reassign": [ "warn" ],
|
||||
"no-new-func": [ "warn" ],
|
||||
"no-new-wrappers": [ "warn" ],
|
||||
"no-octal": [ "warn" ],
|
||||
"no-octal-escape": [ "warn" ],
|
||||
"no-param-reassign": [ "warn" ],
|
||||
"no-proto": [ "error" ],
|
||||
"no-redeclare": [ "warn", { "builtinGlobals": true } ],
|
||||
"no-return-assign": [ "warn" ],
|
||||
"no-script-url": [ "warn" ],
|
||||
"no-self-assign": [ "warn" ],
|
||||
"no-self-compare": [ "warn" ],
|
||||
"no-sequences": [ "warn" ],
|
||||
"no-throw-literal": [ "warn" ],
|
||||
"no-unused-expressions": [ "warn" ],
|
||||
"no-unused-labels": [ "warn" ],
|
||||
"no-useless-call": [ "warn" ],
|
||||
"no-useless-concat": [ "warn" ],
|
||||
"no-void": [ "warn" ],
|
||||
"no-with": [ "warn" ],
|
||||
"radix": [ "warn" ],
|
||||
"vars-on-top": [ "warn" ],
|
||||
"wrap-iife": [ "warn" ],
|
||||
"yoda": [ "warn" ],
|
||||
"array-bracket-spacing": [ "warn", "always" ],
|
||||
"block-spacing": [ "warn" ],
|
||||
"brace-style": [ "warn", "1tbs", { "allowSingleLine": true } ],
|
||||
"comma-spacing": [ "warn" ],
|
||||
"comma-style": [ "warn" ],
|
||||
"computed-property-spacing": [ "warn" ],
|
||||
"indent": [ "warn", 4, { "SwitchCase": 1 } ],
|
||||
"key-spacing": [ "warn" ],
|
||||
"keyword-spacing": [ "warn" ],
|
||||
"linebreak-style": [ "warn" ],
|
||||
"newline-after-var": [ "warn" ],
|
||||
"no-lonely-if": [ "warn" ],
|
||||
"no-multiple-empty-lines": [ "warn", { "max": 1 } ],
|
||||
"no-spaced-func": [ "warn" ],
|
||||
"no-unneeded-ternary": [ "warn" ],
|
||||
"no-whitespace-before-property": [ "warn" ],
|
||||
"object-curly-spacing": [ "warn", "always" ],
|
||||
"padded-blocks": [ "warn", "never" ],
|
||||
"quotes": [ "warn" ],
|
||||
"semi": [ "warn" ],
|
||||
"semi-spacing": [ "warn" ],
|
||||
"space-before-blocks": [ "warn" ],
|
||||
"space-before-function-paren": [ "warn", "never" ],
|
||||
"space-in-parens": [ "warn" ],
|
||||
"space-infix-ops": [ "warn" ],
|
||||
"space-unary-ops": [ "warn" ],
|
||||
"spaced-comment": [ "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