Consider using an eslint import plugin instead of import/order
See original GitHub issueš Feature Request
The script swaps in import/order
for tslintās ordered-imports
. I spent quite a while trying to configure it to sort things like tslintās rule did, before discovering eslint-plugin-simple-import-sort, which seems much closer to the old rule (and also much easier to configure!).
Existing Behavior
ordered-imports
becomes import/order
.
Change Proposal
ordered-imports
becomes eslint-plugin-simple-import-sort
I havenāt taken the time to check how well this would work for tslint.json
settings beyond the ones I use, but for me simple-import-sort was fantastic!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
eslint-plugin-import - npm
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import ...
Read more >eslint import/order breaks down when using typescript aliases
P.S. I had issues at some point with the imports themselves that were resolved after I updated the eslint-plugin-import to version 2.23.4.
Read more >eslint-plugin-import-order | Yarn - Package Manager
Use eslint -plugin-import instead (order rule). ESLint plugin to enforce the order of import/require statements. eslint, eslintplugin, eslint-plugin, import ...
Read more >How to quickly configure ESLint for import sorting
How to quickly configure ESlint for import sorting using ... help of a plugin eslint-plugin-import another rule with the name import/order.
Read more >Sorting your imports with ESLint - DEV Community ā ā
Tagged with eslint, import, javascript, react. ... This is an ESLint plugin that enables not only sorting with some nice defaults but alsoĀ ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If thatās the case, we could switch to the much closer plugin as it is easier for users to configure it like TSLint equivalent. I donāt think community will be annoyed by this small change as this is only 1 rule being changed.
Hmm, that makes sense - youāre right @hyperupcall. Iād love a PR for eslint-plugin-import then!