Migrate from ESLint to Oxlint and update build tooling to vite-plus#335
Merged
Conversation
- Replace vite imports with vite-plus across 20 source files - Replace vitest imports with vite-plus/test across 12 test files - Add vite-plus as dependency, remove standalone vite/vitest deps - Remove Nx task orchestration (nx.json, @nrwl/* deps) - Remove ESLint and related plugins, migrate to oxlint via @oxlint/migrate - Create root vite.config.ts for Vite+ configuration - Create .oxlintrc.json with migrated lint rules - Update root scripts: lint/fmt/check now use vp commands - Update per-package lint scripts to use vp lint - Update iles CLI test command to use vp test - Fix type-only import in shared.d.ts for oxfmt compatibility - Apply oxfmt formatting across entire codebase - Retain tsup for package builds (vp pack incompatible with workspace type resolution for DTS generation) https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit
- Replace tsup with `vp pack` for all 12 packages - Restore nx.json for build orchestration with cloud caching - Remove CJS builds and exports (ESM-only) - Update package exports from .js/.d.ts to .mjs/.d.mts - Remove all tsup.config.ts files (13 files) - Add tsc --emitDeclarationOnly for DTS generation where rolldown DTS plugin cannot handle postcss type syntax - Update bin/iles.js and config.js to reference .mjs output https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit
Add .oxfmtrc.json with semi: false and reformat all source files. https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit
Reverts the semicolon removal and single-quote formatting commits. The .oxfmtrc.json config is preserved for future application. https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit
Restore original formatting for files that only had oxfmt reformatting (semicolons, quotes, whitespace) without any migration-related changes. Keeps only files with actual vite-plus migration work. https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit
|
View your CI Pipeline Execution ↗ for commit e28d77f
☁️ Nx Cloud last updated this comment at |
Deploying iles with
|
| Latest commit: |
e28d77f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://105c80f1.iles.pages.dev |
| Branch Preview URL: | https://claude-migrate-to-vite-plus.iles.pages.dev |
The vp pack migration bundled framework dependencies (preact, vue, svelte, solid-js) into the hydration and prerender outputs, causing duplicate instances at runtime. For preact, this meant hooks state (__H) lived on the wrong instance, breaking component mounting. Add peerDependencies so vp pack's DepPlugin externalizes them, and add per-package vite.config.ts files with deps configuration. Also fix the headings package build by disabling auto-DTS in vp pack (it uses tsc separately) and configuring deps.onlyBundle for slugo. https://claude.ai/code/session_01UKpPTEVDMf22aaUSsUhrfD
…ading When vite-plugin-solid sets resolve.conditions to ['solid', 'development'], it replaces Vite's defaults (module, browser). The Svelte plugin then appends 'svelte' but 'browser' is missing, causing Svelte's export map to resolve to index-server.js instead of the browser bundle. This resulted in mount() being unavailable at runtime. Setting conditions explicitly in iles's Vite config defaults ensures browser is always present regardless of framework plugin ordering. https://claude.ai/code/session_01YNwMyHwufBk4A4mLukiHom
* fix: prevent client:none islands from hydrating in dev mode The Island component's `client:none` strategy only skipped hydration during SSR but not in the browser. In dev mode (SPA), this caused a script to be generated that imported `mount` from svelte's server entry, triggering the "mount(...) is not available on the server" error. Also bumps svelte from ^5.1.13 to ^5.46.4 in hydration and prerender packages to satisfy @sveltejs/vite-plugin-svelte@7's peer dependency. https://claude.ai/code/session_01DyKgnqFPLT1z1z4ewaEtMT * fix: add default resolve conditions to prevent server-side Svelte resolution The `vite-plugin-solid` config hook sets `resolve.conditions` to `['solid', 'development']`, replacing Vite's defaults which include `browser` and `module`. Without `browser`, Svelte's package exports resolve to `index-server.js` instead of `index-client.js`, causing `mount(...)` to throw "not available on the server" in the browser. Add `['module', 'browser', 'development']` to the base Vite config so framework plugins append to these defaults rather than replacing them. https://claude.ai/code/session_01DyKgnqFPLT1z1z4ewaEtMT * chore: revert changes and update solid plugin instead --------- Co-authored-by: Claude <noreply@anthropic.com>
…and add `pnpm pkg-size` utility (#338) Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Maximo Mussini <maximomussini@gmail.com>
… emission from `tsc` to tsdown `dts` with default `.d.mts` outputs (#339) * Initial plan * refactor: migrate package type generation from tsc to tsdown dts Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/fa271805-854d-48e3-92f6-dc936a87f21c Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * refactor: use default d.mts type outputs and export type entries Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/09a276ea-1d81-4b51-8159-b5da49e6a427 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * chore: remove unnecessary typescript devDependencies Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/7bdca0c4-6073-4609-a3fe-266b33931b5a Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * refactor: use tsdown dts for iles build:node Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/7b458719-9ff3-40f8-87ff-ff350f0729f2 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * Fix CI lint config loading by switching package Vite configs to ESM `.mjs` (#340) * Initial plan * chore: enable type-aware linting in tsdown configs Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/8d2d6c99-a9d1-4c3a-aadf-fe6c70c7d37c Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * chore: add root lint script using nx run-many Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/e4ed89d0-8715-4493-8e4d-e08a6123d9a2 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> * chore: fix lint issue * fix: remove tsdown.config.ts, use `vite.config.ts` instead `typeAware` and `typeCheck` should be in `lint.options`, not `lint`. * fix: linting, avoid using tsdown.config.ts, use vite.config.ts instead * chore: remove unused vite config * fix: load package lint configs as mjs in CI Agent-Logs-Url: https://github.com/ElMassimo/iles/sessions/031c0250-2bd3-434c-a3ae-9a8c59646e62 Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> Co-authored-by: Maximo Mussini <maximomussini@gmail.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ElMassimo <1158253+ElMassimo@users.noreply.github.com> Co-authored-by: Maximo Mussini <maximomussini@gmail.com>
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.
Description 📖
This pull request migrates the project from ESLint to Oxlint for linting and updates the build tooling to use vite-plus instead of vite. It also replaces tsup with vite-plus's pack command for building packages.
Background 📜
The project was using ESLint with @antfu/eslint-config for linting, which required maintaining multiple configuration files and tsup for building packages. Oxlint provides faster linting with a simpler configuration model, and vite-plus offers a more integrated build and development experience.
The Fix 🔨
Linting Changes:
eslint.config.mjsand replaced it with.oxlintrc.jsoncontaining comprehensive linting rules.oxfmtrc.jsonfor code formatting configurationpackage.jsonto usevp lintandvp fmtcommands instead of ESLintBuild Tooling Changes:
tsup.config.tsfiles from packages (iles, hydration, prerender, excerpt, feed, headings, icons, mdx, pages, pwa, images, prism)vp packcommand instead of tsup.js/.d.tsto.mjs/.d.mtsfor consistency.cjsfiles) in favor of ESM-only distributionDependency Updates:
Package.json Standardization:
Test Plan
Existing tests pass with the new vite-plus/test imports. The linting configuration has been validated through the comprehensive .oxlintrc.json rules covering correctness, best practices, and code quality standards.
https://claude.ai/code/session_01Fsp32NvHiLU7Y141BfEsit