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: Missing yarn set version step in "Local Linking" instructions with yarn 1 #8961

Open
2 tasks done
danvk opened this issue Apr 21, 2024 · 1 comment
Open
2 tasks done
Labels
documentation Documentation ("docs") that needs adding/updating triage Waiting for maintainers to take a look

Comments

@danvk
Copy link

danvk commented Apr 21, 2024

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

I'm trying to test a rule locally on a project that uses yarn v1.

Following the instructions, I run:

$ cd .../typescript-eslint
$ for package in ./packages/*; do cd $package; yarn link; cd ../..; done
$ cd .../my-project
$ yarn link @typescript-eslint/eslint-plugin @typescript-eslint/parser
yarn link v1.22.19
error No registered package found called "@typescript-eslint/eslint-plugin".
info Visit https://yarnpkg.com/en/docs/cli/link for documentation about this command.

I noticed that yarn --version prints 3.8.1 in typescript-eslint but 1.22.19 in my project. So I ran:

$ yarn set version 1.2.219

In typescript-eslint and repeated the for loop steps. After that, I was able to run yarn link in my own project.

So it seems there's a missing step in the instructions if you're using a yarn version other than the one that typescript-eslint uses.

Affected URL(s)

https://typescript-eslint.io/contributing/local-development/local-linking/

@danvk danvk added documentation Documentation ("docs") that needs adding/updating triage Waiting for maintainers to take a look labels Apr 21, 2024
@danvk
Copy link
Author

danvk commented Apr 21, 2024

Similar issue for the instructions with pnpm:

$ for package in ./packages/*; do cd $package; pnpm link --global; cd ../..; done
Usage Error: This project is configured to use yarn

$ pnpm ...

I assume you need to remove the "packageManager" line from package.json to make this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation ("docs") that needs adding/updating triage Waiting for maintainers to take a look
Projects
None yet
Development

No branches or pull requests

1 participant