question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
KingDarBojacommented, Sep 8, 2020

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.

1reaction
JoshuaKGoldbergcommented, Mar 1, 2022

Hmm, that makes sense - you’re right @hyperupcall. I’d love a PR for eslint-plugin-import then!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found