-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.json
69 lines (69 loc) · 1.75 KB
/
.eslintrc.json
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Based on Odoo's .eslintrc.js
{
"extends": ["eslint:recommended", "plugin:prettier/recommended", "plugin:node/recommended"],
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"env": {
"node": true,
"browser": false,
"es2022": true
},
"overrides": [
{
"files": ["tests/utils/*.js", "tests/*.js"],
"plugins": ["jest", "import"],
"env": {
"jest": true,
"jest/globals": true
},
"extends": ["plugin:jest/recommended"]
},
{
"files": ["src/client.js"],
"env": {
"browser": true,
"node": false
}
},
{
"files": ["src/shared/*.js"],
"env": {
"browser": true,
"node": true
}
}
],
"ignorePatterns": "dist/*",
"rules": {
"prettier/prettier": ["error", {
"tabWidth": 4,
"semi": true,
"singleQuote": false,
"printWidth": 100,
"endOfLine": "auto"
}],
"node/no-unsupported-features/es-syntax": "off",
"node/no-missing-import": "off",
"no-console": "error",
"no-undef": "error",
"no-restricted-globals": ["error", "event", "self"],
"no-const-assign": ["error"],
"no-debugger": ["error"],
"no-dupe-class-members": ["error"],
"no-dupe-keys": ["error"],
"no-dupe-args": ["error"],
"no-dupe-else-if": ["error"],
"no-unsafe-negation": ["error"],
"no-duplicate-imports": ["error"],
"valid-typeof": ["error"],
"no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": false, "caughtErrors": "all" }],
"curly": ["error", "all"],
"no-restricted-syntax": ["error", "PrivateIdentifier"],
"prefer-const": ["error", {
"destructuring": "all",
"ignoreReadBeforeAssign": true
}]
}
}