Node

Runs Node and npm for the markdownlint hook and other tools. Use when npm or npx fails or resolves the wrong node binary, often on WSL.

niksavis Updated 2 repo stars

File contents

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, not npm install. It installs exactly what package-lock.json pins. 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 wsl skill explains why a non-interactive shell differs from your terminal.

niksavis/basicly commit f385479973

Frequently asked questions

npx get-skill add niksavis/node