Separate named import sorting from sort-imports
See original GitHub issueusing eslint 3.11.1 I would like to enforce sorting of named imports.
I would not like to enforce sorting of imports.
Bad
import whatever from 'whatever';
import {foo, bar} from 'baz';
Good:
import whatever from 'whatever';
import {bar, foo} from 'baz;
I can currently validate the order of the named imports but only if I turn on validating the imports entirely. I would like to adjust these independently.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:12 (6 by maintainers)
Top Results From Across the Web
sort-imports - ESLint - Pluggable JavaScript Linter
This rule checks all import declarations and verifies that all imports are first sorted by the used member syntax and then alphabetically by...
Read more >How to quickly configure ESLint for import sorting
sort-imports offers a way to alphabetically organize the imports using ... We can first differentiate the groups of our imports and split ......
Read more >Split'n'Sort Imports - Visual Studio Marketplace
Extension for Visual Studio Code - An opinionated extension to split and sort imports into one export per import.
Read more >Use isort to sort your Python module imports automatically
The isort module will solve this problem for you! isort is a Python library to sort imports alphabetically, and automatically separated into sections...
Read more >What's the correct way to sort Python `import x` and `from x ...
related third party imports; local application/library specific imports. However, it does not mention anything how the two different ways of ...
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 FreeTop 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
Top GitHub Comments
Thanks for your interest in improving ESLint. Unfortunately, it looks like this issue didn’t get enough support from the team and so I’m closing it. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach consensus after a long time tend to never do it, and as such, we close those issues. This doesn’t mean the idea isn’t interesting, just that it’s not something the team can commit to.
sort-imports
I’d like to just sort my imports as a standard alpha sort in Sublime text.
If I add a line of whitespace for any reason, then it would understand there are distinct alpha groupings.
sort-imports-by-members
http://eslint.org/docs/rules/sort-imports#membersyntaxsortorder would apply.
Currently this rule makes too many assumptions by requiring type sort.
Optionally, if the rule remained as-is, then an
"off"
option formemberSyntaxSortOrder
would be excellent as it’s siblings can be toggled.