/vscode-es6-typescript-import-sorter

A VSCode extension to group and sort import statements

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

ES6 and TypeScript import sorter (BETA)

An opinionated ES6 and TypeScript import sorter.

Features

Sort import statements:

  • by invoking VSCode's command palette and searching for Sort imports command.
  • on save, by enabling Es6tssort: Sort On Save setting
  • by using CLI (i.e. on the CI). Type ./node_modules/.bin/import-sorter --help in terminal to see the list of all available options. Example usage: ./node_modules/.bin/import-sorter --directory path/to/recursevly/sort/imports/in --dry-run

Example of sorting imports

Known Issues

No known issues.

Future plans

  • Read configuration from eslint.json and tslint.json file
  • Sort the importing modules as part of the import statement itself
  • CLI documentation

For a full list of planned features, see the library repo

Release Notes

See CHANGELOG.md

Contributing

See CONTRIBUTING.md