-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[turborepo] ESLint TypeError: Cannot convert undefined or null to object with eslint-plugin-turbo 1.10.4 #5355
Comments
Same, issue is not present in 1.10.3 |
Hi, thanks for opening an issue. I added a commit with a test to try to trigger this error, but the test passes. Are you able to put together a repro-repo? |
@arlyon, sure, let me see what i can do... |
@arlyon sorry for the delay. Here is the repo I put together, and I have confirmed that it's triggering the error: https://github.com/benmarch/eslint-plugin-turbo-error-example The offending line is in the "docs" app: https://github.com/benmarch/eslint-plugin-turbo-error-example/blob/main/apps/docs/app/page.tsx#L8 Thanks for looking into this! |
having the same issue, last working version for us is ✅ |
I can confirm I am passing and failing under these same listed module versions when my code uses |
+1 -- it has broken with |
I have a PR up now, just waiting on feedback. Thanks for the repo @benmarch |
### Description Closes #5355 ### Testing Instructions Look at this repo for a demonstration of the issue. https://github.com/benmarch/eslint-plugin-turbo-error-example
What version of Turborepo are you using?
1.8.3
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Describe the Bug
Attempting to run ESLint with eslint-plugin-turbo@1.10.4 throws errors and exits anywhere I'm using
process.env
. This just started happening, and appears to be related to the latest release of the plugin because the previous version we were using (1.9.8) is working as expected.Expected Behavior
It should not exit
To Reproduce
Install ESLint (we're using 7.32.0, haven't tried updating yet) and eslint-plugin-turbo@1.10.4. Then configure ESLint to use the turbo plugin and run it against any file containing
process.env
(example:const remoteVars = (process.env.REMOTES || {}) as Record<string, () => Promise<any>>
)I'll see what happens if we bump the ESLint version in the meantime...
UPDATE (T+5 minutes)
Upgraded to ESLint 8.43.0 and I'm getting a better error now but it's still failing in the same way:
And it's pointing to an environment variable that is declared in turbo.json.
Reproduction Repo
No response
The text was updated successfully, but these errors were encountered: