update eslint config

This commit is contained in:
Emily 2020-10-17 15:59:10 +11:00
parent 7e140d1ce8
commit 27c06e1739
1 changed files with 27 additions and 52 deletions

View File

@ -1,54 +1,29 @@
{ {
"parserOptions": {
"ecmaVersion": 2018
},
"env": { "env": {
"es6": true, "commonjs": true,
"es2021": true,
"node": true "node": true
}, },
"extends": "eslint:recommended", "extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 12
},
"rules": { "rules": {
"no-console": "off",
"indent": [ "indent": [
"error", "error",
2, 4
{ ],
"SwitchCase": 1 "linebreak-style": [
} "error",
"unix"
], ],
"quotes": [ "quotes": [
"warn", "error",
"double" "single"
], ],
"semi": [ "semi": [
"warn", "error",
"always" "always"
],
"keyword-spacing": [
"error", {
"before": true,
"after": true
}
],
"space-before-blocks": [
"error", {
"functions":"always",
"keywords": "always",
"classes": "always"
}
],
"space-before-function-paren": [
"error", {
"anonymous": "always",
"named": "always",
"asyncArrow": "always"
}
],
"prefer-const": [
"error", {
"destructuring": "any",
"ignoreReadBeforeAssign": false
}
] ]
} }
} }