Skip to content

no-duplicates autofix causing multiple "from"s #1403

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

Closed
willyrk1 opened this issue Jul 2, 2019 · 0 comments · Fixed by #1666
Closed

no-duplicates autofix causing multiple "from"s #1403

willyrk1 opened this issue Jul 2, 2019 · 0 comments · Fixed by #1666

Comments

@willyrk1
Copy link

willyrk1 commented Jul 2, 2019

This code fails "import/no-duplicates" rule:

import reducer from './glassSupplement';
import { glassDefaultState } from './glassSupplement';

Running an autofix turns the code into this (a syntax error):

import { glassDefaultState } from reducer from './glassSupplement';

Expected this instead:

import reducer, { glassDefaultState } from './glassSupplement';

.eslintrc.js:

module.exports = {
    "extends": [ "eslint:recommended", "plugin:import/errors", "plugin:import/warnings" ],
    "parser": "babel-eslint",
};

devDependencies:
"babel-eslint": "^9.0.0",
"eslint": "^5.16.0",
"eslint-plugin-import": "^2.18.0",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants