2021-07-27 12:33:44 -05:00
|
|
|
module.exports = {
|
2022-04-13 11:30:32 -05:00
|
|
|
ignorePatterns: [
|
|
|
|
"test/*",
|
|
|
|
"server/modules/apicache/*",
|
|
|
|
"src/util.js"
|
|
|
|
],
|
2021-09-15 13:52:39 -05:00
|
|
|
root: true,
|
2021-07-27 12:33:44 -05:00
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
commonjs: true,
|
2021-07-29 06:23:10 -05:00
|
|
|
es2020: true,
|
2021-07-27 12:33:44 -05:00
|
|
|
node: true,
|
|
|
|
},
|
|
|
|
extends: [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:vue/vue3-recommended",
|
|
|
|
],
|
2021-07-31 01:46:57 -05:00
|
|
|
parser: "vue-eslint-parser",
|
2021-07-27 12:33:44 -05:00
|
|
|
parserOptions: {
|
2021-07-31 01:46:57 -05:00
|
|
|
parser: "@babel/eslint-parser",
|
2021-07-27 12:33:44 -05:00
|
|
|
sourceType: "module",
|
2021-07-29 23:27:54 -05:00
|
|
|
requireConfigFile: false,
|
2021-07-27 12:33:44 -05:00
|
|
|
},
|
|
|
|
rules: {
|
2022-04-17 02:27:35 -05:00
|
|
|
"linebreak-style": [ "error", "unix" ],
|
|
|
|
"camelcase": [ "warn", {
|
2021-09-07 09:42:46 -05:00
|
|
|
"properties": "never",
|
|
|
|
"ignoreImports": true
|
2021-08-24 12:25:57 -05:00
|
|
|
}],
|
2022-04-17 02:27:35 -05:00
|
|
|
"no-unused-vars": [ "warn", {
|
2022-04-16 12:39:49 -05:00
|
|
|
"args": "none"
|
|
|
|
}],
|
2021-07-29 06:33:45 -05:00
|
|
|
indent: [
|
|
|
|
"error",
|
|
|
|
4,
|
|
|
|
{
|
2022-04-17 02:27:35 -05:00
|
|
|
ignoredNodes: [ "TemplateLiteral" ],
|
2021-07-29 06:33:45 -05:00
|
|
|
SwitchCase: 1,
|
|
|
|
},
|
|
|
|
],
|
2022-04-17 02:27:35 -05:00
|
|
|
quotes: [ "warn", "double" ],
|
2022-04-13 11:30:32 -05:00
|
|
|
semi: "error",
|
2022-04-17 02:27:35 -05:00
|
|
|
"vue/html-indent": [ "warn", 4 ], // default: 2
|
2021-07-27 12:33:44 -05:00
|
|
|
"vue/max-attributes-per-line": "off",
|
2021-07-28 12:01:55 -05:00
|
|
|
"vue/singleline-html-element-content-newline": "off",
|
2021-07-31 05:31:17 -05:00
|
|
|
"vue/html-self-closing": "off",
|
2022-04-12 07:23:11 -05:00
|
|
|
"vue/require-component-is": "off", // not allow is="style" https://github.com/vuejs/eslint-plugin-vue/issues/462#issuecomment-430234675
|
2021-09-15 01:34:30 -05:00
|
|
|
"vue/attribute-hyphenation": "off", // This change noNL to "no-n-l" unexpectedly
|
2022-04-17 02:27:35 -05:00
|
|
|
"no-multi-spaces": [ "error", {
|
2021-07-27 12:33:44 -05:00
|
|
|
ignoreEOLComments: true,
|
|
|
|
}],
|
2022-04-17 02:27:35 -05:00
|
|
|
"array-bracket-spacing": [ "warn", "always", {
|
|
|
|
"singleValue": true,
|
|
|
|
"objectsInArrays": false,
|
|
|
|
"arraysInArrays": false
|
|
|
|
}],
|
|
|
|
"space-before-function-paren": [ "error", {
|
2021-08-10 08:59:15 -05:00
|
|
|
"anonymous": "always",
|
|
|
|
"named": "never",
|
|
|
|
"asyncArrow": "always"
|
|
|
|
}],
|
2021-07-27 12:33:44 -05:00
|
|
|
"curly": "error",
|
2022-04-17 02:27:35 -05:00
|
|
|
"object-curly-spacing": [ "error", "always" ],
|
2021-07-30 09:11:14 -05:00
|
|
|
"object-curly-newline": "off",
|
2021-07-27 12:33:44 -05:00
|
|
|
"object-property-newline": "error",
|
|
|
|
"comma-spacing": "error",
|
|
|
|
"brace-style": "error",
|
|
|
|
"no-var": "error",
|
|
|
|
"key-spacing": "warn",
|
|
|
|
"keyword-spacing": "warn",
|
|
|
|
"space-infix-ops": "warn",
|
|
|
|
"arrow-spacing": "warn",
|
|
|
|
"no-trailing-spaces": "warn",
|
2022-04-17 02:27:35 -05:00
|
|
|
"no-constant-condition": [ "error", {
|
2021-07-30 02:13:51 -05:00
|
|
|
"checkLoops": false,
|
|
|
|
}],
|
2021-07-27 12:33:44 -05:00
|
|
|
"space-before-blocks": "warn",
|
|
|
|
//'no-console': 'warn',
|
|
|
|
"no-extra-boolean-cast": "off",
|
2022-04-17 02:27:35 -05:00
|
|
|
"no-multiple-empty-lines": [ "warn", {
|
2021-07-27 12:33:44 -05:00
|
|
|
"max": 1,
|
|
|
|
"maxBOF": 0,
|
|
|
|
}],
|
2022-04-17 02:27:35 -05:00
|
|
|
"lines-between-class-members": [ "warn", "always", {
|
2021-07-27 12:33:44 -05:00
|
|
|
exceptAfterSingleLine: true,
|
|
|
|
}],
|
|
|
|
"no-unneeded-ternary": "error",
|
2022-04-17 02:27:35 -05:00
|
|
|
"array-bracket-newline": [ "error", "consistent" ],
|
|
|
|
"eol-last": [ "error", "always" ],
|
2021-07-27 12:33:44 -05:00
|
|
|
//'prefer-template': 'error',
|
2022-04-17 02:27:35 -05:00
|
|
|
"comma-dangle": [ "warn", "only-multiline" ],
|
|
|
|
"no-empty": [ "error", {
|
2021-08-21 06:45:29 -05:00
|
|
|
"allowEmptyCatch": true
|
|
|
|
}],
|
2021-08-31 09:08:05 -05:00
|
|
|
"no-control-regex": "off",
|
2022-04-17 02:27:35 -05:00
|
|
|
"one-var": [ "error", "never" ],
|
|
|
|
"max-statements-per-line": [ "error", { "max": 1 }]
|
2021-07-27 12:33:44 -05:00
|
|
|
},
|
2021-09-12 11:58:45 -05:00
|
|
|
"overrides": [
|
|
|
|
{
|
2021-09-15 01:34:30 -05:00
|
|
|
"files": [ "src/languages/*.js", "src/icon.js" ],
|
2021-09-12 11:58:45 -05:00
|
|
|
"rules": {
|
2022-04-17 02:27:35 -05:00
|
|
|
"comma-dangle": [ "error", "always-multiline" ],
|
2021-09-12 11:58:45 -05:00
|
|
|
}
|
2021-10-03 05:16:55 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
// Override for jest puppeteer
|
|
|
|
{
|
|
|
|
"files": [
|
|
|
|
"**/*.spec.js",
|
|
|
|
"**/*.spec.jsx"
|
|
|
|
],
|
|
|
|
env: {
|
|
|
|
jest: true,
|
|
|
|
},
|
|
|
|
globals: {
|
|
|
|
page: true,
|
|
|
|
browser: true,
|
|
|
|
context: true,
|
|
|
|
jestPuppeteer: true,
|
|
|
|
},
|
2021-09-12 11:58:45 -05:00
|
|
|
}
|
|
|
|
]
|
2021-09-16 09:57:34 -05:00
|
|
|
};
|