Lesson 22 / 27
Debugging Linting Issues
Debug ESLint problems with --debug, --print-config and config inspection tools.
Common issues
Config not found, parser errors, plugin conflicts, and rule misconfigurations are common. Use debug mode to trace issues.
Debugging techniques
Use debug flag and --print-config to diagnose issues.
# Enable debug output
DEBUG=eslint* eslint .
# Print effective config for a file
eslint --print-config src/app.js
# Test a single file with verbose output
eslint src/app.js --debug
# Check plugin loading
eslint --print-config src/app.js | grep -A 5 plugins
Output:
Debug output shows config and plugin info
Use CLI vs config
If a rule works from the CLI but not in your editor, check for syntax errors in eslint.config.js and restart the ESLint server in the editor.
Quick check
Quick check: How do you debug ESLint config issues?
- Guess and try random configs.
- Use DEBUG=eslint* or eslint --print-config to see active rules.
- Restart the editor.
- Disable all plugins permanently
Answer
Use DEBUG=eslint* or eslint --print-config to see active rules. — Debug output and --print-config help you see which rules are active and why issues occur.