|
3 | 3 | Focused follow-up work for `@knighted/develop`. |
4 | 4 |
|
5 | 5 | 1. **In-browser component/style linting** |
6 | | - - Explore running lint checks for component and style sources directly in the playground. |
7 | | - - Prefer CDN-delivered tooling where possible and preserve graceful fallback behavior when unavailable. |
| 6 | + - Replace the current ESLint/Stylelint worker direction with a Biome-first plan using `@biomejs/wasm-web` loaded from CDN. |
| 7 | + - Remove lint-specific web worker plumbing and run lint directly on demand in the main runtime, while keeping lint execution isolated behind a small module boundary. |
| 8 | + - Add a single lint service module that: |
| 9 | + - lazily loads and initializes Biome WASM once, |
| 10 | + - caches the initialized runtime, |
| 11 | + - exposes `lintComponent(source, filename)` and `lintStyles(source, filename, styleMode)` entrypoints. |
| 12 | + - Keep `src/modules/cdn.js` as the source of truth for Biome runtime candidates and provider fallbacks. |
| 13 | + - Define an explicit style-mode strategy for non-CSS sources: |
| 14 | + - CSS/CSS Modules: lint directly as CSS. |
| 15 | + - Less/Sass: start with graceful "not yet supported" diagnostics, or optionally lint post-compiled CSS if output mapping quality is acceptable. |
| 16 | + - Normalize Biome diagnostics into existing diagnostics UI shape (headline + line/column + severity + rule id), so no diagnostics drawer redesign is required. |
| 17 | + - Preserve graceful degradation: if Biome fails to load/initialize, show a clear "Lint unavailable" message without breaking render/typecheck loops. |
| 18 | + - Add Playwright coverage for: |
| 19 | + - successful component lint run, |
| 20 | + - successful CSS lint run, |
| 21 | + - runtime-load failure path showing recovery-oriented messaging. |
| 22 | + - Suggested implementation prompt: |
| 23 | + - "Refactor `@knighted/develop` in-browser linting to use `@biomejs/wasm-web` as the primary engine for component and style lint checks. Remove lint web worker plumbing, add a lazy-initialized Biome lint service, keep CDN provider fallback definitions in `src/modules/cdn.js`, and map Biome diagnostics into existing component/styles diagnostics UI. For Less/Sass, add an explicit temporary unsupported diagnostic (or post-compile CSS lint only if mapping remains readable). Validate with `npm run lint`, `npm run build:esm`, and targeted lint-button Playwright checks." |
8 | 24 |
|
9 | 25 | 2. **In-browser component type checking** |
10 | 26 | - Add editor-linked diagnostics navigation so each issue can jump to the exact line/column in the component source. |
|
0 commit comments