uptime-kuma/.eslintrc.js

114 lines
3.3 KiB
JavaScript
Raw Normal View History

2021-07-27 18:33:44 +01:00
module.exports = {
root: true,
2021-07-27 18:33:44 +01:00
env: {
browser: true,
commonjs: true,
2021-07-29 12:23:10 +01:00
es2020: true,
2021-07-27 18:33:44 +01:00
node: true,
},
extends: [
"eslint:recommended",
"plugin:vue/vue3-recommended",
],
parser: "vue-eslint-parser",
2021-07-27 18:33:44 +01:00
parserOptions: {
parser: "@babel/eslint-parser",
2021-07-27 18:33:44 +01:00
sourceType: "module",
requireConfigFile: false,
2021-07-27 18:33:44 +01:00
},
rules: {
"linebreak-style": ["error", "unix"],
"camelcase": ["warn", {
2021-09-07 15:42:46 +01:00
"properties": "never",
"ignoreImports": true
}],
2021-07-27 18:33:44 +01:00
// override/add rules settings here, such as:
// 'vue/no-unused-vars': 'error'
"no-unused-vars": "warn",
2021-07-29 12:33:45 +01:00
indent: [
"error",
4,
{
ignoredNodes: ["TemplateLiteral"],
SwitchCase: 1,
},
],
2021-07-27 18:33:44 +01:00
quotes: ["warn", "double"],
semi: "warn",
2021-07-27 18:33:44 +01:00
"vue/html-indent": ["warn", 4], // default: 2
"vue/max-attributes-per-line": "off",
"vue/singleline-html-element-content-newline": "off",
"vue/html-self-closing": "off",
2021-09-15 07:34:30 +01:00
"vue/attribute-hyphenation": "off", // This change noNL to "no-n-l" unexpectedly
2021-07-27 18:33:44 +01:00
"no-multi-spaces": ["error", {
ignoreEOLComments: true,
}],
2021-08-10 14:59:15 +01:00
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}],
2021-07-27 18:33:44 +01:00
"curly": "error",
"object-curly-spacing": ["error", "always"],
"object-curly-newline": "off",
2021-07-27 18:33:44 +01: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 08:13:51 +01:00
"no-constant-condition": ["error", {
"checkLoops": false,
}],
2021-07-27 18:33:44 +01: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',
"comma-dangle": ["warn", "only-multiline"],
2021-08-21 12:45:29 +01:00
"no-empty": ["error", {
"allowEmptyCatch": true
}],
"no-control-regex": "off",
"one-var": ["error", "never"],
"max-statements-per-line": ["error", { "max": 1 }]
2021-07-27 18:33:44 +01:00
},
"overrides": [
{
2021-09-15 07:34:30 +01:00
"files": [ "src/languages/*.js", "src/icon.js" ],
"rules": {
"comma-dangle": ["error", "always-multiline"],
}
2021-10-03 11:16:55 +01:00
},
// Override for jest puppeteer
{
"files": [
"**/*.spec.js",
"**/*.spec.jsx"
],
env: {
jest: true,
},
globals: {
page: true,
browser: true,
context: true,
jestPuppeteer: true,
},
}
]
};