2021-07-27 10:33:44 -07:00
|
|
|
module.exports = {
|
2021-09-15 11:52:39 -07:00
|
|
|
root: true,
|
2021-07-27 10:33:44 -07:00
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
commonjs: true,
|
2021-07-29 04:23:10 -07:00
|
|
|
es2020: true,
|
2021-07-27 10:33:44 -07:00
|
|
|
node: true,
|
|
|
|
},
|
|
|
|
extends: [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:vue/vue3-recommended",
|
|
|
|
],
|
2021-07-30 23:46:57 -07:00
|
|
|
parser: "vue-eslint-parser",
|
2021-07-27 10:33:44 -07:00
|
|
|
parserOptions: {
|
2021-07-30 23:46:57 -07:00
|
|
|
parser: "@babel/eslint-parser",
|
2021-07-27 10:33:44 -07:00
|
|
|
sourceType: "module",
|
2021-07-29 21:27:54 -07:00
|
|
|
requireConfigFile: false,
|
2021-07-27 10:33:44 -07:00
|
|
|
},
|
|
|
|
rules: {
|
2021-09-19 04:04:51 -07:00
|
|
|
"linebreak-style": ["error", "unix"],
|
2021-08-24 10:25:57 -07:00
|
|
|
"camelcase": ["warn", {
|
2021-09-07 07:42:46 -07:00
|
|
|
"properties": "never",
|
|
|
|
"ignoreImports": true
|
2021-08-24 10:25:57 -07:00
|
|
|
}],
|
2021-07-27 10:33:44 -07:00
|
|
|
// override/add rules settings here, such as:
|
|
|
|
// 'vue/no-unused-vars': 'error'
|
2021-07-28 05:52:49 -07:00
|
|
|
"no-unused-vars": "warn",
|
2021-07-29 04:33:45 -07:00
|
|
|
indent: [
|
|
|
|
"error",
|
|
|
|
4,
|
|
|
|
{
|
|
|
|
ignoredNodes: ["TemplateLiteral"],
|
|
|
|
SwitchCase: 1,
|
|
|
|
},
|
|
|
|
],
|
2021-07-27 10:33:44 -07:00
|
|
|
quotes: ["warn", "double"],
|
2021-09-16 07:57:34 -07:00
|
|
|
semi: "warn",
|
2021-07-27 10:33:44 -07:00
|
|
|
"vue/html-indent": ["warn", 4], // default: 2
|
|
|
|
"vue/max-attributes-per-line": "off",
|
2021-07-28 10:01:55 -07:00
|
|
|
"vue/singleline-html-element-content-newline": "off",
|
2021-07-31 03:31:17 -07:00
|
|
|
"vue/html-self-closing": "off",
|
2021-09-14 23:34:30 -07:00
|
|
|
"vue/attribute-hyphenation": "off", // This change noNL to "no-n-l" unexpectedly
|
2021-07-27 10:33:44 -07:00
|
|
|
"no-multi-spaces": ["error", {
|
|
|
|
ignoreEOLComments: true,
|
|
|
|
}],
|
2021-08-10 06:59:15 -07:00
|
|
|
"space-before-function-paren": ["error", {
|
|
|
|
"anonymous": "always",
|
|
|
|
"named": "never",
|
|
|
|
"asyncArrow": "always"
|
|
|
|
}],
|
2021-07-27 10:33:44 -07:00
|
|
|
"curly": "error",
|
|
|
|
"object-curly-spacing": ["error", "always"],
|
2021-07-30 07:11:14 -07:00
|
|
|
"object-curly-newline": "off",
|
2021-07-27 10:33:44 -07: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",
|
2021-07-30 00:13:51 -07:00
|
|
|
"no-constant-condition": ["error", {
|
|
|
|
"checkLoops": false,
|
|
|
|
}],
|
2021-07-27 10:33:44 -07:00
|
|
|
"space-before-blocks": "warn",
|
|
|
|
//'no-console': 'warn',
|
|
|
|
"no-extra-boolean-cast": "off",
|
|
|
|
"no-multiple-empty-lines": ["warn", {
|
|
|
|
"max": 1,
|
|
|
|
"maxBOF": 0,
|
|
|
|
}],
|
|
|
|
"lines-between-class-members": ["warn", "always", {
|
|
|
|
exceptAfterSingleLine: true,
|
|
|
|
}],
|
|
|
|
"no-unneeded-ternary": "error",
|
|
|
|
"array-bracket-newline": ["error", "consistent"],
|
|
|
|
"eol-last": ["error", "always"],
|
|
|
|
//'prefer-template': 'error',
|
2021-07-31 05:42:51 -07:00
|
|
|
"comma-dangle": ["warn", "only-multiline"],
|
2021-08-21 04:45:29 -07:00
|
|
|
"no-empty": ["error", {
|
|
|
|
"allowEmptyCatch": true
|
|
|
|
}],
|
2021-08-31 07:08:05 -07:00
|
|
|
"no-control-regex": "off",
|
|
|
|
"one-var": ["error", "never"],
|
|
|
|
"max-statements-per-line": ["error", { "max": 1 }]
|
2021-07-27 10:33:44 -07:00
|
|
|
},
|
2021-09-12 09:58:45 -07:00
|
|
|
"overrides": [
|
|
|
|
{
|
2021-09-14 23:34:30 -07:00
|
|
|
"files": [ "src/languages/*.js", "src/icon.js" ],
|
2021-09-12 09:58:45 -07:00
|
|
|
"rules": {
|
|
|
|
"comma-dangle": ["error", "always-multiline"],
|
|
|
|
}
|
2021-10-03 03:16:55 -07: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 09:58:45 -07:00
|
|
|
}
|
|
|
|
]
|
2021-09-16 07:57:34 -07:00
|
|
|
};
|