You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.organizeImports": true// "source.sortImports": true // This also append when this is enabled
},
"typescript.tsdk": "./node_modules/typescript/lib"
}
Prettier config (.prettierrc)
{
"semi": false
}
🙁 Actual behavior
When i save file, this add semicolon on all import.
🙂 Expected behavior
No add semicolon on import.
Additional information
That issue ONLY append when i have an type write like that { var1: number; var2: string }, so i think the organize/sort (maybe from here #31801) think the semicolon is used because is present in code.
The text was updated successfully, but these errors were encountered:
TypeScript doesn't know about prettier and uses a heuristic to figure out it if seems like you're using semicolons or not. Since you could have used a comma to separate var1 and var2, this appears to be a "semicolon-friendly" codebase based on that heuristic.
Set the "Semicolons" formatter option according to your formatting style:
Bug Report
🔎 Search Terms
🕗 Version & Regression Information
💻 Code
Vscode config (
settings.json
) :Prettier config (
.prettierrc
)🙁 Actual behavior
When i save file, this add semicolon on all
import
.🙂 Expected behavior
No add semicolon on
import
.Additional information
That issue ONLY append when i have an type write like that
{ var1: number; var2: string }
, so i think the organize/sort (maybe from here #31801) think the semicolon is used because is present in code.The text was updated successfully, but these errors were encountered: