|
|
@ -22,40 +22,45 @@ module.exports = {
|
|
|
|
requireConfigFile: false,
|
|
|
|
requireConfigFile: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
"linebreak-style": ["error", "unix"],
|
|
|
|
"linebreak-style": [ "error", "unix" ],
|
|
|
|
"camelcase": ["warn", {
|
|
|
|
"camelcase": [ "warn", {
|
|
|
|
"properties": "never",
|
|
|
|
"properties": "never",
|
|
|
|
"ignoreImports": true
|
|
|
|
"ignoreImports": true
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
"no-unused-vars": ["warn", {
|
|
|
|
"no-unused-vars": [ "warn", {
|
|
|
|
"args": "none"
|
|
|
|
"args": "none"
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
indent: [
|
|
|
|
indent: [
|
|
|
|
"error",
|
|
|
|
"error",
|
|
|
|
4,
|
|
|
|
4,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ignoredNodes: ["TemplateLiteral"],
|
|
|
|
ignoredNodes: [ "TemplateLiteral" ],
|
|
|
|
SwitchCase: 1,
|
|
|
|
SwitchCase: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
quotes: ["warn", "double"],
|
|
|
|
quotes: [ "warn", "double" ],
|
|
|
|
semi: "error",
|
|
|
|
semi: "error",
|
|
|
|
"vue/html-indent": ["warn", 4], // default: 2
|
|
|
|
"vue/html-indent": [ "warn", 4 ], // default: 2
|
|
|
|
"vue/max-attributes-per-line": "off",
|
|
|
|
"vue/max-attributes-per-line": "off",
|
|
|
|
"vue/singleline-html-element-content-newline": "off",
|
|
|
|
"vue/singleline-html-element-content-newline": "off",
|
|
|
|
"vue/html-self-closing": "off",
|
|
|
|
"vue/html-self-closing": "off",
|
|
|
|
"vue/require-component-is": "off", // not allow is="style" https://github.com/vuejs/eslint-plugin-vue/issues/462#issuecomment-430234675
|
|
|
|
"vue/require-component-is": "off", // not allow is="style" https://github.com/vuejs/eslint-plugin-vue/issues/462#issuecomment-430234675
|
|
|
|
"vue/attribute-hyphenation": "off", // This change noNL to "no-n-l" unexpectedly
|
|
|
|
"vue/attribute-hyphenation": "off", // This change noNL to "no-n-l" unexpectedly
|
|
|
|
"no-multi-spaces": ["error", {
|
|
|
|
"no-multi-spaces": [ "error", {
|
|
|
|
ignoreEOLComments: true,
|
|
|
|
ignoreEOLComments: true,
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
"space-before-function-paren": ["error", {
|
|
|
|
"array-bracket-spacing": [ "warn", "always", {
|
|
|
|
|
|
|
|
"singleValue": true,
|
|
|
|
|
|
|
|
"objectsInArrays": false,
|
|
|
|
|
|
|
|
"arraysInArrays": false
|
|
|
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
"space-before-function-paren": [ "error", {
|
|
|
|
"anonymous": "always",
|
|
|
|
"anonymous": "always",
|
|
|
|
"named": "never",
|
|
|
|
"named": "never",
|
|
|
|
"asyncArrow": "always"
|
|
|
|
"asyncArrow": "always"
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
"curly": "error",
|
|
|
|
"curly": "error",
|
|
|
|
"object-curly-spacing": ["error", "always"],
|
|
|
|
"object-curly-spacing": [ "error", "always" ],
|
|
|
|
"object-curly-newline": "off",
|
|
|
|
"object-curly-newline": "off",
|
|
|
|
"object-property-newline": "error",
|
|
|
|
"object-property-newline": "error",
|
|
|
|
"comma-spacing": "error",
|
|
|
|
"comma-spacing": "error",
|
|
|
@ -66,36 +71,36 @@ module.exports = {
|
|
|
|
"space-infix-ops": "warn",
|
|
|
|
"space-infix-ops": "warn",
|
|
|
|
"arrow-spacing": "warn",
|
|
|
|
"arrow-spacing": "warn",
|
|
|
|
"no-trailing-spaces": "warn",
|
|
|
|
"no-trailing-spaces": "warn",
|
|
|
|
"no-constant-condition": ["error", {
|
|
|
|
"no-constant-condition": [ "error", {
|
|
|
|
"checkLoops": false,
|
|
|
|
"checkLoops": false,
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
"space-before-blocks": "warn",
|
|
|
|
"space-before-blocks": "warn",
|
|
|
|
//'no-console': 'warn',
|
|
|
|
//'no-console': 'warn',
|
|
|
|
"no-extra-boolean-cast": "off",
|
|
|
|
"no-extra-boolean-cast": "off",
|
|
|
|
"no-multiple-empty-lines": ["warn", {
|
|
|
|
"no-multiple-empty-lines": [ "warn", {
|
|
|
|
"max": 1,
|
|
|
|
"max": 1,
|
|
|
|
"maxBOF": 0,
|
|
|
|
"maxBOF": 0,
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
"lines-between-class-members": ["warn", "always", {
|
|
|
|
"lines-between-class-members": [ "warn", "always", {
|
|
|
|
exceptAfterSingleLine: true,
|
|
|
|
exceptAfterSingleLine: true,
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
"no-unneeded-ternary": "error",
|
|
|
|
"no-unneeded-ternary": "error",
|
|
|
|
"array-bracket-newline": ["error", "consistent"],
|
|
|
|
"array-bracket-newline": [ "error", "consistent" ],
|
|
|
|
"eol-last": ["error", "always"],
|
|
|
|
"eol-last": [ "error", "always" ],
|
|
|
|
//'prefer-template': 'error',
|
|
|
|
//'prefer-template': 'error',
|
|
|
|
"comma-dangle": ["warn", "only-multiline"],
|
|
|
|
"comma-dangle": [ "warn", "only-multiline" ],
|
|
|
|
"no-empty": ["error", {
|
|
|
|
"no-empty": [ "error", {
|
|
|
|
"allowEmptyCatch": true
|
|
|
|
"allowEmptyCatch": true
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
"no-control-regex": "off",
|
|
|
|
"no-control-regex": "off",
|
|
|
|
"one-var": ["error", "never"],
|
|
|
|
"one-var": [ "error", "never" ],
|
|
|
|
"max-statements-per-line": ["error", { "max": 1 }]
|
|
|
|
"max-statements-per-line": [ "error", { "max": 1 }]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"overrides": [
|
|
|
|
"overrides": [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"files": [ "src/languages/*.js", "src/icon.js" ],
|
|
|
|
"files": [ "src/languages/*.js", "src/icon.js" ],
|
|
|
|
"rules": {
|
|
|
|
"rules": {
|
|
|
|
"comma-dangle": ["error", "always-multiline"],
|
|
|
|
"comma-dangle": [ "error", "always-multiline" ],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|