Skip to content

docs: explain the TypeScript file layout for contributors - #129

Merged
wittjeff merged 1 commit into
mainfrom
docs/contributing-typescript
Aug 23, 2026
Merged

docs: explain the TypeScript file layout for contributors#129
wittjeff merged 1 commit into
mainfrom
docs/contributing-typescript

Conversation

@wittjeff

Copy link
Copy Markdown
Collaborator

Converted modules now exist as a .ts source plus a committed .js and .d.ts emit, but CONTRIBUTING.md never said so — and its rule-implementation steps still told contributors to add rule metadata to tests/testaro.js (now generated) and to implement new rules in JavaScript.

This is not hypothetical: in #112 a contributor hand-edited the emitted tests/testaro.js and noted in the PR body that "instructions in CONTRIBUTING.md do not yet advise on what to do about them, so, to avoid doing anything wrong, I have not touched those files." That was a fair complaint about our documentation.

What's in it

  • A new Editing TypeScript files section: the three file forms, why the emit is committed (deep imports and patch-package need the layout unchanged), the in-file "edit this file, not the emitted one" marker, the npm run build:ts / npm run build:registry commands, the CI drift gate that fails a PR whose emit doesn't match, and what to do about not-yet-converted modules and their hand-written .d.ts neighbors.
  • Steps 3 and 4 of "Implementing new rules" updated to name tests/testaro.ts and a TypeScript rule file, each linking to the new section.
  • Fixed the validator job directory: it is validation/tests/jobProperties, not validation/tests/jobs.

Verified that both npm scripts exist as documented and that the "only hover and role use getBasicResult" statement elsewhere in the file is still accurate.

🤖 Generated with Claude Code

Converted modules now exist as a .ts source plus a committed .js and .d.ts
emit, but CONTRIBUTING.md did not say so, and its rule-implementation steps
still told contributors to edit tests/testaro.js and to write new rules in
JavaScript. A contributor recently hand-edited an emitted file for exactly
this reason (#112).

Adds an "Editing TypeScript files" section covering which file to edit, why
the emit is committed, the build:ts and build:registry commands, and the CI
drift gate, and updates steps 3 and 4 to point at it.

Also corrects the validator job directory, which is
validation/tests/jobProperties, not validation/tests/jobs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@wittjeff
wittjeff merged commit fe2e516 into main Aug 23, 2026
1 check passed
@wittjeff
wittjeff deleted the docs/contributing-typescript branch August 23, 2026 15:34
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.

1 participant