Skip to content

Migrate to Oxlint, replace Parcel with Vite, and update TypeScript - #647

Merged
metastable-void merged 7 commits into
mainfrom
modernize-toolchain
Oct 20, 2026
Merged

metastable-void merged 7 commits into
mainfrom
modernize-toolchain

Conversation

@metastable-void

Copy link
Copy Markdown
Member

No description provided.

metastable-void and others added 6 commits October 20, 2026 18:37
Config migrated 1:1 with @oxlint/migrate (eslint:recommended,
typescript-eslint/recommended, and the custom no-unused-vars options).
Existing eslint-disable comments are honoured by Oxlint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: metastable-void <mori@menhera.ad.jp>
- Extension pages are built by Vite 8 (Rolldown bundler, Oxc transforms,
  Lightning CSS). Output paths of HTML pages are unchanged; chunks now
  live under dist/assets/.
- Content scripts are bundled by Rolldown directly as single-file IIFEs
  at their fixed paths.
- static/ is Vite's publicDir and is copied verbatim; the minified React
  builds stay byte-identical to upstream.
- build-plugins/inject-filename.ts replaces Parcel's per-module
  __filename (used by CompatConsole) with source-map-preserving
  native MagicString edits.
- tsconfig: isolatedModules (required by per-file transpilation) and an
  explicit useDefineForClassFields: false to keep tsc's ES2021 class
  field semantics; fix the one type-only re-export it flagged.
- index-tab.html: classic deferred script -> module script (equivalent
  timing; Vite only bundles module scripts).

Verified by loading the Parcel and Vite XPIs into headless Firefox and
comparing every extension page: same rendered text, CSS rules and
console errors. addons-linter loses one warning (Parcel's runtime
import() of a variable).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: metastable-void <mori@menhera.ad.jp>
Nothing depends on the TypeScript JS API anymore (Vite/Rolldown/Oxlint
use Oxc), so tsc is now only used for typechecking and for compiling
scripts-src. Emitted scripts are byte-identical to TypeScript 6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: metastable-void <mori@menhera.ad.jp>
Options chosen to minimise churn against the existing style (single
quotes, es5 trailing commas, 120 columns). Only JS/TS is formatted;
static/ (including the vendored React builds), docs, Markdown, HTML,
CSS, JSON and YAML are ignored. `npm run build` runs `format:check`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: metastable-void <mori@menhera.ad.jp>
Mechanical reformat only (`npm run format`). The bundled output in dist/
is byte-identical before and after (excluding source maps).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: metastable-void <mori@menhera.ad.jp>
Use with `git config blame.ignoreRevsFile .git-blame-ignore-revs`
(GitHub picks it up automatically).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: metastable-void <mori@menhera.ad.jp>

import browser from 'webextension-polyfill';
import { EventSink } from "weeg-events";
import { EventSink } from 'weeg-events';
Oxlint, Oxfmt, Rolldown and Vite require Node ^20.19.0 || >=22.12.0.
On cimg/node:20.16 npm silently skipped their native bindings (optional
dependencies with a non-matching `engines`), so `oxlint` failed with
"Cannot find native binding". Node 20 is also EOL.

Verified with `npm ci && npm run build` in cimg/node:22.23 (and
reproduced the failure in cimg/node:20.16).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: metastable-void <mori@menhera.ad.jp>
@metastable-void metastable-void self-assigned this Oct 20, 2026
@metastable-void
metastable-void added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 3ae4371 Oct 20, 2026
4 checks passed
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