Repository navigation
Migrate to Oxlint, replace Parcel with Vite, and update TypeScript - #647
Merged
Merged
Conversation
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>
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.
No description provided.