Skip to content

fix(check): give check:local's ESLint the gate's memory - #97

Merged
flowtricks merged 1 commit into
flowtricks:mainfrom
SylvainDruaux:fix/check-local-eslint-heap
Nov 24, 2026
Merged

flowtricks merged 1 commit into
flowtricks:mainfrom
SylvainDruaux:fix/check-local-eslint-heap

Conversation

@SylvainDruaux

Copy link
Copy Markdown
Contributor

Why

npm run dev stopped starting on main (1.4.18): check:local, its first step, aborts in ESLint with node: stopped by SIGABRT. It showed up after a Homebrew update to Node 26.13.1, but Node is not the cause: Node 22, the version .nvmrc pins, aborts the same way on plain main.

Cause

The abort is FATAL ERROR: ... JavaScript heap out of memory. Type-aware lint of the whole tree now peaks at about 4.7 GB on main, past Node's default heap of about 4 GB. The full gate has given the same ESLint run 6 GB since 1.1.1 (--max-old-space-size=6144 in scripts/gate/runTests.ts), so the gate passes, while check:local runs ESLint through runEslint in scripts/policy/checks.mts without that setting and aborts.

Change

runEslint passes the same --max-old-space-size=6144. A comment ties the two values together, since the gate compiles to CommonJS and cannot import the policy module.

How to check

  • On main: npm run check:local aborts in ESLint with SIGABRT.
  • On this branch: npm run check:local passes every step, and npm run dev starts.

If one value is preferred over two kept equal by a comment, moving the heap to a shared place is a small follow-up.

npm run dev stopped starting: check:local, its first step, aborted in ESLint with "node: stopped by SIGABRT". I noticed it after Homebrew updated Node to 26.13.1, but the update is not the cause: Node 22, the version .nvmrc pins, aborts the same way on plain main.

The abort is "JavaScript heap out of memory". Type-aware lint of the whole tree now peaks at about 4.7 GB on main, past Node's default heap of about 4 GB. The full gate has given the same ESLint run 6 GB since 1.1.1 (scripts/gate/runTests.ts), so the gate passes while check:local, which runs ESLint without that setting, aborts.

runEslint now passes the same --max-old-space-size=6144. The two values are kept equal by a comment, because the gate compiles to CommonJS and cannot import the policy module. With it, check:local passes on main and npm run dev starts again.
@flowtricks
flowtricks merged commit 3275bd0 into flowtricks:main Nov 24, 2026
20 checks passed
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.

2 participants