Commit 8e290e5
Improve error range for ts2657 (jsx expr must have parent element), add code fix for it (microsoft#37917)
* fix: range of ts2657 (jsx expr must have parent) and remove 2695 (LHS expr of comma has no side effects)
* feat: add code fix for 2657
* fix: resolve review
* chore: hoist a var
* chore: add test for skipTrivia
* fix: rebase error
* Update src/compiler/diagnosticMessages.json
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
* Update src/services/codefixes/wrapJsxInFragment.ts
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
Co-authored-by: Andrew Branch <andrew@wheream.io>
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>1 parent 4f0b81d commit 8e290e5Copy full SHA for 8e290e5
16 files changed
+152-60Lines changed: 152 additions & 60 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- src
- compiler
- services
- codefixes
- tests
- baselines/reference
- cases
- conformance/jsx
- fourslash
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+8-1Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
28769 | 28769 | |
28770 | 28770 | |
28771 | 28771 | |
28772 | | - |
| 28772 | + |
| 28773 | + |
| 28774 | + |
| 28775 | + |
| 28776 | + |
| 28777 | + |
| 28778 | + |
| 28779 | + |
28773 | 28780 | |
28774 | 28781 | |
28775 | 28782 | |
|
Collapse file
src/compiler/diagnosticMessages.json
Copy file name to clipboardExpand all lines: src/compiler/diagnosticMessages.json+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
5709 | 5709 | |
5710 | 5710 | |
5711 | 5711 | |
| 5712 | + |
| 5713 | + |
| 5714 | + |
| 5715 | + |
| 5716 | + |
| 5717 | + |
| 5718 | + |
| 5719 | + |
5712 | 5720 | |
5713 | 5721 | |
5714 | 5722 | |
|
Collapse file
+4-3Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4503 | 4503 | |
4504 | 4504 | |
4505 | 4505 | |
4506 | | - |
| 4506 | + |
4507 | 4507 | |
4508 | 4508 | |
4509 | 4509 | |
| ||
4541 | 4541 | |
4542 | 4542 | |
4543 | 4543 | |
4544 | | - |
| 4544 | + |
| 4545 | + |
4545 | 4546 | |
4546 | | - |
4547 | 4547 | |
4548 | 4548 | |
4549 | 4549 | |
4550 | 4550 | |
4551 | 4551 | |
4552 | 4552 | |
| 4553 | + |
4553 | 4554 | |
4554 | 4555 | |
4555 | 4556 | |
|
Collapse file
src/services/codefixes/wrapJsxInFragment.ts
Copy file name to clipboard+71Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 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 | + |
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
97 | 97 | |
98 | 98 | |
99 | 99 | |
| 100 | + |
100 | 101 | |
101 | 102 | |
102 | 103 | |
|
Collapse file
tests/baselines/reference/jsxEsprimaFbTestSuite.errors.txt
Copy file name to clipboardExpand all lines: tests/baselines/reference/jsxEsprimaFbTestSuite.errors.txt+6-6Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | | - |
| 1 | + |
2 | 2 | |
| 3 | + |
3 | 4 | |
4 | | - |
5 | 5 | |
6 | 6 | |
7 | 7 | |
| ||
47 | 47 | |
48 | 48 | |
49 | 49 | |
50 | | - |
51 | | - |
| 50 | + |
| 51 | + |
52 | 52 | |
53 | 53 | |
54 | 54 | |
55 | | - |
| 55 | + |
56 | 56 | |
57 | | - |
| 57 | + |
58 | 58 | |
59 | 59 | |
60 | 60 | |
|
Collapse file
tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt
Copy file name to clipboardExpand all lines: tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt+11-16Lines changed: 11 additions & 16 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
33 | 33 | |
34 | 34 | |
35 | 35 | |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
| 36 | + |
| 37 | + |
40 | 38 | |
41 | 39 | |
42 | 40 | |
| ||
61 | 59 | |
62 | 60 | |
63 | 61 | |
64 | | - |
| 62 | + |
65 | 63 | |
66 | 64 | |
67 | 65 | |
| ||
228 | 226 | |
229 | 227 | |
230 | 228 | |
231 | | - |
232 | | - |
233 | | - |
234 | | - |
235 | | - |
| 229 | + |
| 230 | + |
| 231 | + |
236 | 232 | |
237 | | - |
| 233 | + |
238 | 234 | |
239 | | - |
240 | | - |
241 | | - |
| 235 | + |
242 | 236 | |
243 | 237 | |
244 | 238 | |
| ||
313 | 307 | |
314 | 308 | |
315 | 309 | |
316 | | - |
317 | | - |
| 310 | + |
318 | 311 | |
319 | 312 | |
320 | 313 | |
321 | 314 | |
322 | 315 | |
323 | 316 | |
| 317 | + |
| 318 | + |
324 | 319 | |
325 | 320 | |
326 | 321 | |
|
Collapse file
tests/baselines/reference/jsxInvalidEsprimaTestSuite.js
Copy file name to clipboardExpand all lines: tests/baselines/reference/jsxInvalidEsprimaTestSuite.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
37 | 37 | |
38 | 38 | |
39 | 39 | |
40 | | - |
| 40 | + |
41 | 41 | |
42 | 42 | |
43 | 43 | |
| ||
117 | 117 | |
118 | 118 | |
119 | 119 | |
120 | | - |
| 120 | + |
121 | 121 | |
122 | 122 | |
123 | 123 | |
|
Collapse file
tests/baselines/reference/jsxInvalidEsprimaTestSuite.symbols
Copy file name to clipboardExpand all lines: tests/baselines/reference/jsxInvalidEsprimaTestSuite.symbols+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
50 | 50 | |
51 | 51 | |
52 | 52 | |
53 | | - |
| 53 | + |
54 | 54 | |
55 | 55 | |
56 | 56 | |
|
Collapse file
tests/baselines/reference/jsxInvalidEsprimaTestSuite.types
Copy file name to clipboardExpand all lines: tests/baselines/reference/jsxInvalidEsprimaTestSuite.types+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
159 | 159 | |
160 | 160 | |
161 | 161 | |
162 | | - |
| 162 | + |
163 | 163 | |
164 | 164 | |
165 | 165 | |
|
0 commit comments