eslint-plugin-sort-imports-es6-autofix
eslint-plugin-sort-imports-es6-autofix copied to clipboard
multiple before single is not working
I'm using version 0.6.0
With the configuration from the readme
{
'plugins': [
'sort-imports-es6-autofix',
],
'rules': {
'sort-imports-es6-autofix/sort-imports-es6': [2, {
'ignoreCase': false,
'ignoreMemberSort': false,
'memberSyntaxSortOrder': ['none', 'all', 'multiple', 'single'],
}],
},
}
And let say I have this file with imports:
import { a } from './modules/one';
import { aa, b, c} from './modules/two';
import { c as d, a as k} from './modules/four';
import { x, y} from './modules/three';
It doesn't put the first import after all others (multiple before single) So the eslint can't fix it.
Am I doing something wrong? or is it indeed a bug?
same issue. It seems to treat any named export as a multiple.
This is the point of this plugin. You can just use the original ESLint rule sort-imports if you want imports such as { a } to be considered single.