Skip to content

fix: add ESLint stylish format parser and fix @-scoped rule matching#11

Merged
bdougie merged 1 commit intomainfrom
fix/eslint-stylish-parser
Mar 17, 2026
Merged

fix: add ESLint stylish format parser and fix @-scoped rule matching#11
bdougie merged 1 commit intomainfrom
fix/eslint-stylish-parser

Conversation

@bdougie
Copy link
Contributor

@bdougie bdougie commented Mar 17, 2026

Summary

  • Add parseESLintStylish() to handle ESLint's default multi-line "stylish" output format, which previously fell through to the raw output path and crashed sub-agents
  • Fix golangci regex (\w[\w-]*) -> ([@\w][\w./@-]*) to match @-scoped ESLint rule names (e.g. @typescript-eslint/no-unused-vars)
  • Mirror both fixes in the TypeScript extension (extensions/sweeper/index.ts)

Test plan

  • go test ./pkg/linter/ -v — all 18 tests pass including new stylish + orphan-line tests
  • go test ./... — no regressions across all packages
  • Coverage: parseESLintStylish at 100%
  • Manual: sweeper run -- npx eslint . against a JS project produces per-file issues (not raw fallback)

ESLint's default output format ("stylish") is multi-line with file
headers and indented issues. The linter parser only supported single-line
formats, so ESLint output fell through to the raw output path causing
sub-agent crashes.

- Add parseESLintStylish() for multi-line block format parsing
- Fix golangci regex to match @-scoped rules (e.g. @typescript-eslint/no-unused-vars)
- Mirror both fixes in the TypeScript extension
- Add test data and test cases for stylish format
@bdougie bdougie merged commit edbc4ea into main Mar 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant