Skip to content

fix(lint): pin Node for pre-commit hooks - #36

Merged
Thomas A Caswell (tacaswell) merged 1 commit into
NSLS2:mainfrom
stuwilkins:fix/pin-precommit-node
Nov 3, 2026
Merged

Thomas A Caswell (tacaswell) merged 1 commit into
NSLS2:mainfrom
stuwilkins:fix/pin-precommit-node

Conversation

@stuwilkins

Copy link
Copy Markdown
Contributor

markdownlint's hook environment fails to build, locally and in CI.
pre-commit ignores pixi's Node and falls back to nodeenv, which installs
the newest release on nodejs.org. Since 2026-10-29 that is
27.0.0-alpha.0.0.0, which nodeenv cannot parse.

  • Pin default_language_version.node to 26.13.0 (current LTS).

AI-assisted (OpenCode: claude-opus-5-5, claude-sonnet-5-5); reviewed by Stuart B. Wilkins (@stuwilkins).

nodeenv resolves unpinned Node to the 27.0.0-alpha.0.0.0 pre-release,
which it cannot parse, so the markdownlint environment fails to build.

Assisted-by: opencode:claude-sonnet-5-5
Copilot AI balanced review requested due to automatic review settings November 2, 2026 11:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

CI must confirm Node 26.13.0 availability and successful markdownlint environment creation with prek, since neither could be verified in the offline source-only review.

No open issues 🎉

What changed in this PR

Pins Node for pre-commit’s Node-based hooks to avoid hook environment build failures caused by nodeenv selecting an unparseable prerelease.

Changes:

  • Sets default_language_version.node to 26.13.0.
  • Documents the pin’s purpose and the intent to match the Node major version in pixi.toml.
File Description
.pre-commit-config.yaml Adds a default Node version pin and explanatory comments for Node-based hooks such as markdownlint.

Review effort: Balanced

@tacaswell

Copy link
Copy Markdown
Contributor

The floor for the fixed trust store is 26.12.1 so this is fine.

@tacaswell
Thomas A Caswell (tacaswell) merged commit ac0a74a into NSLS2:main Nov 3, 2026
1 check passed
@stuwilkins
Stuart B. Wilkins (stuwilkins) deleted the fix/pin-precommit-node branch November 4, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants