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

remix-eslint-config throws an error when using Yarn PnP #3715

Closed
kiancross opened this issue Jul 12, 2022 · 1 comment
Closed

remix-eslint-config throws an error when using Yarn PnP #3715

kiancross opened this issue Jul 12, 2022 · 1 comment
Labels
bug:unverified pm:yarn3 Bugs related to Yarn 3

Comments

@kiancross
Copy link
Contributor

kiancross commented Jul 12, 2022

What version of Remix are you using?

1.6.4

Steps to Reproduce

  1. In a new directory run yarn init -2.
  2. Then run yarn add -D eslint @remix-run/eslint-config.
  3. Create a file called .eslintrc with the following:
{
  "extends": [ "@remix-run/eslint-config" ]
}
  1. Create a file called test.js with the following:
eslint_Wont_like_This = true
  1. Run yarn eslint test.js.

Expected Behavior

$ yarn eslint test.js
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.

/tmp/t/test.js
  1:1  error  'eslint_Wont_like_This' is not defined  no-undef

✖ 1 problem (1 error, 0 warnings)

$

Actual Behavior

$ yarn eslint test.js

/tmp/t/test.js
  0:0  error  Parsing error: Your application tried to access @babel/preset-react, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.

Required package: @babel/preset-react
Required by: /tmp/t/

Require stack:
- /tmp/t/.yarn/cache/@babel-core-npm-7.18.6-52b1065703-711459ebf7.zip/node_modules/@babel/core/lib/config/files/plugins.js
- /tmp/t/.yarn/cache/@babel-core-npm-7.18.6-52b1065703-711459ebf7.zip/node_modules/@babel/core/lib/config/files/index.js
- /tmp/t/.yarn/cache/@babel-core-npm-7.18.6-52b1065703-711459ebf7.zip/node_modules/@babel/core/lib/index.js
- /tmp/t/.yarn/__virtual__/@babel-eslint-parser-virtual-35cbaac11a/0/cache/@babel-eslint-parser-npm-7.18.2-8989f47b38-dc9328cf33.zip/node_modules/@babel/eslint-parser/lib/worker/babel-core.cjs
- /tmp/t/.yarn/__virtual__/@babel-eslint-parser-virtual-35cbaac11a/0/cache/@babel-eslint-parser-npm-7.18.2-8989f47b38-dc9328cf33.zip/node_modules/@babel/eslint-parser/lib/worker/handle-message.cjs
- /tmp/t/.yarn/__virtual__/@babel-eslint-parser-virtual-35cbaac11a/0/cache/@babel-eslint-parser-npm-7.18.2-8989f47b38-dc9328cf33.zip/node_modules/@babel/eslint-parser/lib/client.cjs
- /tmp/t/.yarn/__virtual__/@babel-eslint-parser-virtual-35cbaac11a/0/cache/@babel-eslint-parser-npm-7.18.2-8989f47b38-dc9328cf33.zip/node_modules/@babel/eslint-parser/lib/index.cjs
- /tmp/t/.yarn/cache/@eslint-eslintrc-npm-1.3.0-1f3c51be25-a1e734ad31.zip/node_modules/@eslint/eslintrc/dist/eslintrc.cjs

✖ 1 problem (1 error, 0 warnings)

$
@machour
Copy link
Collaborator

machour commented Jul 13, 2022

Fixed by #3716

@machour machour closed this as completed Jul 13, 2022
@MichaelDeBoey MichaelDeBoey added the pm:yarn3 Bugs related to Yarn 3 label Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:unverified pm:yarn3 Bugs related to Yarn 3
Projects
None yet
Development

No branches or pull requests

3 participants