Fix nx configuration to actually run type linter#32776
Merged
Conversation
Currently, `nx lint:types` is configured to indirect its `tsc` incantations via pnpm. As far as I can tell, this is unnecessary; worse, it means we seem to hit a pnpm reentrancy bug which causes pnpm not to run those commands at all if the top level pnpm has `--if-present`.
... to evade knip.
florianduros
approved these changes
Mar 13, 2026
Comment on lines
+37
to
+39
| // We indirect via `pnpm exec` to stop knip interpreting the | ||
| // commandline and declaring `playwright` and `./tsconfig.module_system.json` | ||
| // as unlisted dependencies. |
Member
There was a problem hiding this comment.
I suppose nx accepts comments in json
Member
Author
There was a problem hiding this comment.
thankfully it seems to, yes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current configuration for
nx lint:typesindirects itstscincantations via pnpm, but that means they don't actually work due to a pnpm reentrancy bug (pnpm/pnpm#5291) which causes pnpm not to run those commands at all if the top level pnpm has--if-present.Turns out that adding an explicit
execto the pnpm commandline works around the bug.Also I've taken the opportunity to document the reason the indirection is there in the first place, to save anyone else losing a day on it. (It seems to be some sort of
knipbug, but reproducing it outside element-web was more effort than I can spare.)