Search documentation

Search all pages, headings and text, in the current package or topic or in all documentation.

Checks and troubleshooting

When a lint run fails, how to read its result, how to see the rules ESLint applies, and what common messages mean.

@workspace/eslint-config 2.2.0Developmentunreleased, in development in Foundationbaseline ce081dc3

When a lint run fails#

ESLint reports every finding as a warning (see the overview). Whether a run fails is decided by the threshold in your lint script:

Result of eslint . --max-warnings 100Exit codeMessage
no findings0none
1 to 100 warnings0✖ 100 problems (0 errors, 100 warnings)
101 warnings or more1ESLint found too many warnings (maximum: 100).
a file that does not parse1error Parsing error: …
a configuration that cannot be loaded (a missing package)2Oops! Something went wrong! :(

Read the summary line of every run, not only the exit code. To see whether your own work added warnings, run with a lower threshold for yourself:

Terminal
pnpm exec eslint . --max-warnings 0

Thresholds and repository scripts#

The threshold belongs to your repository, not to the package:

  • Per package. Each lint script carries --max-warnings 100, the shared standard. Do not raise it for one package to get a run through.
  • Across the repository. A root script runs lint in every workspace, for example turbo lint --continue or pnpm -r --no-bail lint. Without "continue" or "no bail", the run stops at the first workspace that fails and hides the others. The root run fails when any workspace fails.
  • Further checks. A repository may have its own checks or a finishing command that read the lint result. They are policy of that repository and are named in its own AGENTS.md; the package has none.

See which rules apply#

Print the configuration ESLint computes for one file:

Terminal
pnpm exec eslint --print-config src/index.ts

The output lists every rule with its configured severity: 2 for error, 1 for warning, 0 for off. A rule configured as 2 is still reported as a warning, because only-warn changes the severity when a finding is reported, not in the configuration. So --print-config tells you which rules run and with which options, not whether a run fails.

To see which preset each workspace imports:

Terminal
grep -rhoE "eslint-config/(base|react-internal|next-js|resource-rules)" --include=eslint.config.mjs apps packages | sort | uniq -c

Check your copy#

QuestionCommand
which version and source state does my repository record?node tools/rps/rps-apply.mjs status
does my repository resolve the managed copy?node tools/rps/rps-apply.mjs verify-install --from .
does my copy match a bundle, file by file?node tools/rps/rps-apply.mjs reconcile --bundle <bundle-folder>

Common messages#

MessageCause and remedy
Cannot find package '@workspace/eslint-config'the package is not declared at the root or not installed: declare it, run pnpm install
Package subpath './…' is not defined by "exports"an import path that is not one of the four subpaths; see Presets
… is not listed as a dependency in turbo.jsonan environment variable that turbo.json does not declare, or a repository without Turbo; see Local additions
Em-dash (—, U+2014) is banned in user-visible texttext in JSX with an em-dash; use -, :, . or a parenthesis. Strings outside JSX are not checked
Use 'err' instead of 'e' for catch variablesrename the catch binding to err, or xxxErr in a nested catch
RPS-E4 or RPS-E5 from the appliera changed managed file, or an unmanaged folder at packages/eslint-config; see Getting started

The convention messages name I18N_STANDARDS.md § 3 and CODING_STANDARDS § 4. Those are documents of the development standards, in docs/standards/ of a repository that took them over. The message for catch (error) also mentions @workspace/active-logging, a package of the repository where the convention arose; the rule works the same without it.

This page as Markdown