Commit a9785e3
authored
fix(parser,linter): consider typescript declarations for named exports (#10532)
Only VariableDeclaration, FunctionDeclaration and ClassDeclaration were
considered when collecting named export declarations for the module
record. Now the parser also considers TSTypeAliasDeclaration,
TSInterfaceDeclaration, TSEnumDeclaration, TSImportEqualsDeclaration and
TSModuleDeclaration named export declarations of the module.
Maybe the other `decl.declaration.is_typescript_syntax()` check in
`module_record.rs` also needs to be removed?
Closes #10318
Closes #105561 parent 7059ffa commit a9785e3
File tree
5 files changed
+48
-19
lines changed- crates
- oxc_linter
- fixtures/import
- src/rules/import
- oxc_parser/src
- napi/parser/test
- tasks/coverage/snapshots
5 files changed
+48
-19
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
488 | 493 | | |
489 | 494 | | |
490 | 495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | 320 | | |
326 | 321 | | |
327 | 322 | | |
| |||
338 | 333 | | |
339 | 334 | | |
340 | 335 | | |
341 | | - | |
| 336 | + | |
342 | 337 | | |
343 | 338 | | |
344 | 339 | | |
| |||
388 | 383 | | |
389 | 384 | | |
390 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
391 | 397 | | |
392 | 398 | | |
393 | 399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | | - | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
2540 | 2540 | | |
2541 | 2541 | | |
2542 | 2542 | | |
2543 | | - | |
2544 | | - | |
2545 | 2543 | | |
2546 | 2544 | | |
2547 | 2545 | | |
| |||
13415 | 13413 | | |
13416 | 13414 | | |
13417 | 13415 | | |
| 13416 | + | |
| 13417 | + | |
| 13418 | + | |
| 13419 | + | |
| 13420 | + | |
| 13421 | + | |
| 13422 | + | |
| 13423 | + | |
| 13424 | + | |
| 13425 | + | |
| 13426 | + | |
| 13427 | + | |
| 13428 | + | |
| 13429 | + | |
13418 | 13430 | | |
13419 | 13431 | | |
13420 | 13432 | | |
| |||
0 commit comments