Skip to content

Commit 763c48b

Browse files
docs: update lint task.
1 parent 7153654 commit 763c48b

1 file changed

Lines changed: 11 additions & 18 deletions

File tree

docs/next-steps.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,18 @@
22

33
Focused follow-up work for `@knighted/develop`.
44

5-
1. **In-browser component/style linting**
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.
5+
1. **In-browser lint rules review and expansion**
6+
- Review the currently active Biome lint configuration in `src/modules/lint-diagnostics.js`, including rule groups, severities, and any custom suppression behavior.
7+
- Produce a recommended rule profile for component and style linting that balances signal quality with playground ergonomics.
8+
- Evaluate additional Biome rules to enable (or elevate severity) for:
9+
- correctness and suspicious patterns in component code,
10+
- accessibility and style consistency in JSX output,
11+
- CSS quality checks for style sources currently supported by Biome.
12+
- Revisit existing exceptions (for example unused App/View/render bindings) and document clear criteria for when suppression is acceptable.
13+
- Add/update regression coverage for the chosen rule profile in Playwright so diagnostics button/drawer behavior remains stable as rules evolve.
14+
- Document the finalized lint rule strategy in project docs so contributors can reason about why each rule is enabled, disabled, or downgraded.
2215
- 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."
16+
- "Audit the current Biome lint rules used by `@knighted/develop`, propose and apply a refined rule profile for component/styles linting, and add/update Playwright coverage to keep diagnostics UX stable under the new rules. Preserve intentional suppressions only when justified and document the reasoning. Validate with `npm run lint`, `npm run build:esm`, and targeted lint diagnostics Playwright tests."
2417

2518
2. **In-browser component type checking**
2619
- Add editor-linked diagnostics navigation so each issue can jump to the exact line/column in the component source.

0 commit comments

Comments
 (0)