MCPcopy Create free account
hub / github.com/babel/babel / eslintCheck

Function eslintCheck

Makefile.source.ts:386–409  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

384];
385
386function eslintCheck() {
387 // Use a single TS program (tsconfig.lint.json) for the whole repository, so
388 // that we don't need to split the work to stay under the heap size limit.
389 // Each worker has its own program: use a fixed number of workers, because
390 // the memory usage grows with it.
391 env(
392 () =>
393 yarn([
394 "eslint",
395 "packages",
396 ...ESLINT_NON_PACKAGES_SOURCES,
397 ...ESLINT_ARGS,
398 "--concurrency",
399 "2",
400 ]),
401 {
402 BABEL_ENV: "test",
403 BABEL_ESLINT_FLAT_TSCONFIG: "true",
404 // tsconfig.lint.json reports false positives when it's not a single run
405 TSESTREE_SINGLE_RUN: "true",
406 NODE_OPTIONS: "--max-old-space-size=6144",
407 }
408 );
409}
410
411function eslintFix() {
412 const eslintArgs = [...ESLINT_ARGS, "--concurrency", "auto", "--fix"];

Callers 1

Makefile.source.tsFile · 0.85

Calls 2

envFunction · 0.85
yarnFunction · 0.85

Tested by

no test coverage detected