Transit nodes for lint
Parallel lint and typecheck that still re-run when a dependency changes.
From turborepo, configuration/gotchas.md #7.
^check-types queues up
Run check-types on a cold cache.
Chained on itselfBad
time –
"dependsOn": ["^check-types"]Transit nodeGood
time –
"dependsOn": ["transit"]No edges, stale types
Everything is cached. Change a prop type in ui.
No dependenciesBad
"check-types": {}Transit nodeGood
"dependsOn": ["transit"]{
"tasks": {
"transit": { "dependsOn": ["^transit"] }, // no script matches: runs nothing
"lint": { "dependsOn": ["transit"] },
"check-types": { "dependsOn": ["transit"] }
}
}
Why it matters, pros and cons
Why it matters
transit has no script, so it finishes instantly, but it still links each package to its dependencies' hashes.
Pros
- Every package checks at once.
- A dependency edit re-runs its dependents.
- No deprecated
--parallelflag.
Cons
- Only for tasks that read source, not built output.
- One more task name in
turbo.json. - Easy to misread as a real task.