fix: add ESLint stylish format parser and fix @-scoped rule matching#11
Merged
fix: add ESLint stylish format parser and fix @-scoped rule matching#11
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
parseESLintStylish()to handle ESLint's default multi-line "stylish" output format, which previously fell through to the raw output path and crashed sub-agents(\w[\w-]*)->([@\w][\w./@-]*)to match@-scoped ESLint rule names (e.g.@typescript-eslint/no-unused-vars)extensions/sweeper/index.ts)Test plan
go test ./pkg/linter/ -v— all 18 tests pass including new stylish + orphan-line testsgo test ./...— no regressions across all packagesparseESLintStylishat 100%sweeper run -- npx eslint .against a JS project produces per-file issues (not raw fallback)