Skip to content

chore: simplify tooling to oxlint + tsc - #378

Merged
dinwwwh merged 11 commits into
mainfrom
claude/simplify-lint-build-tools-wo4j8a
Nov 5, 2026
Merged

dinwwwh merged 11 commits into
mainfrom
claude/simplify-lint-build-tools-wo4j8a

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Applies the same tooling setup as middleapi/standard-server#184: oxlint for lint and type checks, oxfmt for formatting, and plain tsc for builds, replacing uncheck and unbuild.

Lint and type check

  • pnpm check / pnpm fix run oxlint, with type-aware rules and type checking enabled in oxlint.config.ts (via oxlint-tsgolint). One pass covers lint, type-aware rules and TypeScript errors, including *.test-d.ts.
  • pnpm format runs oxfmt. Formatting is no longer checked in CI.
  • pnpm repo:fix runs sherif --fix, which fixes monorepo issues such as unordered or mismatched dependencies. It runs by hand, not in CI.
  • Removed uncheck, the pre-commit hook, and the Stop hook in .claude/settings.json that ran uncheck after every Claude Code turn. The former presets are written out in oxlint.config.ts, oxfmt.config.ts and the tsconfigs.
  • The correctness and suspicious categories are errors, plus a short list of hand-picked rules, with unicorn/no-thenable still off. Rules that the old preset had and these don't cover are dropped on purpose, matching standard-server. The 49 new findings are handled:
    • 2 in package source: renamed shadowed names in downgrader/src/v3.1-to-v3.0.ts. A callback's value became item, and the inline parameter, which shadowed the inline() function, became isInline.
    • 15 fixed in tests: 12 unnecessary assertions (autofixed) and 3 .sort() calls changed to .toSorted().
    • 32 turned off for test files and bench helpers: no-shadow, consistent-function-scoping, and no-generated-empty-object-type. The namespace.test-d.ts checks build a {} type on purpose.
  • Removed the oxc/no-accumulating-spread disable/enable comments in router/src/index.ts. That rule is no longer on, so the comments did nothing.
  • Dependabot: removed the uncheck group. Minor and patch dev-dependency updates, oxlint and oxfmt included, still come grouped in one PR (dev-dependencies-minor-patch).

TypeScript

  • module: nodenext and verbatimModuleSyntax. Relative imports now use explicit .ts extensions, which rewriteRelativeImportExtensions turns into .js on build.
  • Options that are already covered are left out. allowImportingTsExtensions is implied by rewriteRelativeImportExtensions, and resolveJsonModule by nodenext, so JSON imports written with { type: 'json' } are still typed.
  • Shared settings live in tsconfig.lib.json, including include (src) and exclude. Each package tsconfig is now a single extends, with no project references.
  • Unchanged: exactOptionalPropertyTypes, lib: ES2024 for tests and scripts, and ES2022 with no DOM types for package source. @typescript/typescript6 stays because namespace.test.ts uses TypeScript's JS API.

Build and CI

  • prepack runs plain tsc, which emits one .js and one .d.ts per source file into dist. publishConfig.exports now points at .js / .d.ts instead of .mjs / .d.mts. Removed the leftover unbuild config from each package's package.json.
  • New publish_preview CI job, the same as standard-server's: pkg-pr-new packs every package on each PR and publishes installable previews. Packing runs prepack, so errors that only come from generating .d.ts files fail on the PR instead of first showing at release. The old uncheck caught them through tsc -b.
  • Tested against the published 0.6.0: every entry point's runtime exports are identical. A consumer project's types check the same way under nodenext and bundler, with exactOptionalPropertyTypes and skipLibCheck: false.

