Skip to content

Make npm run check pass again and run it in CI - #46

Merged
geoffturk merged 1 commit into
v4from
fix/npm-run-check
Oct 25, 2026
Merged

geoffturk merged 1 commit into
v4from
fix/npm-run-check

Conversation

@geoffturk

Copy link
Copy Markdown
Contributor

Summary

Nothing ran the type check: CI only runs the tests and the deploy only runs the esbuild-based build, which strips types without checking them. Meanwhile tsc --noEmit had been failing on TypeScript 6's deprecation of moduleResolution=node10 and, behind that, on four real type errors, and prettier flagged 60 files. This fixes each cause and adds npm run check to CI so it stays green.

Changes

  • tsconfig.json: set ignoreDeprecations to "6.0". Switching to "bundler" resolution surfaces four more errors from Quartz's deep imports (remark-parse/lib, satori/wasm, preact/src/jsx, micromorph), so that migration waits for upstream.
  • quartz.config.ts: analytics was the string "null", which is not a provider. It only disabled analytics because it matched no branch. Use the typed value null; the build still emits no analytics script.
  • ArticleTitle.tsx: drop the import and parameter left unused by the local "Remove extra title" change.
  • ofm.ts: pass the callout class list as an array, which is what the current hast property types expect. Rendered output is unchanged: class="callout note is-collapsible is-collapsed".
  • .prettierignore: skip content (reviewed prose under CODEOWNERS) and docs (vendored Quartz documentation that prettier 3.9 also fails to format idempotently, splitting a sentence in hosting.md into three paragraphs). Format the one remaining file, README.md.
  • ci.yaml: run npm run check before the tests.

Verification

In a node:22-slim container: npm run check clean, npm test with 78 of 78 passing, a full quartz build, a test page confirming collapsed and plain callouts render with the correct classes, and a grep confirming no analytics script in the output.

Nothing ran the type check: CI only runs the tests and the deploy only
runs the esbuild-based build, which strips types without checking them.
Meanwhile `tsc --noEmit` had been failing on TypeScript 6's deprecation
of moduleResolution=node10 and, behind that, on four real type errors,
and prettier flagged 60 files. Fix each cause and add the check to CI so
it stays green.

- tsconfig.json: set ignoreDeprecations to "6.0". Switching to the
  "bundler" resolution surfaces four more errors from Quartz's deep
  imports (remark-parse/lib, satori/wasm, preact/src/jsx, micromorph),
  so that migration waits for upstream.
- quartz.config.ts: analytics was the string "null", which is not a
  provider. It only disabled analytics because it matched no branch.
  Use the typed value null; the build still emits no analytics script.
- ArticleTitle.tsx: drop the import and parameter left unused by the
  local "Remove extra title" change.
- ofm.ts: pass the callout class list as an array, which is what the
  current hast property types expect. Rendered output is unchanged:
  `class="callout note is-collapsible is-collapsed"`.
- .prettierignore: skip content (reviewed prose under CODEOWNERS) and
  docs (vendored Quartz documentation that prettier 3.9 also fails to
  format idempotently, splitting a sentence in hosting.md into three
  paragraphs). Format the one remaining file, README.md.
- ci.yaml: run `npm run check` before the tests.

Verified in a node:22-slim container: `npm run check` clean, 78 tests
passing, and a full build.

Signed-off-by: Geoff Turk <geoff@ic3.dev>
@geoffturk
geoffturk requested review from a team as code owners October 25, 2026 06:38
@geoffturk
geoffturk merged commit 5422a60 into v4 Oct 25, 2026
2 checks passed
@geoffturk
geoffturk deleted the fix/npm-run-check branch October 25, 2026 06:49
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