I was getting a lot of false positives like this:
1:34 error Casing of react does not match the underlying filesystem import/no-unresolved
2:25 error Casing of react-redux does not match the underlying filesystem import/no-unresolved
3:27 error Casing of redux-form does not match the underlying filesystem import/no-unresolved
In Windows, you have a case-insensitive file system which enables you to enter directories regardless of their casing. I.e. the path: C:\Git\projects\myproject\src can be entered like this:
cd C:\
cd git <-- this is the culprit
cd projects
cd myproject
cd src
npm run eslint
When using your lint rule import/no-unresolved, this will crash with the above false positives. They will disappear of you go into the directory Git instead of git.
I think the lint rule should not go further back than the level where the package.json is. This problem will appear when you're using either PowerShell or Bash. And it was a huge pain to figure out...
I was getting a lot of false positives like this:
In Windows, you have a case-insensitive file system which enables you to enter directories regardless of their casing. I.e. the path:
C:\Git\projects\myproject\srccan be entered like this:When using your lint rule
import/no-unresolved, this will crash with the above false positives. They will disappear of you go into the directoryGitinstead ofgit.I think the lint rule should not go further back than the level where the
package.jsonis. This problem will appear when you're using either PowerShell or Bash. And it was a huge pain to figure out...