-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add sort rule for named imports #1732
Comments
Duplicate of #1577. |
@ljharb I think that might be a different issue. That issue seems to be about the order of import line based on import names instead of path. This issue is about the order of named imports inside an import line. |
I think your use case is covered by https://eslint.org/docs/rules/sort-imports |
Does that work alongside |
I believe you can use it with ignoreDeclarationSort and it should work |
👍 Can confirm it does work. Thanks!
|
The "import/order" rule does NOT enforce in-member sorting; this rule is provided separately by ESLint, and has been modified to work with eslint-plugin-import. For more information, see: import-js/eslint-plugin-import#1732
Add ESLint rules for linting imports, based on my own preferences. - Sort imports using import/order and sort-imports (both must be used to sort import declarations and imported members; see import-js/eslint-plugin-import#1732 ) - Imports must be at top of file - Add exactly 1 newline after import - Other basic sanity checks not covered by TypeScript
duplicate of #163 |
❌
✔️
Not sure if this should be a new rule or an option under
import/order
. Both tslint and eslint have a option for this in their import order rules.I can attempt to make a PR if we think this is a good idea.
The text was updated successfully, but these errors were encountered: