matrix-public-archive/.eslintrc.json

93 lines
2.2 KiB
JSON

{
"env": {
"es6": true,
"commonjs": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "script"
},
"plugins": ["node"],
"extends": ["eslint:recommended", "prettier"],
"rules": {
"indent": "off",
"comma-dangle": "off",
"quotes": "off",
"eqeqeq": ["warn", "allow-null"],
"strict": ["error", "safe"],
"no-unused-vars": ["error"],
"no-extra-boolean-cast": ["warn"],
"complexity": [
"error",
{
"max": 12
}
],
"max-statements-per-line": [
"error",
{
"max": 3
}
],
"no-debugger": "error",
"no-dupe-keys": "error",
"no-unsafe-finally": "error",
"no-with": "error",
"no-useless-call": "error",
"no-spaced-func": "error",
"no-useless-escape": "warn",
"max-statements": ["warn", 30],
"max-depth": ["error", 4],
"no-throw-literal": ["error"],
"no-sequences": "error",
"no-warning-comments": [
"warn",
{
"terms": ["fixme", "xxx"],
"location": "anywhere"
}
],
"radix": "error",
"yoda": "error",
"no-nested-ternary": "warn",
"no-whitespace-before-property": "error",
"no-trailing-spaces": ["error"],
"space-in-parens": ["warn", "never"],
"max-nested-callbacks": ["error", 6],
"eol-last": "warn",
"no-mixed-spaces-and-tabs": "error",
"no-negated-condition": "warn",
"no-unneeded-ternary": "error",
"no-use-before-define": ["warn", { "variables": true, "functions": true, "classes": true }],
"no-undef": "error",
"no-param-reassign": "warn",
"no-multi-spaces": [
"warn",
{
"exceptions": {
"Property": true
}
}
],
"key-spacing": [
"warn",
{
"singleLine": {
"beforeColon": false,
"afterColon": true
},
"multiLine": {
"beforeColon": false,
"afterColon": true,
"mode": "minimum"
}
}
],
"node/no-missing-require": "error",
"node/no-missing-import": "error",
"node/no-unsupported-features/es-syntax": "error",
"node/no-unsupported-features/es-builtins": "error"
}
}