Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple before single is not working #27

Open
urielha opened this issue Oct 20, 2021 · 2 comments
Open

multiple before single is not working #27

urielha opened this issue Oct 20, 2021 · 2 comments

Comments

@urielha
Copy link

urielha commented Oct 20, 2021

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?

@jackson-dean
Copy link

same issue. It seems to treat any named export as a multiple.

@Arkellys
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants