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

Function eslintCheck

Makefile.source.ts:381–404  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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