Closed
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