-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
babel/eslint plugins doesn't work in yarn workspaces w/ pnp #6514
Comments
I believe this is because It looks like it tries to dynamically resolve it at runtime: https://github.com/eslint/eslint/blob/caeb223c4f7b0b6fe35e5348ae0df4c6446b5bed/lib/config/config-file.js#L475 PnP doesn't know about this dependency at the time that it resolves them, and when falling back to node's default implementation, node can't find it either because it's not in I think you could resolve this by telling yarn to leave |
Obviously it isn't feasible for this to be done manually for each environment. Babel/eslint relies on plugins and there are many of them. I had these plugins in my workspace peer dependencies and that didn't help. Is there a way to specify a regex to specify a list of unplugging modules? |
I tried unplugging and it didn't seem to really work btw. and I can confirm this is a workspace issue, if I have a standalone repo, pnp works fine as expected. |
What happens is this:
There's a few points here:
|
I had a similar issue with
And I was getting this error:
Upgrading to |
@PaulRBerg did you get yarn pnp to work with yarn workspaces and create-react-app? Did you have to use config modifiers like craco or rewired? |
@bugzpodder I didn't use pnp or configs like craco/ rewired. Just basic workspaces + create-react-app. |
create a yarn workspace, one of which is:
.eslintrc.json
and run yarn --pnp && yarn lint. it fails with
ESLint couldn't find the plugin "eslint-plugin-filenames".
Same with babel plugins:
package.josn
and .babelrc
@arcanis
The text was updated successfully, but these errors were encountered: