Skip to content

chore(deps): lint with @uxfront/oxlint-config 0.2.0, with zero errors - #117

Merged
alexgrozav merged 30 commits into
mainfrom
oxlint-config-0-2-uxf-1050
Nov 24, 2026
Merged

alexgrozav merged 30 commits into
mainfrom
oxlint-config-0-2-uxf-1050

Conversation

@alexgrozav

@alexgrozav alexgrozav commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What changed

The site now lints with @uxfront/oxlint-config 0.2.0, which builds on Cloudflare's oxlint config. It added 25 rules that failed here, about 1,200 errors in all, and pnpm lint now passes with none.

The first commit moves to 0.2.0 with every failing rule turned off, and each commit after it turns one rule back on and fixes its errors, so you can review a rule at a time. Readers see no change, so there's no changelog entry. Here's what changed:

  • The root config. oxlint reads env and ignorePatterns only from the root config, so oxlint.config.ts restates them. Type-aware linting stays off.
  • Fixed without changing behaviour. Most fixes are mechanical: braces on every if and loop body, Array<T>, import type statements, replaceAll, Number.parseFloat, String.raw, sets for lookups and iterator helpers for filter-then-map. Lookup tables keyed by a runtime string, like each playground's code languages, became Maps, and anonymous result types got names. Non-null assertions became forms that can't behave differently, like a default for a regex group that takes part in every match.
  • New checks, with tests. pageByKey() throws when a key the standard gave out has no page, and a checklist row with fewer cells than its header is now an error rather than a row that's skipped without a word. The Popover gives focus back to its trigger when it unmounts while open, as before, now with a test, and two Combobox branches the tests didn't reach have one each.
  • Kept off, with the reason above each. no-console for the reference components' development warnings and the scripts, quality/no-unknown-returns (slots) in app/reference/, @nkzw/no-instanceof in the three reference files that tell elements apart, two rules in tests, one in contract.test.ts, and quality/no-chained-type-assertions in DocsNavigation.vue, where tv() loses the theme's types. <meta charset="utf-8"> keeps its one-line exception, since the HTML standard asks for exactly that label.
  • Not formatted. oxfmt isn't run here, since reformatting the code is a change of its own. The reference files, which oxfmt ignores, are hand-formatted, and their code blocks on the pages changed with them.
  • minimumReleaseAgeExclude. It adds @uxfront/oxlint-config@0.2.0, which was published on the same day.

Checklist

  • The title follows Conventional Commits, as in feat(docs): add the focus guideline.
  • pnpm check-types passes. So do pnpm lint (0 errors), pnpm check-reference, pnpm test (3,209 tests), pnpm build, pnpm build:mcp, pnpm check-mcp and pnpm check-seo.
  • Docs changes: the pages read well on pnpm dev. (No prose changes. Only the reference code blocks changed, and pnpm check-reference checks them against the files.)
  • Homepage changes: pnpm build, then pnpm lighthouse, still scores 100 in every category. (Every assertion in lighthouserc.json, 0.95 per category, passed.)

alexgrozav and others added 30 commits November 24, 2026 15:36
…ules off

0.2.0 builds on Cloudflare's oxlint config. oxlint reads env and
ignorePatterns only from the root config, so they are restated here.
Each rule that fails turns off for now; the commits after this one fix
its errors or keep it off with its reason.

Co-authored-by: multica-agent <github@multica.ai>
…ntifier-case

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
…-string-raw

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
…space

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
…y/no-conditional-empty-object-spread

Co-authored-by: multica-agent <github@multica.ai>
…-type-assertions

Co-authored-by: multica-agent <github@multica.ai>
…o-instanceof

Co-authored-by: multica-agent <github@multica.ai>
…omise-executor-return

Co-authored-by: multica-agent <github@multica.ai>
…/no-array-filter-map

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
…ype-specifier-style

Co-authored-by: multica-agent <github@multica.ai>
…tring-replace-all

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
…o-console

Co-authored-by: multica-agent <github@multica.ai>
…-dictionary-type

Co-authored-by: multica-agent <github@multica.ai>
…y/no-known-value-widening

Co-authored-by: multica-agent <github@multica.ai>
…corn/consistent-function-scoping

Co-authored-by: multica-agent <github@multica.ai>
…ty/no-unknown-returns

Co-authored-by: multica-agent <github@multica.ai>
Most become a form that can't behave differently: a regex group that
takes part in every match gets a default in its destructuring, an index
inside its array gets a fallback, and a last item read after a length
check is read once into a variable. Three changes are checks of their
own, each with a test where it can be reached: pageByKey() throws when a
key the standard gave out has no page, a checklist row with fewer cells
than its header is an error rather than a skipped row, and the Dialog's
and the Popover's handlers return when their element isn't there.

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
The toggle event arrives a task after the popover hides, so when it
unmounts while open, onToggle runs once its ref is null. The early return
added for no-non-null-assertion skipped the focus return there; it now
only guards the reads of the element. Corrects the comments on the other
two guards.

Co-authored-by: multica-agent <github@multica.ai>
…cope no-instanceof to its files

Co-authored-by: multica-agent <github@multica.ai>
@alexgrozav
alexgrozav marked this pull request as ready for review November 24, 2026 14:38
@alexgrozav
alexgrozav merged commit 43f05ff into main Nov 24, 2026
6 checks passed
@alexgrozav
alexgrozav deleted the oxlint-config-0-2-uxf-1050 branch November 24, 2026 14:40
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.

1 participant