Commit dcc0693
authored
refactor: use custom rule creator for promise-queries rules (#260)
* refactor(no-await-sync-query): use custom rule creator
* refactor(no-await-sync-query): improve error message
* test(no-await-sync-query): check error location in invalid cases
* refactor(no-await-sync-query): catch sync queries with detection helper
* test(no-await-sync-query): use more realistic scenarios
* test(no-await-sync-query): add more cases for custom queries and settings
* refactor(await-async-query): use custom rule creator
* refactor(await-async-query): improve error message
* feat: new detection helpers for findBy queries
* refactor(await-async-query): detection helpers + aggressive reporting
* test(await-async-query): add cases for custom queries
* test(await-async-query): add more cases for custom queries
* test(await-async-query): check errors locations
* test(await-async-query): mix built-in and custom queries
* test(await-async-query): non-matching query case
* feat(await-async-query): report query wrappers
* refactor(await-async-query): extract ast utils for functions
* test(await-async-query): cases for arrow functions
* refactor(await-async-query): extract ast util for promise handled
* test(await-async-query): increase coverage
* refactor(await-async-query): rename isPromiseResolved to hasChainedThen
* docs(await-async-query): update rule description and examples
* docs(await-async-query): minor improvements
* refactor: minor type fix
* docs(await-async-query): more fixes
* docs(await-async-query): wrong return type
* refactor(await-async-query): check regex more efficiently1 parent 5ce0ba0 commit dcc0693
File tree
13 files changed
+755
-204
lines changed- docs/rules
- lib
- rules
- tests
- lib/rules
13 files changed
+755
-204
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
| 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 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
| 53 | + | |
51 | 54 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 55 | + | |
64 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
65 | 62 | | |
66 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
145 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
146 | 155 | | |
147 | 156 | | |
148 | 157 | | |
| |||
152 | 161 | | |
153 | 162 | | |
154 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
155 | 171 | | |
156 | 172 | | |
157 | 173 | | |
| |||
293 | 309 | | |
294 | 310 | | |
295 | 311 | | |
| 312 | + | |
296 | 313 | | |
| 314 | + | |
297 | 315 | | |
298 | 316 | | |
299 | 317 | | |
| |||
0 commit comments