Added eslint. To lint, npm run lint.
Linted the entire project. Using different rules for the script files as there are a lot of undefined variables just because of the way the DOM's global scope works. Mostly just code cleanup, however the linter did catch a minor bug with a settings regex. That has been corrected.
This commit is contained in:
47
.eslintrc.scripts.json
Normal file
47
.eslintrc.scripts.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2017,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"indent": [
|
||||
"error",
|
||||
4,
|
||||
{
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"windows"
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"no-var": [
|
||||
"error"
|
||||
],
|
||||
"no-console": [
|
||||
0
|
||||
],
|
||||
"no-control-regex": [
|
||||
0
|
||||
],
|
||||
"no-unused-vars": [
|
||||
0
|
||||
],
|
||||
"no-undef": [
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user