Commit 60d9b97
authored
[compiler] Derive ErrorSeverity from ErrorCategory (facebook#34401)
With facebook#34176 we now have granular lint rules created for each compiler
ErrorCategory. However, we had remnants of our old error severities
still in use which makes reporting errors quite clunky. Previously you
would need to specify both a category and severity which often ended up
being the same.
This PR moves severity definition into our rules which are generated
from our categories. For now I decided to defer "upgrading" categories
from a simple string to a sum type since we are only using severities to
map errors to eslint severity.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34401).
* facebook#34409
* facebook#34404
* facebook#34403
* facebook#34402
* __->__ facebook#344011 parent c4e2508 commit 60d9b97
File tree
63 files changed
+379
-395
lines changed- compiler
- packages
- babel-plugin-react-compiler/src
- Entrypoint
- HIR
- Inference
- ReactiveScopes
- Transform
- Validation
- __tests__
- fixtures/compiler
- ecma
- gating
- infer-effect-dependencies
- bailout-retry
- no-emit
- new-mutability
- static-components
- transform-fire
- eslint-plugin-react-compiler
- __tests__
- src
- rules
- scripts
- packages/eslint-plugin-react-hooks
- __tests__
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
63 files changed
+379
-395
lines changedLines changed: 210 additions & 144 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
210 | | - | |
211 | 209 | | |
212 | 210 | | |
213 | 211 | | |
| |||
Lines changed: 4 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | | - | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
| |||
122 | 120 | | |
123 | 121 | | |
124 | 122 | | |
125 | | - | |
126 | 123 | | |
127 | 124 | | |
128 | 125 | | |
| |||
141 | 138 | | |
142 | 139 | | |
143 | 140 | | |
144 | | - | |
145 | | - | |
| 141 | + | |
| 142 | + | |
146 | 143 | | |
147 | 144 | | |
148 | 145 | | |
149 | 146 | | |
150 | | - | |
151 | | - | |
152 | | - | |
| 147 | + | |
153 | 148 | | |
154 | 149 | | |
155 | 150 | | |
| |||
214 | 209 | | |
215 | 210 | | |
216 | 211 | | |
217 | | - | |
218 | | - | |
| 212 | + | |
219 | 213 | | |
220 | 214 | | |
221 | 215 | | |
| |||
458 | 452 | | |
459 | 453 | | |
460 | 454 | | |
461 | | - | |
462 | 455 | | |
463 | 456 | | |
464 | 457 | | |
| |||
827 | 820 | | |
828 | 821 | | |
829 | 822 | | |
830 | | - | |
831 | 823 | | |
832 | 824 | | |
833 | 825 | | |
| |||
890 | 882 | | |
891 | 883 | | |
892 | 884 | | |
893 | | - | |
894 | 885 | | |
895 | 886 | | |
896 | 887 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
186 | 185 | | |
187 | 186 | | |
188 | 187 | | |
189 | | - | |
190 | 188 | | |
191 | 189 | | |
192 | 190 | | |
| |||
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 26 | | |
31 | 27 | | |
32 | 28 | | |
33 | | - | |
| 29 | + | |
34 | 30 | | |
35 | | - | |
| 31 | + | |
36 | 32 | | |
37 | 33 | | |
38 | 34 | | |
| |||
0 commit comments