-
Notifications
You must be signed in to change notification settings - Fork 46
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
Support Jest's modulePaths
option
#38
Comments
This runner should work just like eslint itself does imo - which means that in order for it to work, eslint should be in the PATH. |
I agree with @ljharb |
Closing, because this is answered. iow, use |
Unfortunately that doesn't work, getLocalESLint resolves the eslint module using a full path, so require never looks at alternate PATH options or for a globally installed eslint. To me it looks like #35 is so close to this issue that it may be best to discuss the problem there, either that or file a new issue? |
Like Midzelis in #35, I'm having trouble reaching eslint when it's located outside of the current working directory. In my case I have a bunch of projects, one which is a collection of test utils that can be accessed by the other projects during test. This test utils project holds jest-runner-eslint and the eslint module. When run, jest-runner-eslint only looks for eslint in the directory of the application under test, I can't direct it to look in the test utils directory.
From the code it looks like only config.rootDir is checked as a possible modules source, where it probably should support the
modulePaths
option from the jest config. Then I can set where the module should look for eslint.The text was updated successfully, but these errors were encountered: