Align leading comment of union type elements (#18833)
This commit is contained in:
1 parent
a16e57de94
commit
c65761ac3a
5 files changed
+156
-12
No files matched your search
@@ -0,0 +1,42 @@
|
||||
#### Align JSDoc before union type elements (#18833 by @fisker)
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```tsx
|
||||
// Input
|
||||
type A =
|
||||
|
|
||||
/**
|
||||
* Comment
|
||||
*/
|
||||
a
|
||||
| (b | c);
|
||||
type A2 =
|
||||
|
|
||||
// comment
|
||||
a
|
||||
| (b | c);
|
||||
|
||||
// Prettier stable
|
||||
type A =
|
||||
| /**
|
||||
* Comment
|
||||
*/
|
||||
a
|
||||
| (b | c);
|
||||
type A2 =
|
||||
| // comment
|
||||
a
|
||||
| (b | c);
|
||||
|
||||
// Prettier main
|
||||
type A =
|
||||
| /**
|
||||
* Comment
|
||||
*/
|
||||
a
|
||||
| (b | c);
|
||||
type A2 =
|
||||
| // comment
|
||||
a
|
||||
| (b | c);
|
||||
```
|
||||
Reference in new issue
Block a user