Auto-fix on save unexpectedly removing code and imports
Author: ethanneffCreated Jan 28, 2026Updated Sep 8, 2026
Labelstype:editor support
This is related to some change in prettier.
Happening on Vscode and Cursor. Extensions: esbenp.prettier-vscode (12.3.0) and dbaeumer.vscode-eslint (3.0.20). With the following .vscode/settings.json
{
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.addMissingImports": "always",
"source.removeUnusedImports": "always",
"source.organizeImports": "never",
"source.sortImports": "never"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
}
Related issue https://github.com/microsoft/vscode-eslint/issues/2115
Source: prettier/prettier