Skip to main content

CLI Debugging and Config Inspection

Use these commands to troubleshoot config resolution, strict CI behavior, and cache-related issues.

Inspect effective config for a fileโ€‹

npx eslint --print-config src/plugin.ts

This is the fastest way to confirm:

  • which config blocks are applied,
  • parser/language options for the file,
  • final merged rule settings.

Strict CI flagsโ€‹

Treat warnings as failures in CI:

npx eslint . --max-warnings 0

Report unused disable comments:

npx eslint . --report-unused-disable-directives

Cache tipsโ€‹

Use cache locally for speed:

npx eslint . --cache --cache-location .cache/eslint/.eslintcache

When debugging suspicious results, clear or bypass cache:

npx eslint . --no-cache

Verbose troubleshootingโ€‹

Show internal diagnostics from the ESLint CLI:

npx eslint . --debug

Use this when behavior differs between terminal and IDE or when plugin/config resolution appears incorrect.

Practical debugging orderโ€‹

  1. --print-config on a failing file.
  2. Re-run without cache.
  3. Re-run with --debug.
  4. Confirm Node/ESLint versions match CI.