-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Disabling built-in ESLint breaks optional chaining #29264
Comments
This is a duplicate of #29105 |
If you inspect your lock file or check with Also it seems like it worked fine with NPM + Lerna on that 2.29.2 version? |
@LekoArts You are correct! Sorry about that. I had not considered that in regenerating my lockfile I'd get a Gatsby upgrade as a side effect, my mistake. Yes, it worked correctly when I actually had 2.29.2. I'll revise my comment in the other thread. |
(I didn't want to clutter #29105 with what might be a different issue, but they may well be related, since we're both observing broken optional chaining.)
Description
Long ago I disabled Gatsby's built-in ESLint for my sites by following this how-to (TL;DR,
touch .eslintrc
).This week, when I switched from Lerna + NPM to Yarn (v1) Workspaces, my Gatsby sites started throwing Webpack parsing errors during
gatsby develop
when encountering optional chaining syntax. Everything is fine duringgatsby build
.If I remove the blank
.eslintrc
, it resolves the issue.Steps to reproduce
I'm not entirely sure. I can't say if the different dependency tree calculated by Yarn is actually the root cause. I tried removing recently added dev dependencies like TypeScript, I tried messing with my root workspace ESLint config, but the only thing that works is removing that blank
.eslintrc
file from each site.I'm not seeing any detrimental effects from removing the blank
.eslintrc
, I just wanted to report the very strange change in behaviour, because I never would have expected that file to impact Webpack behaviour. It took quite some time to figure out.Environment
Node 12.19 with Gatsby 2.29.2 (I'm updating some packages later today, I'll update to confirm whether it's still occurring with newer Gatsby).
The text was updated successfully, but these errors were encountered: