chore: pin toolchain and add type checking
- Pin TypeScript as a direct dependency. It was only present transitively via typescript-eslint, so nothing enforced tsconfig.json and nine latent type errors had gone unnoticed. - Add `pnpm typecheck` (`tsc --noEmit`) and document it. - Add .npmrc with engine-strict, so the declared Node and pnpm ranges are actually enforced. - Ignore doc_build/ in ESLint. It was unignored and reported 1650 errors from build output, which made lint unusable as a gate. - Refresh README, CLAUDE.md, AGENTS.md and CONTRIBUTING.md to match the current structure, build targets and navigation rules.
This commit is contained in:
8 files changed
+490
-143
No files matched your search
+19
-1
@@ -20,10 +20,28 @@ theme/ # Custom theme overrides
|
||||
|
||||
## Content Guidelines
|
||||
|
||||
- Write content in both English (British) and Simplified Chinese.
|
||||
- Write content in both English (British) and Simplified Chinese. British
|
||||
spelling is required throughout — interface text, documentation, code
|
||||
comments and commit messages (`customised`, `centre`, `colour`, and so on).
|
||||
- Blog posts and documentation articles are licensed under CC-BY-4.0.
|
||||
- Code contributions are licensed under MIT.
|
||||
|
||||
## Navigation and Sidebars
|
||||
|
||||
Navigation and sidebar structure live in JSON files beside the content, not in
|
||||
the theme:
|
||||
|
||||
- `_nav.json` sets the top navigation. Its `text` values are i18n keys resolved
|
||||
through `i18n.json`, so the `en-gb` and `zh-hans` copies stay identical. Add
|
||||
new keys to `i18n.json` for **both** locales — a key present for only one
|
||||
locale fails the build.
|
||||
- `_meta.json` sets sidebar grouping and ordering within a directory. Supplying
|
||||
one replaces the generated listing for that directory, so every page you want
|
||||
shown must be listed — anything omitted disappears from the sidebar silently.
|
||||
|
||||
Do not add a `_meta.json` next to `_nav.json` at the root of a locale
|
||||
directory; doing so collapses the whole site into one flat sidebar.
|
||||
|
||||
## Pull Request Process
|
||||
|
||||
1. Ensure the site builds cleanly: `pnpm build`
|
||||
|
||||
Reference in new issue
Block a user