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

Docs: Provide install commands for Yarn #13661

merged 1 commit into from Sep 12, 2020


Copy link

@nbaksalyar nbaksalyar commented Sep 6, 2020

npx doesn't work properly with plugins installed with Yarn.

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

  • Documentation update

What changes did you make? (Give an overview)

The installation guide might be slightly confusing for new users - e.g.: I use TypeScript in my project, I install eslint with yarn as the guide says, and then run it with npx eslint --init. It then fails with an error because the TypeScript plugin has been installed with yarn and npx doesn't see it:

Error: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.js': Cannot find module 'eslint'

This can be fixed by using yarn run <cmd> instead of npx <cmd>. This PR changes documentation to reflect this.

npx doesn't work properly with plugins installed with Yarn.
Copy link

@jsf-clabot jsf-clabot commented Sep 6, 2020

CLA assistant check
All committers have signed the CLA.

@eslint-deprecated eslint-deprecated bot added the triage label Sep 6, 2020
@btmills btmills added documentation and removed triage labels Sep 7, 2020
btmills approved these changes Sep 7, 2020
Copy link

@btmills btmills left a comment

Thanks for contributing, @nbaksalyar!

npx doesn't work properly with plugins installed with Yarn.

I didn't know that, but that's annoying. Is that because of the installation changes in Yarn v2? (I tried it with Yarn v1 and didn't have any issues.) Either way, LGTM because I'm fine with having both npm/npx and yarn commands for consistency.

Copy link
Contributor Author

@nbaksalyar nbaksalyar commented Sep 8, 2020

Is that because of the installation changes in Yarn v2?

I think so! I use the berry (v2.2) version for Yarn.

Thanks for reviewing :)

@kaicataldo kaicataldo merged commit f1d07f1 into eslint:master Sep 12, 2020
12 checks passed
Copy link

@kaicataldo kaicataldo commented Sep 12, 2020

Thanks for contributing!

@nbaksalyar nbaksalyar deleted the fix-installation-guide branch Sep 12, 2020
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Mar 18, 2021
@eslint-github-bot eslint-github-bot bot added the archived due to age label Mar 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
archived due to age documentation
None yet

Successfully merging this pull request may close these issues.

None yet

5 participants