Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Doesn't work with atom linter-eslint plugin #3

Open
jbinto opened this issue Nov 25, 2016 · 6 comments
Open

Doesn't work with atom linter-eslint plugin #3

jbinto opened this issue Nov 25, 2016 · 6 comments

Comments

@jbinto
Copy link

jbinto commented Nov 25, 2016

When I run eslint at the command line, everything works as expected (I can do an import Foo from '~foo' and it warns correctly if i give a bad path.)

However, when using Atom's linter-eslint plugin (using the local .eslintrc config), it always gives an import/no-unresolved error, whether the path is good or not. Never had something fail only in atom, which is weird since it should be using the exact same config as eslint on the command line. Maybe something to do with relative paths?

Any idea why this might be, or how to begin debugging it?

@olalonde
Copy link
Owner

Sorry, I can't really say :/ wrote this really quickly and it's been a while. I'm also having weird issues occasionnally with this

@ouabing
Copy link

ouabing commented Feb 9, 2017

+1 here!

@zuhair-naqvi
Copy link

+1

1 similar comment
@KirillSuhodolov
Copy link

+1

@panzi
Copy link

panzi commented Aug 24, 2017

I have this or a similar problem. I use babel to compile the files under src to lib, so babel needs the rootPathSuffix to be lib in order to load the compiled files, but eslint would need it to be src, because during development the files under lib simply don't yet exist. So I would like to write this in my eslintrc to override the configuration in babelrc:

settings:
  import/resolver:
    babel-root-import:
      rootPathPrefix: "~"
      rootPathSuffix: "src"
    node: {}

@miriyalee
Copy link

Use this version.
https://github.com/BlitzBanana/eslint-import-resolver-babel-root-import

npm install --save-dev eslint-plugin-import eslint-import-resolver-babel-root-import-fixed
or
yarn add eslint-plugin-import eslint-import-resolver-babel-root-import-fixed

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

No branches or pull requests

7 participants