Releases: Gelio/tslint-import-group-ordering
Release v2.1.2
v2.1.1
v2.1.0
-
Allow disabling treating native NodeJS modules as dependencies.
Set
disable-native-nodejs-modules
on a given matching rule to activate. -
Fix handling leading import declaration comments. They will no longer be duplicated when using the
auto-fix. -
Performance improvements.
Node positions will no longer be recalculated upon encountering new nodes.
-
Support for reading dependencies and devDependencies from
package.json
instead of reading the
contents ofnode_modules
. This is configured by settingfrom-package.json
on a specific
matching-rule.
v2.0.0
Many improvements and issues that were overlooked in the initial implementation have been fixed.
These include:
- preserving comments
- detecting non-import statements between import groups and moving them after the imports section
- much more configuration options
- third party dependencies may now appear as not the first group
- absolute project imports from directories that are named like native NodeJS modules (e.g.
util
) are properly matched
These changes caused a breaking change when it comes to the rule configuration. See the README.md for more information.
Also, starting from this release there are unit tests and a CI process has been set up. You can monitor the build status on the readme page.
Autofixer release
The rule now contains an auto-fix which allows for automatic import groups ordering. It works without any problems with the ordered-imports
rule.
In order to facilitate that, whenever there is a problem with the imports, the whole imports section will be marked as an error. Individual errors will have I did not manage to get it working in an easier way. Feel free to create issues to discuss the matter or PRs if you have it solved.
Moreover, this release introduces a directory structure refactor which should make the repository easier to browse and the code easier to read as the code is split between multiple files.