Specify path to eslint
Hello, thank you for your work on this project!
From the README:
If eslint is found in the current working directories node_modules folder, then this version of eslint is going to be used. Otherwise, the version of eslint that ships with eslint_d is used as a fallback.
Is there a way to specify the path to where eslint can be found?
We have many repos, all with the same ESLint configuration and rules.
Thus, we have a centralized repo that contains node_modules/ with eslint and the custom rules.
Therefore, each project won't have a node_modules/ directory with eslint, and we don't want to fallback to the version of eslint that ships with eslint_d.
I was able to get this to work by adding the path to that centralized repo's node_modules/.bin directory (containing eslint) to my PATH variable.
Thanks for posting. Care to add a short note to the readme for others that might have the same question? 🙏
Thanks for posting. Care to add a short note to the readme for others that might have the same question? 🙏
Sure, I'll re-open this for now, and see if I can submit a PR within the next week or so to close this.
I think it may be best if we note which takes higher precedence:
eslintin the current working directory'snode_modulesfolder- or
eslintin thePATH.
Does anyone happen to know by chance?
Based on this code, my guess is the current working directory's node_modules/ folder takes higher precedence.
If not, I can test to find out.
Thanks for the responsiveness @mantoni!
With the release of v14.0.0, I'm not sure this still works. Can you check?
As an alternative, there is the new ESLINT_D_MISS environment variable. For this uses case, it could allow to specify an alternative path to eslint. Please let me know.