PatchRail

JavaScript and TypeScript lint — eslint no-unused-vars / prettier

Log signatures

error  'x' is defined but never used  no-unused-vars
lint failed
Code style issues found in the above file. Run Prettier to fix.
biome check

What’s happening

ESLint, Biome, or Prettier (in check mode) exited non-zero. Same family as Python lint, JS flavor. The signatures worth respecting rather than silencing: no-unused-vars can mask a refactor that disconnected real logic; unused imports of modules with side effects change behavior when "cleaned up." Prettier check failures mean a file wasn't formatted with the project's config — almost always an editor without the plugin or a config version mismatch.

Fix playbook

  1. 1Run the project's own lint script locally — it carries the flat-config/legacy-config choice and plugin set that ad-hoc npx eslint . won't.
  2. 2--fix for mechanical rules; review the diff.
  3. 3For rules requiring judgment, fix or disable per-line with a reason (// eslint-disable-next-line rule -- why). Per-file or global disables to pass one PR are how lint configs rot.
  4. 4Prettier conflicts with ESLint formatting rules (endless flip-flopping fixes): the configs overlap — adopt eslint-config-prettier to remove formatting rules from ESLint and let Prettier own formatting.
  5. 5Rerun the exact CI lint command.

Prevention

  • Same as Python — pre-commit hook (husky/lint-staged) pinned to CI's versions, formatting on save in the team editor config.

Triage every red build, not just this one.

This page is one of 31 failure classes the open-source patchrail CLI matches from a raw log — locally, with secrets redacted first. If a log stumps it, open an issue; if it saves you a debugging morning, a star helps other maintainers find it.

★ Star on GitHubpipx install patchrail