forked from prettier/prettier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
385 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#### Keep curly braces and `from` keyword in empty `import` statements (#15756 by @fisker) | ||
|
||
<!-- prettier-ignore --> | ||
```js | ||
// Input | ||
import { } from 'foo'; | ||
import { /* comment */ } from 'bar'; | ||
|
||
// Prettier stable | ||
import {} from "foo"; | ||
import /* comment */ "bar"; | ||
|
||
// Prettier main | ||
import {} from "foo"; | ||
import {} from /* comment */ "bar"; | ||
``` |
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 +1,46 @@ | ||
import { } from '@types/googlemaps'; | ||
import 'a'; | ||
import /* comment */ 'a'; | ||
import // comment | ||
'a'; | ||
import { /* comment */ } from 'a'; | ||
import /* comment */ {} from 'a'; | ||
import {} /* comment */ from 'a'; | ||
import {} from /* comment */ 'a'; | ||
import /* comment */ {/* comment */} /* comment */ from /* comment */ 'a'; | ||
import { | ||
// comment | ||
} from 'a'; | ||
import // comment | ||
{} from 'a'; | ||
import {} | ||
// comment | ||
from 'a'; | ||
import {} from | ||
// comment | ||
'a'; | ||
import | ||
// comment | ||
{ | ||
// comment | ||
} | ||
// comment | ||
from | ||
// comment | ||
'a'; | ||
|
||
import // {} from | ||
'a'; | ||
import {} from // comment ends with from | ||
'a'; | ||
import {} from /* comment ends with from */ 'a'; | ||
import {} from // comment not ends with from ___ | ||
'a'; | ||
import {} from /* comment not ends with from ___ */ 'a'; | ||
|
||
import // comment ends with from | ||
'a'; | ||
import /* comment ends with from */ 'a'; | ||
import // comment not ends with from ___ | ||
'a'; | ||
import /* comment not ends with from ___ */ 'a'; |
Oops, something went wrong.