Commit 9062040
authored
refactor(await-async-utils): use custom rule creator (#263)
* refactor: extract utils for checking promise all methods
* test(await-async-query): add cases for promise all and allSettled
* docs(await-async-query): add cases for promise all and allSettled
* refactor(await-async-utils): create rule with custom creator
* refactor(await-async-utils): replace async utils regexp by method
* refactor(await-async-utils): replace manual import checks by helper
* refactor(await-async-utils): replace manual promise checks by util
* refactor(await-async-utils): merge identifier and member expression nodes checks
* test(await-async-query): check column on invalid cases
* test(await-async-query): promise.allSettled cases
* refactor(await-async-query): extract util to get innermost returning function name
* feat(await-async-utils): report unhandled functions wrapping async utils
* docs: minor improvements
* test(await-async-utils): increase coverage
* refactor: repurpose getInnermostReturningFunctionName to getInnermostReturningFunction1 parent dcc0693 commit 9062040
File tree
8 files changed
+325
-162
lines changed- docs/rules
- lib
- rules
- tests/lib/rules
8 files changed
+325
-162
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
73 | 87 | | |
74 | 88 | | |
75 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| |||
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
35 | 51 | | |
36 | 52 | | |
37 | 53 | | |
| |||
56 | 72 | | |
57 | 73 | | |
58 | 74 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
62 | 82 | | |
63 | 83 | | |
64 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
171 | 179 | | |
172 | 180 | | |
173 | 181 | | |
| |||
312 | 320 | | |
313 | 321 | | |
314 | 322 | | |
| 323 | + | |
315 | 324 | | |
316 | 325 | | |
317 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
215 | 247 | | |
216 | 248 | | |
217 | 249 | | |
218 | 250 | | |
219 | 251 | | |
| 252 | + | |
| 253 | + | |
220 | 254 | | |
221 | 255 | | |
222 | 256 | | |
| |||
250 | 284 | | |
251 | 285 | | |
252 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
253 | 291 | | |
254 | 292 | | |
255 | 293 | | |
| |||
476 | 514 | | |
477 | 515 | | |
478 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
| |||
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
59 | 41 | | |
60 | 42 | | |
61 | 43 | | |
| |||
0 commit comments