All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Support Import Attributes.
- Support URL as module identifier.
- Support use server
- Support Vue.js.
- Support TypeScript 4.9 satisfies operator.
- Support React 18 use client directive.
- Add
builtin
toGroupRule
to support NodeJS builtin module imports. - Add
nodeProtocol
to support adding or removing"node:"
to builtin module paths.
- Support ESLint rule object-curly-spacing and @typescript-eslint/object-curly-spacing.
- Webpack the extension.
- Add
always
option fortrailingComma
config. - Support new ESLint rules:
- Support ESLint semi rule.
- Support formatting Import Assertions.
- Add
root
config to support monorepo projects. - Add
preserve
option forinsertFinalNewline
config.
- Support
type
modifiers on import names
- Support ESLint eol-last rule.
- Fix Prettier option
"trailingComma": "es5"
.
- Add
ignoreESLintRules
config to ignore specific ESLint rules.
- Update default
GroupRules
to groupnode:
imports separately.
- Register code action
"source.organizeImports.sortImports"
.
- Support ESLint indent and @typescript-eslint/indent rules.
tabWidth
from ESLint max-len doesn't impacttabSize
config.
- Add
wrappingStyle.ignoreComments
to skip trailing comments when counting line length. - Support ESLint max-len rule.
- Add
importType
toGroupRule
to distinguishimport
andimport type
.
- Config
sortRules
can also be"none"
which means bothpaths
andnames
are"none"
.
- Config
wrappingStyle
which can be either a preset style"prettier"
or an object of:maxBindingNamesPerLine
maxDefaultAndBindingNamesPerLine
maxExportNamesPerLine
maxNamesPerWrappedLine
- Top level config:
maxBindingNamesPerLine
maxDefaultAndBindingNamesPerLine
maxExportNamesPerLine
maxNamesPerWrappedLine
- Separate core formatting logic as CLI and library in Format-Imports.
- Add config
removeLastSlashInPath
andremoveLastIndexInPath
. - Respect import/newline-after-import rules.
- Respect import/no-useless-path-segments rules.
- Change config
EmptyLinesBetweenGroups
toemptyLinesBetweenGroups
.
- Add
emptyLinesAfterAllImports
: Number of empty lines after all import statements.
- Work with ESLint sort-imports rules.
- Add
development.enableDebug
in VS Code user settings for detailed logs.
- Extend grouping rules to support more types of imports.
- Change option
flag
toflags
in Grouping Rules.
- Add global
"sortImportsBy"
config. - Add
"sortImportsBy"
option to group rules. - Support sorting import statements by paths or imported names.
- Add
"named"
option to group'sflag
config. - Infer a group's
flag
from its parent and sub-groups when not set.
- Add
EmptyLinesBetweenGroups
config.
- Support Type-Only imports/exports.
- Support keeping unused imports.
- Add
keepUnused
config.
- Support formatting exports.
- Add
"formatExports"
. - Add
"maxExportNamesPerLine"
. - Support
'none'
as Sorting Rules. - Support
h
(Stencil).
- Rename
"maximumBindingNamesPerLine"
to"maxBindingNamesPerLine"
. - Rename
"maximumDefaultAndBindingNamesPerLine"
to"maxDefaultAndBindingNamesPerLine"
. - Rename
"maximumNamesPerWrappedLine"
to"maxNamesPerWrappedLine"
. - Rename
"maximumLineLength"
to"maxLineLength"
.
- Support Sorting Rules.
- Add
"tsImportSorter.configuration.sortRules.paths"
. - Add
"tsImportSorter.configuration.sortRules.names"
. - Support shebang (
#!
).
- Change
"tsImportSorter.configuration.groupRules"
content. - Improve Grouping Rules.
- Support sub-groups.
- Command / shortcut / context menu support.
- Add
"tsImportSorter.configuration.autoFormat"
. - Support glob patterns to exclude files.
- Auto format when
"editor.formatOnSave"
istrue
.
- Support regex patterns to exclude files.
- Support comments to exclude files or imports.
- Add Javascript support.
- Preserve global comments and
'use strict'
. - Respect VS Code
editor
config. - Respect Prettier and EditorConfig config.
- Support multi-root projects.
- Auto sort on save. No need for commands or clicks.
- Auto merge imports, deduplicate names.
- Auto delete unused names and handle
React
with JSX properly. - Group by customizable rules.
- Preserve leading and trailing comments with imports.
- Support config both in
package.json
andimport-sorter.json
.