Development¶
Prerequisites¶
- Node.js 24+
- uv (for building and previewing Zensical documentation)
- pre-commit (for local git commit hooks)
Common Commands¶
# Install dependencies
npm install
# Watch mode for active plugin development
npm run dev
# Run Biome lint & format checks
npm run check
# Auto-fix formatting and safe lint issues
npm run check:fix
# Lint and format Markdown files with rumdl
npm run lint:md
npm run format:md
# Run strict TypeScript type validation
npm run typecheck
# Run tests with 100% coverage enforcement
npm run test:coverage
# Build production main.js and verify moment.js is not bundled
npm run build
Documentation with Zensical¶
User documentation lives in docs/ and is configured via zensical.toml.
# Local live preview
npm run docs:serve
# Production static site build (outputs to site/)
npm run docs:build
Code Quality Standards¶
- TypeScript: Strict compiler flags including
strict,noUncheckedIndexedAccess,exactOptionalPropertyTypes,noImplicitOverride, andverbatimModuleSyntax. - Biome: Enforces formatting, import organization, strict lint rules, and cognitive complexity limits.
- rumdl: Enforces Markdown linting and formatting across
README.mdanddocs/(configured in.rumdl.tomlwith themkdocsflavor). - 100% Test Coverage: Vitest enforces 100% statements, branches, functions, and lines across
src/. - External Moment.js:
esbuild.config.mjskeepsobsidianandmomentexternal, andscripts/verify-bundle.mjsfails the build ifmoment.jsis ever bundled intomain.js.
Pre-Commit Hooks¶
Install the configured pre-commit checks:
Releasing a New Version¶
Obsidian and BRAT match GitHub Release tag names against manifest.json's version using exact
string equality, so release tags use bare SemVer without a v prefix (e.g. 0.1.0,
0.2.0-beta.1). The repository's .npmrc sets tag-version-prefix="" so npm version creates
bare tags automatically.
Cutting a Pre-release (BRAT)¶
Keep manifest.json on main at the latest stable version so Obsidian's stable updater is never
disrupted. Tag the commit you want to test and push the tag:
The Release Plugin workflow detects the - pre-release suffix, runs all quality gates and 100%
coverage tests, stamps "version": "0.2.0-beta.1" into the packaged release manifest.json
(without modifying main), and publishes a GitHub Pre-release with main.js, manifest.json,
styles.css, and chrono-sort-0.2.0-beta.1.zip.
Cutting a Stable Release¶
-
Bump the version in
package.json,manifest.json, andversions.json(and create the bare SemVer tag): -
Push the commit and tag:
The Release Plugin workflow verifies that the stable tag exactly matches manifest.json, runs all
quality gates and 100% coverage tests, builds main.js, and publishes a regular GitHub Release with
main.js, manifest.json, styles.css, and chrono-sort-0.2.0.zip.