Skip to content

refactor: standardize typecheck task as tscheck#240

Merged
rqbazan merged 1 commit into
mainfrom
refactor/typecheck-task-tscheck
Jun 13, 2026
Merged

refactor: standardize typecheck task as tscheck#240
rqbazan merged 1 commit into
mainfrom
refactor/typecheck-task-tscheck

Conversation

@rqbazan

@rqbazan rqbazan commented Jun 13, 2026

Copy link
Copy Markdown
Member

What

Rename the typecheck task/script from test:types to tscheck across the workspace, and update the shared lefthook pre-commit job to run turbo run tscheck.

Why

The shared lefthook config (lefthook/turborepo.yml, consumed via extends/remotes) ran turbo run test:types. Consumers that name their turbo task tscheck (e.g. yoppy, and all of apps/* + packages/* there) hit Could not find task 'test:types', which blocked their pre-commit. Standardizing on tscheck aligns the shared hook with the consumer convention.

Changes

  • turbo.json: test:types task → tscheck
  • root package.json + shared/loggy, shared/clibuddy, vland/cli, run-run/cli scripts: test:typestscheck
  • lefthook/turborepo.yml: pre-commit job → pnpm turbo run tscheck
  • vland/cli init-templates test guard and run-run/CLAUDE.md example updated to the new name

Verification

turbo run tscheck resolves; this branch's own pre-commit ran green (jscheck + tscheck). CHANGELOG history left untouched.

Heads-up

This makes tscheck the standard. Any other repo that extends this lefthook config and still names its turbo task test:types will need to rename to tscheck (or it will fail pre-commit). Consumers already on tscheck (e.g. yoppy) start working once this lands on main and they re-run lefthook install.

🤖 Generated with Claude Code

Rename the `test:types` turbo task and package scripts to `tscheck` so the
shared lefthook pre-commit job runs `turbo run tscheck`, matching the task
name used by consumers.

- turbo.json: test:types -> tscheck
- root + shared/loggy, shared/clibuddy, vland/cli, run-run/cli scripts
- lefthook/turborepo.yml pre-commit job
- update init-templates test guard and run-run docs example

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1bc72e3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rqbazan
rqbazan merged commit c86ef7d into main Jun 13, 2026
3 checks passed
@rqbazan
rqbazan deleted the refactor/typecheck-task-tscheck branch June 13, 2026 18:35
rqbazan added a commit that referenced this pull request Jun 15, 2026
## What

Adds `pretscheck` to the front of the `rr tsc` pre-script precedence
chain:

```
pretscheck ?? pretsc ?? pretypecheck
```

## Why

#240 standardized the typecheck task as `tscheck`. The npm `pre<script>`
convention implies the matching pre-hook should be `pretscheck` — so a
package's `pretscheck` now runs (captured, inside the task) before the
type check. The legacy `pretsc` / `pretypecheck` aliases remain as
fallbacks, so nothing breaks for existing setups.

## Tests

The pre-script feature previously had **no** coverage. This PR adds two
integration tests in `test/integration/tsc.test.ts`:

- `pretscheck` runs before tsc and fails the task when it fails.
- `pretscheck` takes precedence over the legacy `pretsc` /
`pretypecheck` aliases (the legacy scripts never fire).

`pnpm rr check` and the full `@rrlab/cli` test suite are green; a
`patch` changeset is included.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vland-bot vland-bot Bot mentioned this pull request Jun 15, 2026
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