chore: migrate toolchain to Vite+ - #384
Merged
Merged
Conversation
Enables the shared foundry plugin set and carries the JS/TS convention rules used across ver0 projects, so agent-side conventions match the linter and formatter instead of drifting from them. settings.local.json stays untracked: it holds machine-local permission and environment overrides.
Replaces the eslint 10 stack (eslint, @ver0/eslint-config, @ver0/eslint-formatter-gha, typescript-eslint, bundled prettier) with vite-plus: oxlint via @ver0/oxlint-config presets, oxfmt for formatting, vitest through vp. Lint, fmt and test settings live in vite.config.ts; eslint.config.js, .prettierrc.js and vitest.config.ts are gone. oxfmt options mirror the previous prettier config. Presets: javascript, typescript + typescriptUnsafe, node, vitest. The unsafe preset keeps the no-unsafe-* family off, same as the eslint setup did -- the comparator is any-typed by contract. Repo-level rule policy (last extends entry, so it applies after the presets): - prefer-readonly-parameter-types off: the comparator takes arbitrary values, most often the mutable containers it is used on. - no-underscore-dangle allows __v in tests: Preact's vnode back-reference, reproduced verbatim by the circular-reference regression test. Code fallout, behavior preserving: - strict-boolean-expressions: falsy-object checks became explicit null checks; Set and Map branches narrow b through a local alias instead of relying on any. - the visited-pair check reads visited?.get(a) === b instead of has() + get(); b is a non-null object there, so a miss can never match, and it costs one lookup instead of two. Markdown linting drops out with @eslint/markdown -- oxlint does not lint markdown; oxfmt formats it. .yarnrc.yml preapproves @ver0/* for the minimal release age gate, otherwise fresh releases of own-org configs get quarantined.
Prose rewrapped at 120 columns and quote style normalized in the Dependabot YAML. No content changes.
This was referenced Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Swaps the eslint 10 + prettier + vitest setup for Vite+, matching react-hookz/web. Yarn stays the package manager --
vpdetects it fromyarn.lock/.yarnrc.yml.Toolchain
eslint+@ver0/eslint-config+ 10 plugin packages +typescript-eslintoxlint+oxlint-tsgolint+@ver0/oxlint-config@ver0/eslint-config/.prettierrc.js)oxfmtvitestdirectlyvitestthroughvp testeslint.config.js,.prettierrc.js,vitest.config.tsvite.config.ts16 dev dependencies out, 4 in.
yarn.lockloses ~3.5k lines.New scripts:
fmt,fmt:check.lint/test/benchmarknow go throughvp. CI gains a format-check step and drops the ESLint-only-f @ver0/ghaformatter.Lint config
Presets:
javascript,typescript+typescriptUnsafe,node,vitest. The unsafe preset keeps theno-unsafe-*family off exactly as the eslint config did -- the comparator isany-typed by contract. Type-aware linting is on (options.typeCheck).Two repo-level overrides, both documented inline:
prefer-readonly-parameter-typesoff (the comparator takes arbitrary, usually mutable values) andno-underscore-dangleallowing__vin tests (Preact vnode back-reference in the circular-reference regression test).Code changes
All behavior-preserving, driven by
strict-boolean-expressions:=== nullchecks -- aftertypeof x === 'object',nullis the only falsy value leftSet/Mapbranches narrowbthrough a local typed alias instead of calling.has()onanyvisited?.get(a) === binstead ofhas()+get()--bis a non-null object there, so a miss can never match; one lookup instead of twoNote
Markdown linting goes away with
@eslint/markdown-- oxlint does not lint markdown. oxfmt still formats it.yarn's 4.17 migration wanted to writenpmMinimalAgeGate: 0,approvedGitRepositories: ['**']andenableScripts: trueinto.yarnrc.yml; those were reverted, so the hardened defaults stay. OnlynpmPreapprovedPackages: ['@ver0/*']was added, so fresh own-org releases skip the age gate.Stacked on #383.