Avoid unnecessary semicolon before call signatures (#19212)
This commit is contained in:
1 parent
d7cf639b76
commit
4025d3e226
4 files changed
+151
-2
No files matched your search
@@ -0,0 +1,25 @@
|
||||
#### Avoid unnecessary semicolon before call signatures in `no-semi` mode (#19212 by @fisker)
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```tsx
|
||||
// Input
|
||||
export interface MyInterface {
|
||||
someMethod: (a: number) => Promise<number>
|
||||
anotherMethod: (a: string) => Promise<string>
|
||||
(a: string): Promise<string>
|
||||
}
|
||||
|
||||
// Prettier stable (--no-semi)
|
||||
export interface MyInterface {
|
||||
someMethod: (a: number) => Promise<number>
|
||||
anotherMethod: (a: string) => Promise<string>;
|
||||
(a: string): Promise<string>
|
||||
}
|
||||
|
||||
// Prettier main
|
||||
export interface MyInterface {
|
||||
someMethod: (a: number) => Promise<number>
|
||||
anotherMethod: (a: string) => Promise<string>
|
||||
(a: string): Promise<string>
|
||||
}
|
||||
```
|
||||
Reference in new issue
Block a user