-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Organize ImportsIssues with the organize imports featureIssues with the organize imports featureGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this
Milestone
Description
TS Template added by @mjbvz
TypeScript Version: 3.8.0-dev.20200108
Search Terms
- Organize imports
In TypeScript / JavaScript, the command Organize Imports
inserts up to two newlines if export { ... };
is at the end of a file. This does not happen with other forms of export
.
- VSCode Version: 1.41.1
- OS Version: Windows 10 (1803)
Steps to Reproduce:
- Have a list / renamed export as the last line of your file, e.g.:
import { Router } from 'express';
const router = Router();
// ... other code
export { router as namedRouter }; // also happens with `export { router };`
- Run the
Organize Imports
command. It will insert a newline after theexport { ... };
- Run the
Organize Imports
command again. It will insert another newline, resulting in two empty lines at the end of the file.
Expected behavior
Only one newline is inserted / kept after the export { ... };
.
Does this issue occur when all extensions are disabled?: Yes
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Organize ImportsIssues with the organize imports featureIssues with the organize imports featureGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this