-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Your Environment
- Prettier version: 3.3.3
- node version: 22.15.1
- package manager: npm@11
- IDE: Webstorm
Describe the bug
When I add comment above interface name - extra new lines appear after imports
To Reproduce
- Create a
.tsfile with next content:
import { HttpEvent } from '@angular/common/http';
export interface TestModel {
readonly event: HttpEvent<any> | null;
}
- Add comment describing TestModel interface
// test comment
export interface TestModel {
- Save file to trigger prettier auto formatting
Expected behavior
The content does not change after adding line with comment:
Actual behavior
Extra lines generated after import:
Screenshots, code sample, etc
My .prettierrc:
{
"singleQuote": true,
"semi": true,
"plugins": [
"@ianvs/prettier-plugin-sort-imports",
"prettier-plugin-sort-members"
],
"keepGettersAndSettersTogether": true,
"importOrder": [
"<THIRD_PARTY_MODULES>",
"",
"^primeng/(.*)$",
"",
"^@my-app/(.*)$",
"",
"^[./]"
],
"importOrderParserPlugins": [
"typescript",
"decorators-legacy"
]
}
Metadata
Metadata
Assignees
Labels
No labels