Commit 212fd97
> [!NOTE]
> **Draft, stacked on #3632.** Merge order: **#3632 (unblock) → this**.
Until #3632 merges, its removal commit appears in this diff; afterward
the diff collapses to this PR's change. Please review the CI-workflow
change below — its behavior is proven by this PR's own `pre-commit` run.
The proper fix for the broken SCSS lint hook (DOCS-81), following
#3632's temporary removal.
## Approach
The isolated-node-env hook couldn't resolve
`stylelint-config-standard-scss` in CI because stylelint resolves
`extends` from the **config file's directory** (repo root), not the
hook's environment. This runs the **project's own stylelint** instead:
- **`.pre-commit-config.yaml`** — stylelint hook is now `language:
system`, `entry: node_modules/.bin/stylelint`. It resolves the shared
config from the repo's `node_modules`.
- **`.github/workflows/pre-commit.yaml`** — adds a `setup-node` + `npm
ci --ignore-scripts` step so `node_modules` exists in CI.
`--ignore-scripts` skips the theme's postinstall (for example the Hugo
download), which linting doesn't need.
Unlike the eslint/markdownlint hooks (pre-commit-managed environments),
the SCSS hook needs Node in CI and `npm install` locally. SCSS editors
already run `npm install`; a docs-only contributor never triggers the
hook (it's scoped to `assets/scss/`).
## Verification (local)
- `pre-commit run stylelint` passes on a clean SCSS file and **fails on
a file with a finding** (`color-hex-length`), resolving the config
correctly.
- `actionlint` and `zizmor` pass on the modified workflow (matched the
repo's `cache`-less `setup-node` + zizmor ignore convention).
- YAML valid.
The CI `npm ci` path can only be fully exercised on the runner — this
PR's own `pre-commit` check is that proof.
## Sequencing
Merge order for the chain: **#3632 → this → then #3631** (the
contributor-docs PR, whose docs describe stylelint as an active check).
After #3632 merges I'll rebase this onto `main`.
Fixes DOCS-81.
---
Created in collaboration with Claude Code running Opus 4.8 on
2026-07-23.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5098497 commit 212fd97
2 files changed
Lines changed: 28 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
61 | 74 | | |
62 | 75 | | |
63 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
0 commit comments