Eslint-plugin-import: Enforce order inside named import list

Created on 5 Oct 2020  路  2Comments  路  Source: benmosher/eslint-plugin-import

I haven't found a rule for it, so I'm assuming there is none yet. It would be nice if there was an option to enforce alphabetic order inside the list of named imports, ie being able to autofix this:

-import whatever, {d, b, c, a} from 'foo';
+import whatever, {a, b, c, d} from 'foo';

Most helpful comment

Native eslint sort-imports rule with { ignoreDeclarationSort: true } works as expected for me. No any conflicts with eslint-plugin-import. Can be closed.

All 2 comments

Related to #1577.

Does https://eslint.org/docs/rules/sort-imports not cover this with { ignoreDeclarationSort: true }?

Native eslint sort-imports rule with { ignoreDeclarationSort: true } works as expected for me. No any conflicts with eslint-plugin-import. Can be closed.

Was this page helpful?
0 / 5 - 0 ratings