- Added option to remove unused non side effect imports. Resolves issue #22.
- fixing issue #28, so the triple slash directives are placed to the top of the document
- Configuration file now supports the same format as vs code settings.
- Adding
maximumNumberOfImportExpressionsPerLine.type: newLineEachExpressionAfterCountLimitExceptIfOnlyOne
, to be able to integrate with behavior of prettier. This is done to address GitHub Prettier Issues #1954
- The core of the import sorter uses fs package to read files. It also uses fs to write when directory sort is performed.
- Import sorter adds a way to sort in directories, so that you could perform the sort for the whole code base (feature request #17). Do make sure that the project is managed by some version control system before performing the global source code sort.
- fixing issue #21 with null
- fixing issue #19 with length count
- fixing other minor issues
- fixing configuration as proxy. issue #16
- default sorting rules have been changed to:
[
{
"type": "importMember",
"regex": "^$",
"orderLevel": 10,
"disableSort": true
},
{
"regex": "^[@]",
"orderLevel": 30
},
{
"regex": "^[.]",
"orderLevel": 40
}
]
- added support of the comments blocks.
- added
importSorter.sortConfiguration.customOrderingRules.disableDefaultOrderSort
andimportSorter.sortConfiguration.customOrderingRules.rules.disableSort
which allows to disable sort for the group of imports
- fixing semi-relative import paths
- correcting
newLineEachExpressionAfterCountLimit
- added
importSorter.generalConfiguration.exclude
to define the type of characters for new-lined imports
- fixing multisave sort: so if auto save is enabled, then multiple files are sorted correctly.
- fixing behavior of on before save sorting.
- added an option to sort imports before each save of the document. The corresponding config record is "importSorter.generalConfiguration.sortOnBeforeSave". The default value is false, which disables sort on save.
- added logo, so can finally switch to version 1.0.0
- added
importSorter.importStringConfiguration.tabType
to define the type of characters for new-lined imports - updated
importSorter.importStringConfiguration.maximumNumberOfImportExpressionsPerLine.type
to havenewLineEachExpressionAfterCountLimit
value. See readme for explanations of the feature.
- added gif example
- added support for .tsx;
- added support for optional semicolons which is toggled through
importSorter.importStringConfiguration.hasSemicolon
;
-
added support for trailing commas.
importSorter.importStringConfiguration.trailingComma
is an enum which can bealways
,multiLine
, ornone
. -
added configuration file support. Configuration can be read from json file. The file is specified by
importSorter.generalConfiguration.configurationFilePath
setting. -
bug fixes.
First prototype is released