Add .eslintrc.json

And fix issues
This commit is contained in:
John Factotum
2022-11-04 14:12:07 +00:00
committed by GitHub
parent a9805d3e63
commit 2b51522c43
4 changed files with 29 additions and 5 deletions
+24
View File
@@ -0,0 +1,24 @@
{
"root": true,
"env": {
"es2022": true,
"browser": true
},
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"extends": "eslint:recommended",
"rules": {
"semi": ["error", "never"],
"indent": ["warn", 4, { "flatTernaryExpressions": true, "SwitchCase": 1 }],
"quotes": ["warn", "single"],
"comma-dangle": ["warn", "always-multiline"],
"no-trailing-spaces": "warn",
"no-unused-vars": "warn",
"no-console": ["warn", { "allow": ["debug", "warn", "error", "assert"] }],
"no-constant-condition": ["error", { "checkLoops": false }],
"no-empty": ["error", { "allowEmptyCatch": true }]
},
"reportUnusedDisableDirectives": true
}