Unverified Commit a6f9167c authored by Jude Gao's avatar Jude Gao Committed by GitHub

Bump Node heap limit for lint-no-typescript to avoid OOM in CI (#90996)

The `lint` job in CI has been hitting `FATAL ERROR: Ineffective
mark-compacts near heap limit Allocation failed - JavaScript heap out of
memory` during `lint-eslint`.

`lint-no-typescript` runs `prettier-check`, `lint-eslint .`, and
`lint-language` in parallel via `run-p`. The `lint-eslint` script uses
`eslint.cli.config.mjs` which enables type-checked rules with
`parserOptions.project: true` — the config comment itself notes this
"needs a lot of memory". Node's default heap limit caps around ~2-4GB
regardless of available system memory, which isn't enough when the
type-aware parser loads the full monorepo project graph.

This sets `NODE_OPTIONS="--max-old-space-size=8192"` on the
`lint-no-typescript` script via `cross-env`. The env var inherits into
all three `run-p` children, giving eslint the headroom it needs without
touching CI workflow files.
parent 6e894cfc
......@@ -71,7 +71,7 @@
"lint-typescript": "turbo run typescript",
"lint-eslint": "eslint --config eslint.cli.config.mjs",
"lint-ast-grep": "ast-grep scan",
"lint-no-typescript": "run-p prettier-check \"lint-eslint .\" lint-language",
"lint-no-typescript": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" run-p prettier-check \"lint-eslint .\" lint-language",
"types-and-precompiled": "run-p \"lint-typescript --log-order=stream\" check-compiler-fixtures types:test-lib && pnpm check-precompiled",
"check-compiler-fixtures": "find crates/next-custom-transforms/tests/fixture -type f -name 'tsconfig.json' -print0 | xargs --null -n1 -I'{}' pnpm tsc --noEmit --project '{}'",
"validate-externals-doc": "node ./scripts/validate-externals-doc.js",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment