Skip to content

build: configure Biome linting (#231)#422

Merged
devinoldenburg merged 1 commit into
mainfrom
fix/linting-231
Jun 21, 2026
Merged

build: configure Biome linting (#231)#422
devinoldenburg merged 1 commit into
mainfrom
fix/linting-231

Conversation

@devinoldenburg

Copy link
Copy Markdown
Owner

Configures a linter for the project (#231).

  • Biome added as a pinned devDependency (@biomejs/biome@2.5.0) with npm run lint / npm run lint:fix scripts and a dedicated Lint (Biome) CI job.
  • biome.json enables the recommended ruleset (lint-only; the formatter is left off to avoid a disruptive repo-wide reformat). Four rules are disabled because they conflict with deliberate, correct idioms in this codebase:
    • noAssignInExpressions — the lexer/router use the conventional while ((m = re.exec(s))) / if ((m = path.match(...))) pattern.
    • noDuplicateProperties / noDuplicateCustomProperties — the Lab CSS intentionally declares a hex value then an oklch() value for progressive enhancement (added in Lab web frontend uses oklch() colors — Safari <15.4 and older browsers unsupported #214).
    • noImplicitAnyLet — a TS-oriented rule that is noise for plain JS.
  • Applied the safe auto-fixes (useOptionalChain, useIndexOf, noUselessContinue, unused imports/vars) across plugins/, tools/, tests/, and fixed a forEach implicit-return in diagrams.js.

Verification

  • npm run lint exits 0 (errors resolved; remaining items are advisory warnings).
  • node --test "tests/*.test.mjs"650 pass, 0 fail (the shell-analyzer suite confirms the lexer auto-fixes are behavior-preserving).
  • node scripts/validate-opencode-config.mjs passes; npm audit → 0 vulnerabilities.

Closes #231

- Add biome.json (lint-only; recommended rules). Disabled rules that conflict
  with deliberate idioms: noAssignInExpressions (while ((m=re.exec()))),
  noDuplicateProperties/noDuplicateCustomProperties (intentional hex→oklch CSS
  fallbacks), noImplicitAnyLet (irrelevant for plain JS).
- Add @biomejs/biome@2.5.0 devDep + 'lint'/'lint:fix' scripts + a 'Lint (Biome)'
  CI job.
- Apply safe lint fixes (useOptionalChain, useIndexOf, noUselessContinue, unused
  imports) across plugins/tools/tests; fix a forEach implicit-return in
  diagrams.js. All 650 tests still pass.
@devinoldenburg devinoldenburg merged commit 289d12d into main Jun 21, 2026
11 checks passed
@devinoldenburg devinoldenburg deleted the fix/linting-231 branch June 21, 2026 11:48
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.

MEDIUM: No linting configured — missing ESLint, Prettier, or Biome across entire project

1 participant