Skip to content

chore: replace Biome with Vite+ checks (Oxlint/Oxfmt) - #11

Merged
paul-phan merged 4 commits into
mainfrom
chore/200-viteplus-checks
Nov 20, 2026
Merged

paul-phan merged 4 commits into
mainfrom
chore/200-viteplus-checks

Conversation

@paul-phan

@paul-phan paul-phan commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Replace @weaverse/biome and Biome with Vite+ 1.7.0 (vp check, vp fmt). Keep the existing Vite builder, runtime plugins and unrelated manifest and lockfile resolutions unchanged.
  • Move the CI static-check step and development docs to npm run check. Keep the previous JavaScript/TypeScript style (double quotes, semicolons, trailing commas, width 80) and leave CSS and generated types alone.
  • Oxfmt reformatted 52 existing files; translated Biome suppressions only where Oxlint still reports the equivalent. The source and emitted-JS comparison found no changes to application or test logic.
  • Preserve npm run lint as a compatibility entry point to the Vite+ static check.

Rule parity

  • Map 166 effective Biome rules: 85 errors and 81 warnings. Disable all Oxlint category defaults. Reuse the matching rules from Replace Biome and ultracite with Vite+ checks weaverse#600, with this theme's severities.
  • The frozen base has no ultracite installed. Biome 2.5 reads the direct @weaverse/biome config but does not recurse into its extends list. The baseline is the version's recommended defaults (excluding unconfigured nursery rules), the installed preset and this theme's overrides. Enabling the SDK's whole rule set would add rules.
  • The local Oxlint plugin keeps cognitive complexity at 50, checks unused imports while leaving unused locals off, accepts the standard autocomplete values rejected by Oxlint's built-in rule, and bans only the coercing global numeric predicates, not parseInt or parseFloat. Type-aware rules are enabled where needed; the separate typecheck is unchanged.
  • Import sorting was a Biome assist, not a lint rule. Oxfmt keeps import statement order to avoid changing module evaluation. Tailwind class and JSX attribute sorting stay off, as in the effective Biome config.
  • The main warning increases come from type-aware no-deprecated (more than import sites) and array-type (additional type shapes). No warning was promoted to an error.

Theme overrides retained

  • Exclusions: .weaverse/, the preset's generated/ignored paths, and .gitignore.
  • Error at cognitive complexity > 50; useThrowNewError stays a warning. useSortedAttributes stays off.
  • Off: noNoninteractiveElementInteractions, noStaticElementInteractions, useKeyWithClickEvents, noExcessiveLinesPerFunction, noUnusedVariables, useUniqueElementIds, noNamespaceImport, useTopLevelRegex, noDangerouslySetInnerHtml, noDescendingSpecificity, noMagicNumbers, noNestedTernary, noParameterAssign, useConsistentArrowReturn, useConsistentTypeDefinitions, useFilenamingConvention, useNamingConvention, noAlert, noArrayIndexKey, noConsole, noExplicitAny, noUnnecessaryConditions, useAwait.

