Conversation
- Remove eslint, @eslint/compat, @hideoo/eslint-config, typescript-eslint, globals - Add oxlint with native typescript, react, unicorn, import-x plugins - Add @figma/eslint-plugin-figma-plugins as jsPlugin - Migrate rules to .oxlintrc.json
|
Visit the preview URL for this PR (updated for commit be9836f): https://harmonizer-web--pr59-migrate-to-oxc-bnws2r6d.web.app (expires Wed, 18 Feb 2026 01:56:25 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 0b46b8946d697564b3f98633c5cd230a6ede1236 |
- Remove prettier and prettier-plugin-tailwindcss - Add oxfmt with matching config (double quotes, trailing commas, 100 width) - Enable experimentalTailwindcss for class sorting - Rename .prettierignore to .oxfmtignore
- Rename scripts: lint:eslint→lint:oxlint, format:eslint→format:oxlint, lint:prettier→lint:oxfmt, format:prettier→format:oxfmt - Update CI workflow and CLAUDE.md docs to use new script names - Replace vscode-eslint/prettier-vscode extension recommendations with oxc.oxc-vscode - Convert eslint-disable comments to oxlint-disable with corrected rule prefixes (@typescript-eslint/ → typescript/) - Add @oxfmt/binding-darwin-arm64 to .npmrc age-exclude so native binding installs
Use cross-env to set FORCE_COLOR=1 before pnpm --parallel so child processes emit ANSI colors regardless of whether stdout is a TTY.
All rules in the plugin call getParserServices() from @typescript-eslint/utils, which requires a type-aware AST that oxlint's JS plugin bridge does not provide, causing runtime crashes on every linted file.
d293dd4 to
1780121
Compare
CI uses --frozen-lockfile so all platform bindings must be pre-resolved. Add supportedArchitectures to package.json so pnpm resolves darwin/linux arm64/x64 bindings when generating the lockfile locally.
oxfmt only auto-reads .gitignore and .prettierignore by default, not .oxfmtignore. Without --ignore-path the HTML ignore rule was silently skipped, causing CI failures when oxfmt tried to delegate HTML formatting to prettier which is no longer installed.
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.
Overview
This PR migrates the project's linting and formatting toolchain from ESLint + Prettier to oxlint + oxfmt (Oxc tooling), a Rust-based alternative that provides significantly faster performance while maintaining compatibility with existing rule sets.
Problem Statement
The project was using traditional JavaScript-based tooling (ESLint and Prettier) for code quality and formatting enforcement. While these tools are mature and widely adopted, they have inherent performance limitations, particularly on larger codebases. As the project grows, build times and developer feedback loops can suffer from slower linting and formatting operations. The emergence of Rust-based tooling alternatives offers an opportunity to improve development velocity without sacrificing code quality standards.
Solution Approach
Replaced ESLint with oxlint: Removed all ESLint-related dependencies (
eslint,typescript-eslint,@hideoo/eslint-config,@figma/eslint-plugin-figma-plugins,@eslint/compat,globals) and introducedoxlintas the linter. Created.oxlintrc.jsonwith equivalent rule configurations supporting TypeScript, React, and Unicorn plugins with the same import ordering, type definition preferences, and file-specific overrides.Replaced Prettier with oxfmt: Removed Prettier and its plugins (
prettier,prettier-plugin-tailwindcss) and addedoxfmtas the formatter. Migrated formatting preferences to.oxfmtrc.jsonmaintaining existing style choices (double quotes, trailing commas, 100-character line width).Updated development tooling: Modified all NPM scripts to use the new tools (
lint:oxlint,format:oxfmt), addedcross-envto preserve colored output in parallel script execution across platforms, and updated nano-staged hooks for pre-commit formatting.Configured editor integration: Updated VSCode workspace settings to use the
oxc-vscodeextension as the default formatter and linter, replacing the separate ESLint and Prettier extensions. Added CSS Modules Kit as a recommended extension to enhance developer experience.Updated CI pipeline: Modified the GitHub Actions lint workflow to execute oxlint and oxfmt checks instead of the previous ESLint and Prettier commands.
Fixed code quality issues: Addressed violations flagged by oxlint, primarily missing dependency declarations in
useCallbackanduseMemohooks, ensuring proper React hook exhaustive dependencies and resolving formatting inconsistencies to meet the new linter's standards.Cleaned up configuration artifacts: Removed obsolete configuration files (
eslint.config.js,prettier.config.cjs) and patches (@hideoo__eslint-config@4.1.1.patch), and renamed.prettierignoreto.oxfmtignore.Breaking Changes
oxc-vscodeextension and remove the old ESLint and Prettier extensions from VSCode to maintain consistent tooling behavior.@figma/eslint-plugin-figma-pluginswas dropped due to incomp