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

fix: do not use --force when choosing yarn/eslint v8 #123

Merged
merged 2 commits into from
Jun 4, 2024
Merged

Conversation

aladdin-add
Copy link
Member

@aladdin-add aladdin-add commented May 31, 2024

  1. yarn v2+ does not support it.
  2. yarn v1 can install successfully without the flag.

fixes #122

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label May 31, 2024
@aladdin-add
Copy link
Member Author

aladdin-add commented May 31, 2024

it's not covered by the snapshot testing; I had tested locally on:

  • npm ✅
  • yarn v1 ✅
  • yarn v4 ✅
  • pnpm v8.5.0 ✅
  • bun: ❓ (I don't have bun installed)

1. yarn v2+ does not support it.
2. yarn v1 can install without the flag.

fixes #122
@@ -270,6 +270,17 @@ export default [\n${exportContent}];`;
choices: ["npm", "yarn", "pnpm", "bun"]
})).packageManager;

// removing `--force` when:
// 1. yarn v2+ -- it does not support it.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't know if the user is using yarn v1 or yarn v2+, but I've tested yarn v1 is also working fine without --force.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flow looks weird now. it asks to install dependencies before listing them.

$ npx @eslint/create-config
√ How would you like to use ESLint? · problems    
√ What type of modules does your project use? · esm
√ Which framework does your project use? · react
√ The React plugin doesn't officially support ESLint v9 yet. What would you like to do? · 8.x
√ Does your project use TypeScript? · typescript
√ Where does your code run? · No items were selected
√ Would you like to install them now? · No / Yes
√ Which package manager do you want to use? · npm
The config that you've selected requires the following dependencies:

[email protected], @eslint/js, typescript-eslint, eslint-plugin-react      
☕️Installing...

@aladdin-add

This comment was marked as outdated.

@aladdin-add aladdin-add changed the title fix: do not use --force when choosing yarn fix: do not use --force when choosing yarn/eslint v8 Jun 4, 2024
@aladdin-add aladdin-add requested a review from nzakas June 4, 2024 10:48
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit b377ad7 into main Jun 4, 2024
11 checks passed
@mdjermanovic mdjermanovic deleted the issue122 branch June 4, 2024 12:38
@github-actions github-actions bot mentioned this pull request Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Bug: (react-native 0.74.1) error when installing the packages
2 participants