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

Support ESLint module install globally via yarn #187

Closed
dbaeumer opened this issue Dec 20, 2016 · 14 comments
Closed

Support ESLint module install globally via yarn #187

dbaeumer opened this issue Dec 20, 2016 · 14 comments
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities

Comments

@dbaeumer
Copy link
Member

Need to add yarn's global module install location to the NODE_PATH when resolving the node module. Something comparable to npm config get prefix

@WoodyWoodsta
Copy link

WoodyWoodsta commented Jan 22, 2017

For those wondering, a workaround on Linux is to set the following:

eslint._legacyModuleResolve: true, 
eslint.nodePath: "/your/home/dir/.config/yarn/global/node_modules/"

@idibidiart
Copy link

idibidiart commented Jan 25, 2017

eslint.nodePath doesn't seem to fix this on Mac

@dbaeumer
Copy link
Member Author

dbaeumer commented Feb 2, 2017

Does anyone know how to determine the global module location for yarn. I tried yarn config get prefix and yarn config listbut nothing contains the global install location.

@dbaeumer
Copy link
Member Author

dbaeumer commented Feb 2, 2017

Under Windows is seems to be ~\AppData\Local\Yarn\config\global\node_modules.

@eduedix
Copy link

eduedix commented Feb 3, 2017

yarn global bin ?

@dbaeumer
Copy link
Member Author

dbaeumer commented Feb 6, 2017

yarn global bin prints the same as npm config get prefix however this is not the location yarn installs global npm modules. I am still a little lost here.

@dbaeumer
Copy link
Member Author

@eduedix thanks for opening the yarn issue.

@reybango
Copy link

@dbaeumer I reached out to the FB team and pointed them at this issue. Hoping they'll jump in and help.

@dbaeumer
Copy link
Member Author

@reybango thanks. I retested this today and yarn still doesn't provide me with command to find the global node modules install location.

@BYK
Copy link

BYK commented Sep 22, 2017

Added a PR here: yarnpkg/yarn#4522

@BYK
Copy link

BYK commented Sep 22, 2017

Released Yarn 1.1.0 with this PR merged.

@dbaeumer
Copy link
Member Author

@BYK Thanks!

@dbaeumer
Copy link
Member Author

@marswong
Copy link

Indeed, there is nothing to do with yarn, just add "eslint.packageManager": "yarn" to your vscode settings and it would fix at all :)

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

7 participants