ts-importer
ts-importer copied to clipboard
Feature request: Remove unused imports
Out of the TS extensions I've tried, yours is the definitely best of the lot for managing imports. Would love to request the following:
- Remove unused imports (an annoying chore I encounter frequently)
- Have the context menu deprioritise options I never choose, and vice versa
- Format/sort imports inside braces:
- Inside braces:
import { D, A, C, B }
-->import { A, B, C, D }
- Case sensitivity:
import { fn1, Type1, fn2, Type2, someVar }
-->import { Type1, Type2, fn1, fn2, someVar }
- Multiline with line breaking when there are too many imports on one line:
- Inside braces:
import { someReallyLongFunctionOrVariableName, fn1, someVar2, Type1, fn2, Type2, SomeReallyLongTypeName, someVar1}
// becomes:
import {
SomeReallyLongTypeName, Type1, Type2,
fn1, fn2, someReallyLongFunctionOrVariableName, someVar2, someVar1
} from 'somewhere';
// or (as per settings):
import { SomeReallyLongTypeName, Type1, Type2,
fn1, fn2, someReallyLongFunctionOrVariableName, someVar2, someVar1 } from 'somewhere';
Why not using tslint? https://palantir.github.io/tslint/rules/ordered-imports/
Ah, didn't know about that, thanks!
Still, the most important suggestion was removing unused imports.