From b138055176b63eedfd29d6f356ed910d8179da8f Mon Sep 17 00:00:00 2001 From: Geoff Turk Date: Sun, 25 Oct 2026 07:37:40 +0100 Subject: [PATCH] Make `npm run check` pass again and run it in CI 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 --- .github/workflows/ci.yaml | 2 ++ .prettierignore | 3 +++ README.md | 4 ++-- quartz.config.ts | 4 +--- quartz/components/ArticleTitle.tsx | 5 ++--- quartz/plugins/transformers/ofm.ts | 2 +- tsconfig.json | 1 + 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 05ec043d..58ac9f32 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,5 +29,7 @@ jobs: # site in quartz/cli/fixtures/serve and fails if it binds anything other # than loopback, or if a request path that escapes the output directory is # answered instead of refused. + - name: Type check and format check + run: npm run check - name: Run tests run: npm test diff --git a/.prettierignore b/.prettierignore index 69663031..31515a96 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,3 +3,6 @@ node_modules .quartz-cache # Deliberately malformed markup that must reach the parser exactly as written. quartz/util/fixtures +# Wiki content is reviewed prose, and docs is vendored Quartz documentation; neither is formatted source. +content +docs diff --git a/README.md b/README.md index 9725d0da..406e6102 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ Rather than delegating identity to centralized gatekeepers (Google, employers, governments), the OpenVTC ecosystem takes a **first-person** approach. Trust is built from the ground up through real relationships between real people, expressed as cryptographically verifiable credentials. The question becomes not -just *"who are you?"* but *"can I verify you're a real person through a chain -of real human relationships?"* +just _"who are you?"_ but _"can I verify you're a real person through a chain +of real human relationships?"_ ## Audience diff --git a/quartz.config.ts b/quartz.config.ts index 58b5144e..3f6f4552 100644 --- a/quartz.config.ts +++ b/quartz.config.ts @@ -12,9 +12,7 @@ const config: QuartzConfig = { pageTitleSuffix: "", enableSPA: true, enablePopovers: true, - analytics: { - provider: "null", - }, + analytics: null, locale: "en-US", baseUrl: "OpenVTC.github.io/wiki", ignorePatterns: ["private", "templates", ".obsidian"], diff --git a/quartz/components/ArticleTitle.tsx b/quartz/components/ArticleTitle.tsx index 43f85d1b..3e2331b8 100644 --- a/quartz/components/ArticleTitle.tsx +++ b/quartz/components/ArticleTitle.tsx @@ -1,10 +1,9 @@ import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" -import { classNames } from "../util/lang" -const ArticleTitle: QuartzComponent = ({ fileData, displayClass }: QuartzComponentProps) => { +const ArticleTitle: QuartzComponent = ({ fileData }: QuartzComponentProps) => { const title = fileData.frontmatter?.title if (title) { - return

//

{title}

+ return

} else { return null } diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index 1282a0a3..3847c760 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -510,7 +510,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> node.data = { hProperties: { ...(node.data?.hProperties ?? {}), - className: classNames.join(" "), + className: classNames, "data-callout": calloutType, "data-callout-fold": collapse, "data-callout-metadata": calloutMetaData, diff --git a/tsconfig.json b/tsconfig.json index 637d0960..ec76517a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "module": "esnext", "target": "esnext", "moduleResolution": "node", + "ignoreDeprecations": "6.0", "strict": true, "incremental": true, "resolveJsonModule": true,