Not mapped

  • Biome information severity; Oxlint has no informational rule severity. noExtraBooleanCast, noFlatMapIdentity, noUselessConstructor, noUselessContinue, noUselessEmptyExport, noUselessEscapeInRegex, noUselessFragments, noUselessLabel, noUselessLoneBlockStatements, noUselessRename, noUselessStringRaw, noUselessSwitchCase, noUselessTernary, noUselessThisAlias, noUselessTypeConstraint, noUselessUndefinedInitialization, useArrayLiterals, useExponentiationOperator, useFlatMap, useIndexOf, useNodejsImportProtocol, useShorthandFunctionType.
  • CSS, GraphQL or HTML; no such files were in the Biome check scope. noDeprecatedMediaType, noDuplicateArgumentNames, noDuplicateAtImportRules, noDuplicateAttributes, noDuplicateCustomProperties, noDuplicateEnumValueNames, noDuplicateFields, noDuplicateFontNames, noDuplicateInputFieldNames, noDuplicateProperties, noDuplicateSelectorsKeyframeBlock, noDuplicateVariableNames, noEmptyBlock, noImportantInKeyframe, noImportantStyles, noInvalidDirectionInLinearGradient, noInvalidGridAreas, noInvalidPositionAtImportRule, noMissingVarFunction, noShorthandPropertyOverrides, noUnknownAtRules, noUnknownFunction, noUnknownMediaFeatureName, noUnknownProperty, noUnknownPseudoClass, noUnknownPseudoElement, noUnknownTypeSelector, noUnknownUnit, noUnmatchableAnbSelector, useGenericFontNames, useGraphqlNamedOperations, useLoneAnonymousOperation.
  • No faithful Oxlint rule. noDynamicNamespaceImportAccess, noEmptyTypeParameters, noEvolvingTypes, noExportedImports, noImplicitAnyLet, noOctalEscape, noReactForwardRef, noRedundantUseStrict, noStringCaseMismatch, noSuspiciousSemicolonInJsx, noThisInStatic, noVoidTypeReturn, useImageSize, useSimpleNumberKeys.
  • Only applies to Biome editor integration. noQuickfixBiome.
  • Only applies to the removed Biome configuration. noBiomeFirstException, useBiomeIgnoreFolder.
  • Oxc parses duplicate parameters as an error. noDuplicateParameters.
  • Oxlint's JSDoc rules do not require a reason together with @deprecated. useDeprecatedReason.
  • Oxlint's no-delete-var only checks deleting variables, not object properties. noDelete.
  • Oxlint's no-redeclare rejects valid TypeScript type/value declarations; TypeScript still rejects invalid redeclarations. noRedeclare.

Verification

Base 1ef92692c7f1 → head 1c30de8fc416. Local command exit codes and test counts:

Gate Base Candidate
Frozen install 0 0
Static checks 0 (0 errors, 17 warnings) 0 (0 errors, 94 warnings)
Format check Not a separate base gate 0
Typecheck 0 0
Cart tests 0 (10 passed) 0 (10 passed)
Build 0 0
  • Base CI: success. PR CI runs the unchanged verification job with the new static-check step.
  • Positive controls verified error and warning severities for React hooks, accessibility, typed lint, the local parity rules, and the disabled unused-local policy. Browser E2E was not run.
  • PR CI on this head, attempt 1: success.
  • Codex on this head: completed with no findings.
  • A follow-up compared grouped logical chains with Biome: both explicit groupings score 60 and fail the limit of 50; the ungrouped chain passes.
  • Codex's P2 correctly identified a grouping asymmetry. Biome itself fails the right-grouped example, so the fix restores the missing left-grouped error instead of weakening the legacy check.
  • All 142 non-sourcemap build artifacts are byte-identical to base.
  • Open: The exact worker-deploy sync conflicts in package.json and package-lock.json. Coordinate a worker-deploy integration that preserves its Cloudflare validation before merging. No deploy branch was changed.

Refs Weaverse/pilot#200

@paul-phan

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T09:12:32.185781Z 1c30de8 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ca201a0897

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lint/weaverse.mjs
) {
frame.score += 1;
}
frame.logical = node.type === "LogicalExpression" ? node.operator : null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve logical-chain state while visiting operands

For right-grouped conditions such as a && (b && c), visiting the first identifier resets frame.logical, so the nested && is counted again even though it continues the same logical sequence. Exercising this visitor with 20 independent if statements reports complexity 60 for right-grouped conditions, while the equivalent left-grouped conditions pass with complexity 40. Consequently, harmless grouping can make the new check reject functions below the repository's cognitive-complexity limit. Track logical sequences structurally rather than resetting their state on every non-logical node.

AGENTS.md reference: AGENTS.md:L122-L122

Useful? React with 👍 / 👎.

@paul-phan

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 1c30de8fc4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@paul-phan
paul-phan merged commit 16144a5 into main Nov 20, 2026
1 check passed
@paul-phan
paul-phan deleted the chore/200-viteplus-checks branch November 20, 2026 10:24
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