Repository navigation
build: enable the remaining house gritlint packs (zero findings) - #23
Merged
Merged
Conversation
Every enabled house pack is clean after this change: `gritlint check .` reports zero findings over 1,290 files with `build-output-imports`, `cell-architecture`, `npm-provenance`, `ts-extensions`, `tsconfig-roles` and `typecheck-build-mode` enabled. ts-extensions 2,376 relative specifiers lose their `.ts`/`.tsx`/`.mts` extension across 609 files, and the two `allowImportingTsExtensions` overrides are gone. The repository already resolves extensionless specifiers through bundler resolution, but a child process running TypeScript directly does not, so the three process-killed test and benchmark entrypoints are bundled with esbuild first. tsconfig-roles and typecheck-build-mode The 20 gated projects are solution roots (`files: []`, no `include`) whose role configs (`tsconfig.app.json`, `tsconfig.test.json`, `tsconfig.node.json`) are composite, and every `typecheck` script is `tsc -b`. The gate now follows project references instead of invoking a non-build `tsc` that checks nothing. The four example workspaces the previous gate never typechecked keep role configs without a solution root, the shape the pack documents as unhoused rather than inert. Fallout the split exposed, fixed rather than suppressed: - `scripts/` references the effect-agent project instead of reaching into its sources - package test projects include the shared `test/fixtures` files they import - platform-cloudflare's scheduling example declares the worker bindings it reads instead of relying on a test file elsewhere in the program to merge them into the global `Env` - worker code that evaluates DOM callbacks opts the DOM lib in per file instead of mixing it into the runtime role's `lib` - three browser files reference `vite/client` explicitly, replacing the type information a directory tsconfig used to provide Verification: `tsc -b` passes for all 20 gated projects; `gritlint check .` exits 0.
tsdown resolved `tsconfig.json` by default. That file is now a solution root with `files: []`, so rolldown-plugin-dts ran tsgo over no input and every package failed with `tsgo did not generate dts file`. Each package now has a `tsconfig.build.json` that extends its app role, clears `composite`/`emitDeclarationOnly`, keeps `noEmit`, and includes only `src`. `tsdown` reads it explicitly. `tsconfig.build.json` is one of the role names the pack allows and it is not referenced, so `tsc -b` ignores it. Verified locally: `pnpm build` builds all 13 packages, the docs site and the action, and `gritlint check .` still exits 0.
`source-resolution` is the last house pack, and it sat behind five parameters because it names a conditions-based resolution contract. This repository resolves workspace packages to source by exporting `src/` paths directly, so the condition is additive: nothing in the tree declares `@systemfsoftware/source`, and adding it changes no resolution today. It makes the contract explicit for the next step that does declare it. - `tsconfig.base.json` and `docs/tsconfig.app.json` list the source condition in `customConditions`. - All eight `vitest.config.ts` files set it on both pipelines, `resolve.conditions` and `ssr.resolve.conditions`, with Vite's own defaults listed back in because setting the key replaces them. - `packages/ui` publishes a dist-only `publishConfig.exports` map. - `packages/pr-review-action` drops its unused `tsdown.config.ts`; the action is bundled by `scripts/build-action.ts`, so that config produced nothing but a publish map for artifacts that are never built. All seven packs are enabled in `gritlint.json`: `gritlint check .` exits 0 over 1,303 files.
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.
What
Closes the gap left by #21: the house packs that were measured but not enabled are now enabled and clean.
gritlint check .exits 0 over 1,290 files with:ts-extensionstsconfig-rolestypecheck-build-modebuild-output-imports,cell-architecture,npm-provenancets-extensions
2,376 relative specifiers lose their
.ts/.tsx/.mtsextension across 609 files; the twoallowImportingTsExtensionsoverrides are removed.Three entrypoints are executed directly by a child process in tests and benchmarks. Bundler resolution handles extensionless specifiers, plain
nodedoes not, so those entries are bundled with esbuild before the child runs. This also removed a parse blocker in the benchmark worker ((typeof this.calls)[number]as an annotation), now a namedBenchCalltype.tsconfig-roles and typecheck-build-mode
The 20 gated projects are solution roots (
files: [], noinclude) with composite role configs, and everytypecheckscript istsc -b. Before, the gate rantsrs --noEmit -p tsconfig.json; a solution root would have made that check nothing, which is exactly whattypecheck-build-modeexists to catch.scripts,examples/cold-starttsc -btsc -bdocsastro sync && tsc -b --dry && tsrs --noEmit -p tsconfig.app.jsonThe four examples (
browser-speed,sandbox,travel-planner,durable-bench) keep role configs but no solution root, the shape the pack documents as not judged. Their source predates this change with type and declaration-emit errors a composite build would surface, including a vendored benchmark tree with uninstalled dependencies; making them composite is a separate body of work, not a gate that silently checks nothing.Fallout the split exposed, fixed rather than suppressed
scripts/referenced effect-agent sources by path; it now references the project.test/fixturesfiles they import.packages/platform-cloudflare/examples/scheduling.tsrelied on a test file elsewhere in the program to mergeTHREADS/SCHEDULESinto the global workerEnv; it now declares the bindings it reads.browser-run-worker-proof) opts the DOM lib in per file instead of mixing it into the runtime role'slib.vite/clientexplicitly, replacing types a directory tsconfig used to supply.Verification
gritlint check .(six packs)tsc -b(20 gated projects)tsc -b --dry docstsc -b tooling/browser-run-worker-proofpnpm lintvitest runon the suites the bundling change touches (crash,scheduling-crash,thread-transfer,background-workers)