Open codefactor opened 4 years ago
I think I found the reason why it is not doing the case-insensitive sorting - it looks like the code is configured to do so here: https://github.com/renke/import-sort/blob/master/packages/import-sort-style-eslint/src/index.ts#L28
But it's not effective because of the way my package.json is setup like this:
"eslintConfig": {
"extends": "@xweb/eslint-config"
},
I think we might be relying on an eslint feature that was introduced in a newer version of eslint, I see that we are using version 6.8.0 and the @xweb/eslint-config/index.js uses a module.exports to expose the before mentioned rule in the description. But that is not being picked up by this import-sort-style-eslint
because that code relies on eslint version 5.x -- at least this is my best guess at this point without knowing too much about this style of extending the eslintConfig from a different project.
Yes, the algorithm to sort is provided by the sort style. You probably want to create an issue on https://github.com/renke/import-sort then.
All of my projects have the following settings for eslint:
Is there already a way to allow this?
For example:
Would need to be sorted like this:
Otherwise I can't use the auto-imports extension because it always breaks this lint rule.