Node
Run node tooling so that it uses the Linux node and the pinned packages. The markdownlint
git hook needs markdownlint-cli2 from package-lock.json.
Rules
- Install with
npm ci, notnpm install. It installs exactly whatpackage-lock.jsonpins. Commit the lockfile with each dependency change. - Run a tool with
npx --no-install TOOL. It runs the pinned local package and refuses to download a different version. - When the markdownlint hook refuses, read its message. The node it picks, each refusal with its fix, its inputs and how to opt out are in markdownlint hook.
- When node or npx resolves to a Windows install from a script or hook, apply
the WSL node PATH fix. The
wslskill explains why a non-interactive shell differs from your terminal.