Skip to content

feat: add component and style lint with biome.#16

Merged
knightedcodemonkey merged 5 commits intomainfrom
lint
Mar 19, 2026
Merged

feat: add component and style lint with biome.#16
knightedcodemonkey merged 5 commits intomainfrom
lint

Conversation

@knightedcodemonkey
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 19, 2026 04:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  • getDiagnosticsIssueLevel only returns 'error' when getDiagnosticsIssueCount() > 0. This misses cases where a scope sets level: 'error' but provides no lines (e.g. "Type diagnostics unavailable" / "Biome unavailable"), leading to an error-styled drawer (panel-footer--error) but a neutral diagnostics toggle. Consider treating diagnosticsByScope.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.

@knightedcodemonkey knightedcodemonkey merged commit 9ba2a1c into main Mar 19, 2026
1 check passed
@knightedcodemonkey knightedcodemonkey deleted the lint branch March 19, 2026 14:57
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.

2 participants