Closed weyert closed 5 months ago
Looks like @chris-olszewski is ahead of it in #8253
Appears to fixed in the latest canary build
I'm not sure what's happening with eslint-config-turbo
yesterday I reported an issue, yet today I also have an issue.
I have a monorepo with turborepo@2.0.3. I have my root package with this npm script "lint": "eslint --fix packages apps"
.
Nothing else on my app has a lint
script (no apps and no packages) so running npm run lint
on the root just runs this.
I have this .eslintrc.js
on the root and I've copied the packages/eslint-config
from the latest turbo starter project npx create-turbo@latest
.
Running this exact script I've described on a new repo works fine and I get the ✔ No ESLint warnings or errors
Running it on my monorepo, returns this
TypeError: Failed to load plugin 'turbo' declared in '.eslintrc.js » @intangible/eslint-config/library.js » eslint-config-turbo': Cannot convert undefined or null to object
Same exact code on packages/eslint-config
, package.json and .eslintrc.js on both packages. Is this related to turbo cache? I reinstalled my monorepo, and for the life of me I can't get it to work. I just realised that this issue seems to indicate I'm not the only one, but installing the canary version does nothing for me.
That sounds similar to the error message I fixed in this PR: https://github.com/vercel/turbo/pull/8405
To be specific, renaming eslint-config-turbo
to turbo
in the ESLint configuration resolves that error.
Still present, same error message
EDIT:
May help someone in the future, but it was related to a turbo.json
file with missing tasks
. The cannot convert undefined or null to object was referring to:
function Au(e,t){"pipeline"in e?Object.entries(e.pipeline).forEach(t):Object.entries(e.tasks).forEach(t)}
Where if e.tasks
is not defined in the turbo.json file, it crashes ESLint.
Verify canary release
Link to code that reproduces this issue
n/a
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
2.0.0-canary.0
Describe the Bug
Upgrading
eslint-plugin-turbo
breaks/ stops the turbo lifting for functioning:Expected Behavior
Able to use the
turbo
listing rulesTo Reproduce
Upgrade to Turbo v2 canary build and try to run the linting rules
Additional context
Appears that code is still referring to
pipeline
instead oftasks
when reading the turbo config file