-
Notifications
You must be signed in to change notification settings - Fork 11
/
.eslintrc.json
115 lines (115 loc) · 2.83 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
"env": {
"es2020": true,
"node": true
},
"extends": ["airbnb-base", "prettier", "prettier/@typescript-eslint"],
"globals": {
"__BUILDNUM__": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"project": "tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/no-floating-promises": ["warn"],
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/no-unused-expressions": ["error"],
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/unbound-method": [
"error",
{
"ignoreStatic": true
}
],
"arrow-parens": ["error", "always"],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never"
}
],
"import/prefer-default-export": "off",
"no-bitwise": "off",
"no-empty": "off",
"no-fallthrough": "off",
"no-multiple-empty-lines": "error",
"no-restricted-syntax": "off",
"no-shadow": "off", // Prevent conflicts with @typescript-eslint/no-shadow
"no-underscore-dangle": "off",
"no-unused-expressions": "off", // @typescript-eslint/no-unused-expressions used instead
"no-void": [
"error",
{
"allowAsStatement": true
}
],
"padding-line-between-statements": [
// See docs
"warn",
{
"blankLine": "always",
"prev": "*",
"next": "return"
}, // return
{
"blankLine": "always",
"prev": "*",
"next": "class"
}, // class
{
"blankLine": "always",
"prev": ["const", "let", "var"],
"next": "*"
}, // Variable declaration
{
"blankLine": "any",
"prev": ["const", "let", "var"],
"next": ["const", "let", "var"]
},
{
"blankLine": "always",
"prev": ["case", "default"],
"next": "*"
}, // case in switch
{
"blankLine": "always",
"prev": "*",
"next": ["try", "switch", "for", "block-like"]
}, // blocks (try, switch, if, while, for, {})
{
"blankLine": "always",
"prev": ["try", "switch", "for", "block-like"],
"next": "*"
},
{
// Multiline
"blankLine": "always",
"prev": ["multiline-const", "multiline-expression", "multiline-let"],
"next": "*"
}
]
},
"settings": {
"import/resolver": {
"node": {
"paths": ["src", "worker", "node_modules"],
"extensions": [".js", ".json", ".ts"]
}
}
}
}