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

Error when using shared config #393

Closed
rmisio opened this issue Jun 22, 2016 · 6 comments
Closed

Error when using shared config #393

rmisio opened this issue Jun 22, 2016 · 6 comments
Milestone

Comments

@rmisio
Copy link

rmisio commented Jun 22, 2016

I'm getting the documented import error with Electron and I'd like to use the shared Electron config to avoid it. But, I'm having problems getting the shared config to work.

I tried adding plugin:import/electron to the extends array as so:

{
  "extends": [
    "airbnb",
    "plugin:import/electron"
  ]
}

but that results in:

image

What am doing wrong?

@rmisio rmisio changed the title Error when using shared config. Error when using shared config Jun 22, 2016
@benmosher
Copy link
Member

I'm not sure. I'm definitely seeing that too. I have no idea why... the react config is basically the same thing (one Array key in settings) and it works fine.

@benmosher
Copy link
Member

Short term, you can definitely just add the "import/core-modules": ["electron"] setting to your eslintrc "manually".

@rmisio
Copy link
Author

rmisio commented Jun 22, 2016

I had tried that without success. I tried putting it in "rules":

{
  "extends": [
    "airbnb"
  ],
  "plugins": [
    "import"
  ],
  "rules": {
    "import/core-modules": [
      "electron"
    ]
  }
}

which resulted in:

image

I also tried putting it in "settings":

{
  "extends": [
    "airbnb"
  ],
  "plugins": [
    "import"
  ],
  "settings": {
    "import/core-modules": [
      "electron"
    ]
  }
}

which resulted in the same lint import error on the Electron module. Am I adding it to the setting in an incorrect way?

btw, thanks for the quick response!

@benmosher
Copy link
Member

Ohhh, okay. I see now.

Sorry, the electron stuff from #365 is not published to npm yet. It will be in the next release. It is merged to master but has not been published yet.

@benmosher
Copy link
Member

Just published 1.10.0 to npm, you can upgrade and use it now! 😁

@benmosher benmosher added this to the v1.10.0 milestone Jun 30, 2016
@rmisio
Copy link
Author

rmisio commented Jun 30, 2016

thanks!

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

No branches or pull requests

2 participants