Editors and agents

  • VS Code: format and fix on save with the oxc extension, which it recommends.
  • Zed: formats and fixes on save through the Oxc extension's language servers. .zed/settings.json is now identical to standard-server's, so the old typescript-language-server auto-import preference is gone.
  • Replaced the empty .claude/CLAUDE.md with AGENTS.md.
  • Ignored .claude/worktrees/, which vitest also skips now.
  • oxlint and oxfmt skip installed agent skills (.agents/skills/**, .claude/skills/**).

Misc

  • oxlint 1.91 and oxfmt 0.76.
  • pnpm 12.16.1 is pinned through packageManager instead of devEngines.

Verification

  • pnpm check: no warnings or errors. It still catches type errors in package source and in *.test-d.ts.
  • oxfmt --check: clean.
  • Tests: all 372 in 11 files pass, the same as before. The benches run.
  • Packaging: all 3 packages build and pack with only dist, LICENSE, README.md and package.json. A test export that only fails during .d.ts generation (TS4094) fails the build, while pnpm check alone passes.

Notes

  • Contributors using Zed need to install the Oxc extension themselves.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VVaw7QpWMUaPoB4z52Dy9p

Lint and type check
- `check`/`fix` run oxlint with type-aware rules and type checking enabled
  in oxlint.config.ts (via oxlint-tsgolint); `format` runs oxfmt and is no
  longer checked in CI
- remove uncheck, sherif, the pre-commit hook and the uncheck Stop hook in
  .claude/settings.json; inline the oxlint/oxfmt presets
- `correctness` and `suspicious` categories as errors, plus a short list of
  hand-picked rules; fix the new findings
- drop dependabot groups

TypeScript
- inline the tsconfig presets into tsconfig.json + tsconfig.lib.json
- `module: nodenext`, `verbatimModuleSyntax`; relative imports use explicit
  `.ts` extensions, rewritten to `.js` on build
- no project references; package tsconfigs share include (src +
  package.json) and exclude from tsconfig.lib.json

Build
- replace unbuild with plain `tsc` (per-file .js + .d.ts in dist)

Editors and agents
- VS Code recommends the oxc extension
- Zed formats and fixes on save through the Oxc extension's oxfmt and
  oxlint language servers
- replace the empty .claude/CLAUDE.md with AGENTS.md; ignore
  .claude/worktrees (also excluded from vitest)

Misc
- oxlint 1.91, oxfmt 0.76
- pin pnpm via `packageManager` instead of `devEngines`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7QpWMUaPoB4z52Dy9p
@codecov

codecov Bot commented Nov 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed

codspeed Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 29 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing claude/simplify-lint-build-tools-wo4j8a (f37b112) with main (c026324)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7QpWMUaPoB4z52Dy9p

@pullfrog pullfrog Bot 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.

ℹ️ No critical issues — minor suggestions inline, plus one CI coverage gap.

Reviewed changes

  • Tooling replacement: uncheck, unbuild, sherif and the pre-commit/Stop hooks are gone; check/fix now run oxlint with typeAware + typeCheck, and a separate format runs oxfmt.
  • TypeScript config: root tsconfig.json moves to module: nodenext with allowImportingTsExtensions/rewriteRelativeImportExtensions/verbatimModuleSyntax, and the new tsconfig.lib.json centralizes per-package build settings (declaration, rootDir/outDir, types: [], lib: ES2022). Project references are removed.
  • Build: every package's prepack is plain tsc, publishConfig.exports points at dist/*.js / dist/*.d.ts, and the per-package unbuild blocks are removed.
  • Explicit import extensions: every relative import in source, tests, benches and fixtures gained a .ts suffix.
  • Lint fixes: two shadowed identifiers renamed in packages/downgrader/src/v3.1-to-v3.0.ts, redundant as OpenAPIV3_1.SchemaObject assertions dropped from v3.1-to-v3.0.test.ts, and .sort() → .toSorted() in namespace.test.ts.
  • Editor/agent setup: .vscode recommends the Oxc extension and formats/fixes on save, Zed now uses the Oxc language servers, AGENTS.md replaces .claude/CLAUDE.md, and .claude/worktrees/ is ignored by git and vitest.

ℹ️ Declaration emit is never exercised in CI

pnpm check type-checks through oxlint against noEmit programs, so errors that only surface while emitting .d.ts files are now first seen by the release workflow. The removed uncheck pipeline ran tsc -b with emitDeclarationOnly, so this PR reduces CI coverage rather than filling a pre-existing gap — and this repo has had a built-only types regression before. Adding pnpm -r run prepack to the check job would close it; it succeeds locally in a few seconds.

Technical details
# Declaration emit runs only at release

## Affected sites
- `.github/workflows/ci.yaml` — the `check` job runs `pnpm run check` (oxlint) only, with no build leg.
- `tsconfig.lib.json:8-9` — `declaration: true` / `noEmit: false` is the only config that exercises `.d.ts` emit.
- `packages/*/package.json` — `prepack: tsc` is the only build path.

## Required outcome
- CI should fail on a broken declaration build before a release.

## Suggested approach
- Add `pnpm -r run prepack` after `pnpm run check` in the `check` job. Verified locally: all three packages build and emit only `dist/*.js` + `dist/*.d.ts`.

## Notes
- `packages/types/src/namespace.test.ts` already covers the source-level namespace contract, but not declaration emit.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Comment thread oxlint.config.ts Resolved
rewriteRelativeImportExtensions already allows .ts imports, and no file
imports JSON (TypeScript 7 handles `with { type: 'json' }` under nodenext
without it). Build output is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7QpWMUaPoB4z52Dy9p

@pullfrog pullfrog Bot 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.

ℹ️ No new issues in this delta. The prior oxlint.config.ts rule-parity thread remains open, so this is not an approval.

Reviewed changes

  • Zed settings parity (13cd04c): .zed/settings.json now matches the sibling standard-server#184 change. The formatter chain (source.fixAll.oxc + the oxfmt language server) and format_on_save are unchanged; only the lsp.typescript-language-server block — typescript.preferences.includePackageJsonAutoImports: "on" — was removed and the array collapsed to one line.
  • Dropping that lsp block is the only behavior change in the delta, and it is limited to Zed's auto-import preference; the current formatter configuration is identical to standard-server's.

One note for the description: the "Editors and agents" section still says "The existing lsp preference is kept", which 13cd04c no longer does. The code is consistent with the sibling PR, so only that sentence needs updating.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot 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.

No issues found in commit 865f91b.

Reviewed changes

  • tsconfig cleanup (865f91b): root tsconfig.json drops allowImportingTsExtensions and resolveJsonModule. rewriteRelativeImportExtensions still covers the .ts specifiers this PR uses on TS 5.7+, and the repo has no JSON imports, so neither removal leaves anything unresolvable.
  • Verified at this HEAD: pnpm check green on 122 files, pnpm test 372 passing, oxfmt --check clean, and pnpm -r run prepack emits only dist/*.js + dist/*.d.ts for all three packages.

Not an approval: the oxlint.config.ts rule-parity thread from the first review is still open, and the PR description still says the Zed lsp preference is kept even though 13cd04c removed it.

… is off

- the check job now runs `pnpm -r run prepack`, so declaration-emit errors
  fail CI instead of first showing at release
- oxc/no-accumulating-spread is no longer enabled, so its disable/enable
  directives in packages/router/src/index.ts guarded nothing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7QpWMUaPoB4z52Dy9p

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

  • CI build leg (a404ac3): the check job now runs pnpm -r run prepack after pnpm run check, so declaration-emit errors fail on the PR instead of surfacing at release. Verified locally: pnpm check is clean and pnpm -r run prepack builds all three packages in topological order.
  • Dead lint directives removed (a404ac3): dropped the oxc/no-accumulating-spread disable/enable pair and its lead-in comment from packages/router/src/index.ts. That rule is not enabled, so the directives were inert; the __proto__-specific comment at the spread itself remains.

The earlier rule-parity thread is resolved by these changes and the author's rationale.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

An imported package.json is part of the program anyway; the include entry
only mattered with composite projects. Build output is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7QpWMUaPoB4z52Dy9p
… the check job

Packing every package on each PR still runs prepack, so declaration-emit
errors fail CI, and each PR gets installable previews, as in standard-server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7QpWMUaPoB4z52Dy9p
@pkg-pr-new

pkg-pr-new Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@openapi-spec/downgrader@378
npm i https://pkg.pr.new/@openapi-spec/router@378
npm i https://pkg.pr.new/@openapi-spec/types@378

commit: f37b112

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

  • Replaced the CI build leg with preview publishing (db13d10): dropped pnpm -r run prepack from the check job and added a publish_preview job that runs pkg-pr-new publish './packages/*' --pnpm --compact. Since pnpm pack runs each package's prepack (tsc), declaration-emit errors still fail CI before release — the coverage gap from the first review stays closed.
  • Added pkg-pr-new (db13d10) as a root devDependency and updated the lockfile accordingly.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Skills under .agents/skills and .claude/skills are usually installed from
elsewhere, so oxlint and oxfmt leave them as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7QpWMUaPoB4z52Dy9p

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

  • Agent skills excluded from tooling (a908fbd): oxlint.config.ts and oxfmt.config.ts both gained ignorePatterns: ['.agents/skills/**', '.claude/skills/**'], so locally installed agent-skill files are no longer linted, type-checked, or formatted. Verified the patterns are additive to the tools' built-in ignores (node_modules, dist still skipped), that probe files in those directories are skipped while a root control file is still reported, and that pnpm check (122 files), pnpm test (372), and oxfmt --check all pass at this HEAD.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

sherif --fix fixes monorepo issues (unordered or mismatched dependencies
and similar); AGENTS.md says to run it after changing a package.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7QpWMUaPoB4z52Dy9p

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

  • Restored sherif as pnpm repo:fix (bb3dac1): re-added sherif@^1.13.0 — the initial commit had dropped a dependency main already carried — plus the root repo:fix script, AGENTS.md guidance for running it after package.json changes, and a regenerated lockfile. Verified at this HEAD: pnpm install --frozen-lockfile reports the lockfile up to date, sherif --fix finds no issues and leaves the tree clean, pnpm check is green (122 files, 169 rules), and all 372 tests pass.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

  • Dependabot grouping simplified (b45e791): .github/dependabot.yml drops the uncheck group and its exclude-patterns, leaving dev-dependencies-minor-patch to group minor and patch dev-dependency updates — oxlint and oxfmt included, matching the PR description. Major updates stay ungrouped. Config-only; no code path is affected.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@dinwwwh
dinwwwh merged commit 5a3425c into main Nov 5, 2026
11 checks passed
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