eslint-plugin-turbo not working with Nitro v3
Closed this issue · 6 comments
Verify canary release
- I verified that the issue exists in the latest Turborepo canary release.
Which canary version will you have in your reproduction?
2.3.3
Expected behavior
Using framework specific vars like process.env.NITRO_DATABASE_URL
or process.env.NUXT_API_URL
should be allowed but usage throws
NITRO_DATABASE_URL is not listed as a dependency in turbo.json turbo/no-undeclared-env-vars
Actual behavior
Allow list should be on par with the docs: https://turbo.build/repo/docs/crafting-your-repository/using-environment-variables#framework-inference
Is this somehow related to some other flag to identify the project? I just checked and it works correctly in a Nuxt project but not in a pure Nitro project with exactly the same eslint config
Can you provide us a reproduction? We have code for this, but a reproduction would help to show us if we have a bug or if something is mis-configured.
Thanks for the quick response! I just double checked and made a reproduction repo. The error occurs with Nitro v3 only which is currently in active development. The npm package has changed from nitropack
to nitro
, maybe this is why NITRO_
variables are not allowed.
Reproduction:
https://github.com/MickL/nitro-v3-turbo-lint
If you type bun lint
you see an error that should not be shown
Simple enough! Updating our detection here: #9608
If that doesn't look right, please let me know!
Thanks for the fix! When will it be released? I checked regularly but still no update on npm.
Looks to be in https://github.com/vercel/turborepo/releases/tag/v2.3.4-canary.3!