Skip to content

Feat/migvitetovite+

Lakshy Yarlagadda requested to merge feat/migvitetovite+ into main

Summary

This merge request migrates the repository’s frontend toolchain from the older split setup of Vite + Vitest + ESLint + Prettier + custom staged checks to Vite+ wherever it is the appropriate replacement.

The primary goal is to consolidate development, build, test, lint, format, type-check, and staged-file workflows behind a single toolchain and reduce duplicated configuration across the repository.


What Changed

  • Replaced core npm scripts in package.json so the following now run through vp:
    • dev
    • build
    • preview
    • lint
    • format
    • format:check
    • typecheck
    • test
    • test:coverage
    • validate
    • validate:staged
  • Aliased vite and vitest to the Vite+ packages and added vite-plus as the primary toolchain dependency.
  • Moved the main lint, format, test, and staged-file configuration into vite.config.ts.
  • Added Vite+ staged-file rules:
    • staged JS/TS files → vp check --fix
    • staged markup/config files → vp fmt --write
  • Migrated formatting behavior from Prettier config files to Vite+ formatting config with .oxfmtignore.
  • Removed legacy tool-specific files now replaced by Vite+:
    • eslint.config.mjs
    • .prettierrc.json
    • .prettierignore
    • scripts/runStagedChecks.mjs
    • stale bun.lock
  • Updated src/vite-env.d.ts to use Vite+ client types.
  • Rewrote test imports from vitest to vite-plus/test.
  • Adjusted a small set of source and test files to satisfy stricter Vite+ and type-aware lint rules.
  • Updated CI in .gitlab-ci.yml to use the migrated scripts instead of the old ESLint-specific flow.
  • Updated contributor and user documentation to reflect the new toolchain and command expectations.
  • Cleaned knip.json to remove stale ignore entries from the old stack.

Behavioral Impact

  • No intended product behavior changes
  • This is primarily a toolchain and repository workflow migration
  • Developer-facing workflows remain npm run ...
  • These wrappers now execute Vite+ under the hood
  • Pre-commit behavior is preserved
  • Staged-file processing now comes from Vite+ instead of the removed custom script

Files Reviewers Should Focus On

  • package.json
  • vite.config.ts
  • .gitlab-ci.yml
  • tsconfig.json
  • tsconfig.node.json
  • src/vite-env.d.ts
  • tests/*
  • src/modules/teams/teamManager.test.ts
  • README.md
  • CONTRIBUTING.md
  • docs/USER_MANUAL.md

Validation Performed

The following commands were executed successfully after migration:

npm run lint npm run format:check npm run typecheck npm run validate npm run test:coverage npm run build npm run knip

All of the above passed successfully.


Intentional Non-Migrations

The following remain outside Vite+ because they are repository-specific or not cleanly replaced:

  • validate:i18n
  • i18n:replace
  • changelog scripts
  • git-hook setup script
  • knip
  • @vitejs/plugin-react
  • @vitest/coverage-v8

Known Warnings / Follow-up

  • @vitejs/plugin-react still emits Rolldown/esbuild deprecation warnings under Vite+
  • Coverage still prints an upstream mixed-version warning involving local vp and @vitest/coverage-v8

These warnings do not currently block:

  • lint
  • tests
  • coverage
  • build

However, they should be tracked separately if we want a fully warning-free pipeline.


Commit Breakdown

  • 3cef2e3chore(vite-plus): migrate core tooling and config
  • 05d6af9refactor: satisfy Vite+ lint and type checks
  • 0e93973test: migrate suite to Vite+ runner imports
  • e4de55bchore: update repo automation and docs for Vite+

Merge request reports

Loading