Avoid unnecessary semicolon before call signatures (#19212)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-05-27 06:10:32 +08:00
1 parent d7cf639b76
commit 4025d3e226
4 files changed
+151 -2

No files matched your search

+25
View File
@@ -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>
}
```