forked from internetarchive/bookreader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
49 lines (49 loc) · 1.44 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
module.exports = {
"env": {
"browser": true,
"jquery": true,
"es6": true,
"node": true,
"jest": true
},
"plugins": [
"testcafe"
],
"extends": [
"eslint:recommended",
"plugin:testcafe/recommended"
],
"globals": {
// Browser API
"MediaMetadata": "readonly"
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
"comma-dangle": ["error", "only-multiline"],
"space-before-blocks": ["error"],
"keyword-spacing": [2, {"before": true, "after": true}],
"indent": ["error", 2],
"no-console": "off", // Used too often behind `debug` options; not dealing with this now
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-trailing-spaces": ["error"],
"no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": false }], // set args:none; this is generally more annoying than useful
"no-var": ["error"],
"prefer-const": ["error"],
"space-infix-ops": ["error", { "int32Hint": false }],
"eol-last": ["error", "always"]
},
"overrides": [
{ // TODO; these should be cleaned up as well
"files": [
"src/js/BookReader.js",
"src/js/dragscrollable-br.js"
],
"rules": {
"no-var": ["off"],
}
},
],
};