Skip to content

chore: drop comments from tsconfig.json, moving their substance to CONTRIBUTING - #18

Merged
btravers merged 1 commit into
mainfrom
chore/tsconfig-comments
Aug 7, 2026
Merged

chore: drop comments from tsconfig.json, moving their substance to CONTRIBUTING#18
btravers merged 1 commit into
mainfrom
chore/tsconfig-comments

Conversation

@btravers

@btravers btravers commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Matches the treatment tsconfig.consumer.json got — plain JSON, with the
reasoning kept where it can be read.

One block was stale, not relocated

The largest comment described a consumer-side hazard that no longer exists:

the construction seal: src/types.ts seals classes with the module-private
CtorKey symbol, and a consumer that exports an entity subclass with
declaration: true gets TS4020 … Note the base sets declaration: true, not
false as the CtorKey comment in src/types.ts still says.

#13 replaced CtorKey with the exported ConstructionKey, so consumers no
longer get TS4020 — there is a fixture in CI that fails if they ever do again.
CtorKey does not exist, and the types.ts comment it complains about was
rewritten in the same PR. Dropped rather than moved.

The rest moved to CONTRIBUTING

Two new subsections under "The gate":

  • The consumer pass — what tsconfig.consumer.json is for, and why both of
    its overrides are load-bearing. This is where the TS4020 story lives now:
    as a description of the guard rather than a warning about a live bug.
  • Publishing settings — why declarationMap is off (files: ["dist"]
    excludes src/, so published maps would be dead-ends), and the non-obvious
    part: tsdown reads that tsconfig for its --dts emit, so those settings
    shape the published types while the plain tsc pass is noEmit.

The exclude note about *.test-d.ts joins the existing "Type-level tests"
section, which also loses a reference to add — renamed computed in #10.

Gate

format --check, lint, typecheck (three passes), test (120, 11 files),
knip, build — all green.

Copilot AI lite review requested due to automatic review settings August 7, 2026 00:49
@btravers
btravers merged commit 5d665c4 into main Aug 7, 2026
14 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes explanatory comments from packages/entity/tsconfig.json (keeping it plain JSON) and relocates the durable rationale into CONTRIBUTING.md, aligning with how tsconfig.consumer.json is treated and making the reasoning easier to discover and maintain.

Changes:

  • Dropped now-unneeded comments from packages/entity/tsconfig.json, leaving a clean JSON-only config.
  • Added/expanded CONTRIBUTING documentation for the “consumer pass”, publishing-related TS settings, and why *.test-d.ts is excluded from the main tsc pass.
  • Added a patch changeset documenting this documentation-only move (and explicitly noting the stale TS4020 block was intentionally not relocated).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/entity/tsconfig.json Removes embedded rationale comments while preserving the effective compiler settings.
CONTRIBUTING.md Documents the consumer-typecheck fixture and publishing/typecheck rationale previously kept in tsconfig comments.
.changeset/tsconfig-comments.md Adds a patch changeset describing the documentation-only migration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@btravers
btravers deleted the chore/tsconfig-comments branch August 7, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants