-
Notifications
You must be signed in to change notification settings - Fork 45
/
.eslintrc
68 lines (64 loc) · 1.64 KB
/
.eslintrc
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
{
"root": true,
"env": {
"es2022": true,
"commonjs": true
},
"extends": [
"standard",
"plugin:import/recommended",
"plugin:promise/recommended",
"plugin:n/recommended"
],
"parserOptions": {
"ecmaVersion": 2022
},
// "ignorePatterns": ["frontend/dist/", "var/", "*.svg", "*.xml"],
"plugins": ["promise", "no-only-tests"],
"rules": {
// Inbuilt
"indent": ["error", 4],
"object-shorthand": ["error"],
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true
}
],
// "no-console": ["info", { "allow": ["debug", "info", "warn", "error"] }],
// plugin:import
"import/order": [
"error",
{
"alphabetize": {
"order": "asc"
},
"newlines-between": "always-and-inside-groups"
}
],
"import/no-unresolved": "error",
// plugin:n
"n/file-extension-in-import": "error",
"n/no-missing-import": "error",
"n/no-missing-require": "error",
// plugin:no-only-tests
"no-only-tests/no-only-tests": "error",
// plugin:promise
"promise/catch-or-return": ["error", { "allowFinally": true }]
},
"overrides": [
{
"files": ["test/**"],
"env": {
"mocha": true
}
},
{
"files": ["public/js/**"],
"env": {
"browser": true,
"jquery": true
}
}
]
}