Skip to content

filter(eslint): add eslint filter #43

@mpecan

Description

@mpecan

Goal

Add a filter for ESLint — the dominant JavaScript/TypeScript linter used in virtually every professional JS project.

Background

On large codebases (especially during initial adoption or major version migration), ESLint can emit hundreds or thousands of warning lines before any errors. The core problem: warnings bury errors. When a file has both errors and warnings, they're interleaved. When a project has 500 warning lines and 3 error lines, finding the errors requires scrolling through all warnings.

--quiet mode suppresses all warnings entirely — losing visibility into degrading code quality. No built-in middle-ground exists for "show all errors + warning count summary only."

ESLint v9.24.0 introduced bulk suppression to address migration noise, but this requires a separate setup step and doesn't help with day-to-day output.

Filters to Add

eslint/check.tomleslint . / eslint src/

  • Skip: individual warning lines when error lines are present in the output; repetitive eslint-disable-next-line suggestion footnotes
  • Keep:
    • All error lines (with file:line context)
    • A count summary of warnings (e.g. extract X warnings from footer)
    • The final ✖ X problems (Y errors, Z warnings) summary line
    • All lines when there are no errors (warnings-only run)

eslint/fix.tomleslint --fix .

  • Skip: unchanged file notices
  • Keep: files that had errors (unfixable), summary of what was fixed

Fixture Files Needed

  • tests/fixtures/eslint/errors-and-warnings.txt — output with both error and warning lines mixed
  • tests/fixtures/eslint/warnings-only.txt — only warnings, no errors
  • tests/fixtures/eslint/errors-only.txt — only errors
  • tests/fixtures/eslint/clean.txt — no issues found

Acceptance Criteria

  • When errors exist, individual warning lines are suppressed; warning count is shown in summary
  • All error lines (with file:line context) are always preserved
  • When only warnings exist (no errors), all warning lines are preserved
  • Final problem count summary always preserved
  • Integration tests pass for all fixture files

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions