| name | node |
| description | Use Node and npm in this repo for the markdownlint git hook and other node tooling. Use when running npm or npx committing or pushing from a script or background job on WSL or debugging a node-based hook that resolves the wrong node binary. |
Node
Node in this repo is narrow but load-bearing: the markdownlint git hook runs
npx --no-install markdownlint-cli2, resolving the markdownlint-cli2
devDependency pinned in package.json / package-lock.json. If the wrong node
is on PATH, that hook breaks and blocks commits.
The WSL non-interactive-shell trap (the one that bites)
A login shell sources your profile, which loads the version manager (nvm) and
puts the repo's node on PATH. A non-interactive shell — a script, a
background job, a git hook launched by a headless agent — does not source
that profile, so npx/node can resolve to a Windows node install reached over
WSL interop instead of the Linux one. markdownlint (and any node-based hook) then
runs under the wrong node, or fails outright, only from scripts and background
jobs — never when you commit by hand in your terminal.
Fix: put the repo's node on PATH before you commit or push from a script or
background job. The exact recipe is in
references/wsl-node-path.md.
npm hygiene
npm ci (not npm install) for a reproducible install from
package-lock.json; commit the lockfile with any dependency change.
npx --no-install <tool> runs the pinned local devDependency and refuses to
silently fetch a different version from the network — keep the --no-install.
- Keep the node footprint minimal: this repo ships one devDependency on purpose.
Adding a dependency is a confirmation-gated change, not a reflex.