fix(scripts): run lint and format tools through Node so they work on Windows - #1130
Merged
Merged
Conversation
…Windows The format and lint scripts spawned the node_modules/.bin shims directly. On Windows those are .cmd files that need a shell, so the spawn failed and the scripts exited 1 without any output. Replace run-oxc.mjs and timed.mjs with a single run-tool.mjs. It runs the package's bin script with the current Node binary, keeps the Oxc thread cap, and throws spawn errors instead of hiding them. It prints a dimmed "⏱ <tool> finished in <time>" line for every tool, in ms under a second and in seconds otherwise. The thread cap comment no longer claims a ~32-thread threshold or links oxc#21672, which is about the missing cache. On a 24-core machine the cap of 8 still helps.
EhabY
force-pushed
the
fix/windows-lint-scripts
branch
from
September 29, 2026 16:52
eb7a849 to
528b9f3
Compare
jscottmiller
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pnpm lint,pnpm formatandpnpm format:checkfail on Windows with no output. The scripts spawned thenode_modules/.binshims directly. On Windows those are.cmdfiles that only a shell can run, so the spawn failed and the scripts exited 1 without printing anything.scripts/run-tool.mjsreplacesrun-oxc.mjsandtimed.mjs. It finds the tool's bin script in itspackage.jsonand runs it with the current Node binary.⏱ <tool> finished in <time>line for every tool, not only ESLint, in ms under a second and in seconds otherwise.shell: truewould have been the one-line fix. I didn't use it because Node 24 prints a DEP0190 deprecation warning for it, and it passes arguments to the shell unescaped.Checked on Windows in PowerShell and Git Bash: lint and format pass, and a file with a lint error and bad formatting makes both fail with their usual output.