feat: add component and style lint with biome.#16
Merged
knightedcodemonkey merged 5 commits intomainfrom Mar 19, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds in-browser lint diagnostics for component + styles using Biome (WASM via CDN), and extends the diagnostics UI to represent pending state and combined diagnostics counts.
Changes:
- Introduces a Biome-backed lint diagnostics controller and wires it into the app with new “Lint” buttons for component/styles.
- Extends diagnostics UI state to track lint runs + pending status, including a pending spinner on the diagnostics toggle.
- Expands Playwright coverage for typecheck + lint diagnostics UX and updates docs with next steps / CDN guidance.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/styles/diagnostics.css | Adds pending-state spinner styling + keyframes for diagnostics toggle. |
| src/modules/type-diagnostics.js | Adds pending signaling + cancel API; refines status updates during typecheck. |
| src/modules/lint-diagnostics.js | New Biome WASM lint engine integration and normalization/formatting of diagnostics. |
| src/modules/diagnostics-ui.js | Tracks lint run counts + pending flags; updates toggle label/class and aria-busy. |
| src/modules/cdn.js | Adds CDN import spec for @biomejs/wasm-web. |
| src/index.html | Adds “Lint” buttons for component and styles panels. |
| src/app.js | Wires lint controller into UI, schedules stale re-lints, and resets diagnostics flows on mode changes. |
| playwright/app.spec.ts | Adds E2E coverage for typecheck/lint success, errors, and pending indicator behavior. |
| docs/next-steps.md | Updates roadmap items around lint rule review and CI E2E determinism. |
| docs/build-and-deploy.md | Adds note about centralized CDN specs (path reference needs correction). |
| AGENTS.md | Adds contributor guidance about centralized CDN specs (path reference needs correction). |
Comments suppressed due to low confidence (1)
src/modules/diagnostics-ui.js:71
getDiagnosticsIssueLevelonly returns'error'whengetDiagnosticsIssueCount() > 0. This misses cases where a scope setslevel: 'error'but provides nolines(e.g. "Type diagnostics unavailable" / "Biome unavailable"), leading to an error-styled drawer (panel-footer--error) but a neutral diagnostics toggle. Consider treatingdiagnosticsByScope.component.level === 'error' || diagnosticsByScope.styles.level === 'error'as an error level regardless of line count, while keeping the count for the label.
const getDiagnosticsIssueLevel = () => {
if (typeDiagnosticsPending || lintDiagnosticsPending || hasActiveDiagnosticsRuns()) {
return 'pending'
}
if (getDiagnosticsIssueCount() > 0) {
return 'error'
}
if (hasDiagnosticsOkResult()) {
return 'ok'
}
return 'neutral'
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.