-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Bug confirmedReport has been confirmed as a valid bugReport has been confirmed as a valid bugHelp wantedExtra attention is neededExtra attention is needed
Description
IDE and version
WebStorm 2025.1.3
Extension version
1.7.2
Biome version
2.0.5
Operating system
- Windows
- macOS
- Linux
Description
When having the document line separators on CRLF
and Sort import on save
in the extension enabled, the extension outputs invalid code. It also does not change the line separators from CRLF
to LF
.
My Biome Configuration
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineWidth": 120,
"lineEnding": "lf"
},
"assist": {
"actions": {
"source": {
"organizeImports": {
"level": "on",
"options": {
"groups": [
[":PACKAGE:", "!@abc/**"],
"@abc/**",
":PATH:"
]
}
}
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"indentWidth": 2,
"semicolons": "always",
"trailingCommas": "all",
"arrowParentheses": "always",
"lineEnding": "lf"
}
},
"json": {
"formatter": {
"enabled": true
}
},
"css": {
"formatter": {
"enabled": true
}
},
"linter": {
"enabled": false
}
}
Steps to reproduce
- Create a Typescript file with unsorted imports (see playground link)
- Set your line separators to CRLF
- Save your imports (sometimes multiple saves are required, sometimes it breaks it even more)
Expected behavior
It should produce valid code even when the file is CRLF. It should also change the line separators.
Does this issue occur when using the CLI directly?
No
Link to a minimal reproduction
Metadata
Metadata
Assignees
Labels
Bug confirmedReport has been confirmed as a valid bugReport has been confirmed as a valid bugHelp wantedExtra attention is neededExtra attention is needed