Skip to content

Commit 511f61a

Browse files
committed
Update eslint config
1 parent 9bc0bb3 commit 511f61a

File tree

3 files changed

+270
-178
lines changed

3 files changed

+270
-178
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
node_modules/
2-
applications/example/
3-
tests/
4-
schemas/
5-
config/

.eslintrc.json

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"node": true
6+
},
7+
"extends": "eslint:recommended",
8+
"parserOptions": {
9+
"ecmaVersion": 2020
10+
},
11+
"globals": {
12+
"BigInt": true,
13+
"api": true,
14+
"fs": true
15+
},
16+
"rules": {
17+
"indent": [
18+
"error",
19+
2
20+
],
21+
"linebreak-style": [
22+
"error",
23+
"unix"
24+
],
25+
"quotes": [
26+
"error",
27+
"single"
28+
],
29+
"semi": [
30+
"error",
31+
"always"
32+
],
33+
"no-loop-func": [
34+
"error"
35+
],
36+
"block-spacing": [
37+
"error",
38+
"always"
39+
],
40+
"camelcase": [
41+
"error"
42+
],
43+
"eqeqeq": [
44+
"error",
45+
"always"
46+
],
47+
"strict": [
48+
"error",
49+
"global"
50+
],
51+
"brace-style": [
52+
"error",
53+
"1tbs",
54+
{
55+
"allowSingleLine": true
56+
}
57+
],
58+
"comma-style": [
59+
"error",
60+
"last"
61+
],
62+
"comma-spacing": [
63+
"error",
64+
{
65+
"before": false,
66+
"after": true
67+
}
68+
],
69+
"eol-last": [
70+
"error"
71+
],
72+
"func-call-spacing": [
73+
"error",
74+
"never"
75+
],
76+
"key-spacing": [
77+
"error",
78+
{
79+
"beforeColon": false,
80+
"afterColon": true,
81+
"mode": "minimum"
82+
}
83+
],
84+
"keyword-spacing": [
85+
"error",
86+
{
87+
"before": true,
88+
"after": true,
89+
"overrides": {
90+
"function": {
91+
"after": false
92+
}
93+
}
94+
}
95+
],
96+
"max-len": [
97+
"error",
98+
{
99+
"code": 80,
100+
"ignoreUrls": true
101+
}
102+
],
103+
"max-nested-callbacks": [
104+
"error",
105+
{
106+
"max": 7
107+
}
108+
],
109+
"new-cap": [
110+
"error",
111+
{
112+
"newIsCap": true,
113+
"capIsNew": false,
114+
"properties": true
115+
}
116+
],
117+
"new-parens": [
118+
"error"
119+
],
120+
"no-lonely-if": [
121+
"error"
122+
],
123+
"no-trailing-spaces": [
124+
"error"
125+
],
126+
"no-unneeded-ternary": [
127+
"error"
128+
],
129+
"no-whitespace-before-property": [
130+
"error"
131+
],
132+
"object-curly-spacing": [
133+
"error",
134+
"always"
135+
],
136+
"operator-assignment": [
137+
"error",
138+
"always"
139+
],
140+
"operator-linebreak": [
141+
"error",
142+
"after"
143+
],
144+
"semi-spacing": [
145+
"error",
146+
{
147+
"before": false,
148+
"after": true
149+
}
150+
],
151+
"space-before-blocks": [
152+
"error",
153+
"always"
154+
],
155+
"space-before-function-paren": [
156+
"error",
157+
{
158+
"anonymous": "never",
159+
"named": "never",
160+
"asyncArrow": "always"
161+
}
162+
],
163+
"space-in-parens": [
164+
"error",
165+
"never"
166+
],
167+
"space-infix-ops": [
168+
"error"
169+
],
170+
"space-unary-ops": [
171+
"error",
172+
{
173+
"words": true,
174+
"nonwords": false,
175+
"overrides": {
176+
"typeof": false
177+
}
178+
}
179+
],
180+
"no-unreachable": [
181+
"error"
182+
],
183+
"no-global-assign": [
184+
"error"
185+
],
186+
"no-self-compare": [
187+
"error"
188+
],
189+
"no-unmodified-loop-condition": [
190+
"error"
191+
],
192+
"no-constant-condition": [
193+
"error",
194+
{
195+
"checkLoops": false
196+
}
197+
],
198+
"no-console": [
199+
"off"
200+
],
201+
"no-useless-concat": [
202+
"error"
203+
],
204+
"no-useless-escape": [
205+
"error"
206+
],
207+
"no-shadow-restricted-names": [
208+
"error"
209+
],
210+
"no-use-before-define": [
211+
"error",
212+
{
213+
"functions": false
214+
}
215+
],
216+
"arrow-parens": [
217+
"error",
218+
"always"
219+
],
220+
"arrow-body-style": [
221+
"error",
222+
"as-needed"
223+
],
224+
"arrow-spacing": [
225+
"error"
226+
],
227+
"no-confusing-arrow": [
228+
"error",
229+
{
230+
"allowParens": true
231+
}
232+
],
233+
"no-useless-computed-key": [
234+
"error"
235+
],
236+
"no-useless-rename": [
237+
"error"
238+
],
239+
"no-var": [
240+
"error"
241+
],
242+
"object-shorthand": [
243+
"error",
244+
"always"
245+
],
246+
"prefer-arrow-callback": [
247+
"error"
248+
],
249+
"prefer-const": [
250+
"error"
251+
],
252+
"prefer-numeric-literals": [
253+
"error"
254+
],
255+
"prefer-rest-params": [
256+
"error"
257+
],
258+
"prefer-spread": [
259+
"error"
260+
],
261+
"rest-spread-spacing": [
262+
"error",
263+
"never"
264+
],
265+
"template-curly-spacing": [
266+
"error",
267+
"never"
268+
]
269+
}
270+
}

0 commit comments

Comments
 (0)