Print ; for module declaration and declare function without body (#18852)
This commit is contained in:
1 parent
c06314c988
commit
0eda012bcb
9 files changed
+203
-5
No files matched your search
@@ -0,0 +1,35 @@
|
||||
#### Fix required semicolon in `no-semi` mode (#18852 by @fisker)
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```tsx
|
||||
// Input
|
||||
declare module "autoprefixer";
|
||||
{
|
||||
alert()
|
||||
}
|
||||
declare function a();
|
||||
{
|
||||
alert()
|
||||
}
|
||||
|
||||
// Prettier stable (--no-semi)
|
||||
declare module "autoprefixer"
|
||||
{
|
||||
alert()
|
||||
}
|
||||
declare function a()
|
||||
{
|
||||
alert()
|
||||
}
|
||||
|
||||
|
||||
// Prettier main (--no-semi)
|
||||
declare module "autoprefixer";
|
||||
{
|
||||
alert();
|
||||
}
|
||||
declare function a();
|
||||
{
|
||||
alert();
|
||||
}
|
||||
```
|
||||
Reference in new issue
Block a user