fix(core,cli): improve lint output - JSON flag, info/warning counts, severity display#134
Merged
miguel-heygen merged 7 commits intomainfrom Mar 31, 2026
Merged
fix(core,cli): improve lint output - JSON flag, info/warning counts, severity display#134miguel-heygen merged 7 commits intomainfrom
miguel-heygen merged 7 commits intomainfrom
Conversation
When lint encountered an error (e.g., invalid directory), it output
plain text even with --json, breaking JSON parsing pipelines for
agents. Now wraps the entire lint command in try-catch that emits
JSON errors when --json is set.
Reproducer:
npx hyperframes lint --json /nonexistent/path
# Was: plain text "Not a directory: /nonexistent/path"
# Now: {"ok": false, "error": "Not a directory: /nonexistent/path", ...}
The linter was computing warningCount as findings.length - errorCount, which lumped info-severity findings into the warning count. Now counts warnings and infos separately, and adds a new infoCount field. Reproducer: # Create composition with timed element missing class="clip" npx hyperframes lint # Was: "0 errors, 1 warning(s)" npx hyperframes lint --json # Was: severity: "info" but warningCount: 1 # Now warningCount: 0, infoCount: 1
The lint command displayed info-level findings with the warning icon and counted them in the warning total, while JSON correctly reported severity as "info". Now info findings show a distinct icon (ℹ) and are counted separately in both human and JSON output. Reproducer: # Create a composition with a timed element missing class="clip" npx hyperframes lint # Was: "1 warning(s)" with ⚠ icon npx hyperframes lint --json # Was: severity: "info" but warningCount: 1 # Human and JSON output now agree
Resolve conflict in lint.ts: keep main's lintProject/formatLintFindings refactoring, integrate PR's infoCount tracking, filesScanned in JSON output, info severity display, and try/catch error handling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jrusso1020
approved these changes
Mar 30, 2026
Collaborator
|
@miguel-heygen can we hide info by default? I think we should only show when --verbose or --log-level something only show warnings/errors, infos are noisey/aren't needed by agents right? |
Info findings are noisy for agents and day-to-day use. Only errors and warnings are shown by default. Pass --verbose to include info findings in both CLI and JSON output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 tasks
…severity levels Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
Author
Merge activity
|
miguel-heygen
added a commit
that referenced
this pull request
Mar 31, 2026
…severity display (#134) ## Summary - Respect `--json` flag on all lint exit paths so agents always get machine-readable output - Separate `infoCount` from `warningCount` in linter results (was conflated) - Display `info` vs `warning` severity distinctly in lint output
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
--jsonflag on all lint exit paths so agents always get machine-readable outputinfoCountfromwarningCountin linter results (was conflated)infovswarningseverity distinctly in lint output