-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
organizeImports
makes no changes if there are parse errors in the s…
…ourceFile (#58903)
- Loading branch information
Showing
9 changed files
with
78 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
// ==ORIGINAL== | ||
// ==NO CHANGES== | ||
|
||
import { React, Other } from "react"; | ||
|
||
<div/>; | ||
// ==ORGANIZED== | ||
|
||
|
||
<div/>; |
8 changes: 1 addition & 7 deletions
8
tests/baselines/reference/organizeImports/Syntax_Error_Body.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
// ==ORIGINAL== | ||
// ==NO CHANGES== | ||
|
||
import { F1, F2 } from "lib"; | ||
import * as NS from "lib"; | ||
import D from "lib"; | ||
|
||
class class class; | ||
D; | ||
|
||
// ==ORGANIZED== | ||
|
||
import D from "lib"; | ||
|
||
class class class; | ||
D; |
9 changes: 1 addition & 8 deletions
9
tests/baselines/reference/organizeImports/Syntax_Error_Body_skipDestructiveCodeActions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
// ==ORIGINAL== | ||
// ==NO CHANGES== | ||
|
||
import { F1, F2 } from "lib"; | ||
import * as NS from "lib"; | ||
import D from "lib"; | ||
|
||
class class class; | ||
D; | ||
|
||
// ==ORGANIZED== | ||
|
||
import * as NS from "lib"; | ||
import D, { F1, F2 } from "lib"; | ||
|
||
class class class; | ||
D; |
8 changes: 1 addition & 7 deletions
8
tests/baselines/reference/organizeImports/Syntax_Error_Imports.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
// ==ORIGINAL== | ||
// ==NO CHANGES== | ||
|
||
import { F1, F2 class class class; } from "lib"; | ||
import * as NS from "lib"; | ||
class class class; | ||
import D from "lib"; | ||
|
||
D; | ||
|
||
// ==ORGANIZED== | ||
|
||
import D from "lib"; | ||
class class class; | ||
|
||
D; |
9 changes: 1 addition & 8 deletions
9
tests/baselines/reference/organizeImports/Syntax_Error_Imports_skipDestructiveCodeActions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
// ==ORIGINAL== | ||
// ==NO CHANGES== | ||
|
||
import { F1, F2 class class class; } from "lib"; | ||
import * as NS from "lib"; | ||
class class class; | ||
import D from "lib"; | ||
|
||
D; | ||
|
||
// ==ORGANIZED== | ||
|
||
import * as NS from "lib"; | ||
import D, { F1, F2, class, class, class } from "lib"; | ||
class class class; | ||
|
||
D; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// ==ORIGINAL== | ||
// ==NO CHANGES== | ||
declare module 'mod1' { | ||
declare export type P = {| | ||
|}; | ||
declare export type F = {| | ||
...$Exact<Node>, | ||
await?: Span, | ||
|}; | ||
declare export type S = {| | ||
|}; | ||
declare export type C = {| | ||
|}; | ||
} | ||
|
||
declare module 'mod2' { | ||
import type { | ||
U, | ||
} from 'mod1'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters