ci: add Prettier and CSpell linting via git hooks and CI#201
ci: add Prettier and CSpell linting via git hooks and CI#201withinfocus wants to merge 2 commits into
Conversation
Wire up Prettier and CSpell linting for the template, enforced both locally via the config-based pre-commit hook and in CI on every PR. - .githooks/pre-commit: Prettier --check on staged Markdown/JSON/JSON5/ YAML and CSpell on staged Markdown, invoked via [hook "linter"] - .cspell.json: switch to "unknownWords": "report-common-typos" - .github/workflows/lint.yml: new Lint workflow running the same checks on Node 24 with SHA-pinned actions - .github/renovate.json: custom.regex manager keeps the prettier/cspell pins in the hook and workflow in sync, grouped as "lint tooling" - README.md: document the hook, CI check, and local enablement
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the new Prettier + CSpell linting setup: the config-based pre-commit hook ( Code Review DetailsNo findings. |
🎟️ Tracking
No associated Jira ticket — repository tooling change.
📔 Objective
Wire up Prettier and CSpell linting for the template repo, enforced both locally (pre-commit git hook) and in CI on every pull request.
.githooks/pre-commit— runs Prettier (--check) on staged Markdown/JSON/JSON5/YAML and CSpell on staged Markdown. Invoked through the existing config-based[hook "linter"]in.gitconfig; enable per clone withgit config set --local include.path "../.gitconfig"..cspell.json— switched to"unknownWords": "report-common-typos"so only common typos (not every proper noun) are flagged, mirroring bitwarden/tech-breakdowns#17..github/workflows/lint.yml— new Lint workflow running the same Prettier + CSpell checks on every PR, on Node 24 (LTS), with SHA-pinnedactions/checkoutv7.0.0 andactions/setup-nodev6.4.0. A comment notes it must mirror the git hook..github/renovate.json— added acustom.regexmanager that keeps the pinnedprettier@/cspell@versions in the hook and the workflow in sync, grouped as a single "lint tooling" PR.README.md— documents the hook, the CI check, and how to enable hooks locally.Tool versions are pinned and identical across the hook and workflow (
prettier@3.9.1,cspell@10.0.1); Renovate bumps them together.