From @nikolay-borzov on May 22, 2018 12:37
Usually imports are organized in groups separated by empty line (e.g. node packages, services, components). I think that organizeImports should respect existing groups and perform organizing within each group.
- VSCode Version: 1.23.1
- OS Version: Windows 10 x64
Steps to Reproduce:
- Set user settings:
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
source.organizeImports": true
}
- Create
.ts file
import path from 'path'
import fs from 'fs'
const currentDir = path.resolve(__dirname)
const data = fs.readdirSync(currentDir)
-
Press Ctrl+S
-
Result:
import fs from 'fs'
import path from 'path'
const currentDir = path.resolve(__dirname)
const data = fs.readdirSync(currentDir)
Does this issue occur when all extensions are disabled?: Yes (Disabled TSLint and Prettier)
Copied from original issue: microsoft/vscode#50277
From @nikolay-borzov on May 22, 2018 12:37
Usually imports are organized in groups separated by empty line (e.g. node packages, services, components). I think that
organizeImportsshould respect existing groups and perform organizing within each group.Steps to Reproduce:
.tsfilePress
Ctrl+SResult:
Does this issue occur when all extensions are disabled?: Yes (Disabled TSLint and Prettier)
Copied from original issue: microsoft/vscode#50277