Skip to content

Chore: [#389] Migrate from ESLint/Prettier to Oxlint/Oxfmt - #398

Merged
RomiC merged 2 commits into
mainfrom
chore/389-migrate-to-oxlint-oxfmt
Aug 2, 2026
Merged

Chore: [#389] Migrate from ESLint/Prettier to Oxlint/Oxfmt#398
RomiC merged 2 commits into
mainfrom
chore/389-migrate-to-oxlint-oxfmt

Conversation

@RomiC

@RomiC RomiC commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Closes #389

Replace ESLint and Prettier with the Rust-based Oxc toolchain — Oxlint (linter, 50-100x faster) and Oxfmt (formatter).

Changes

  • Dependencies: removed 5 ESLint/Prettier packages, added oxlint@1.76.0 and oxfmt@0.61.0
  • Configs: added oxlint.config.ts (rules mapped from the old ESLint config) and oxfmt.config.ts (preserves old Prettier settings: printWidth 120, singleQuote, no trailing commas; YAML keeps double quotes)
  • Scripts: lint/lint:fix → oxlint, format/format:check → oxfmt
  • Hooks: enabled husky hooks — pre-commit runs npx lint-staged (oxlint --fix + oxfmt), pre-push runs npm test
  • CI: added format:check step to both npm-test and npm-publish workflows
  • Removed: eslint.config.js, .prettierrc and all ESLint/Prettier deps

@RomiC RomiC self-assigned this Aug 2, 2026
@RomiC RomiC added enhancement New feature or request dx Changes relative to the Developer eXperience dependencies Dependencies update labels Aug 2, 2026
@greptile-apps

greptile-apps Bot commented Aug 2, 2026

Copy link
Copy Markdown

Greptile Summary

This PR replaces ESLint/Prettier with the Rust-based Oxc toolchain (Oxlint + Oxfmt), removes 5 legacy dev-dependencies, and wires the new tools into lint-staged, husky hooks, and CI.

  • Config migration: oxlint.config.ts maps the old ESLint rule set to Oxlint equivalents with category-based defaults (correctness/suspicious as error, perf as warn); oxfmt.config.ts faithfully reproduces all previous Prettier settings — all options including arrowParens, bracketSpacing, and trailingComma are confirmed supported by oxfmt.
  • Hooks & CI: lint-staged invokes the binaries directly (oxlint --fix, oxfmt) so staged-file arguments are forwarded correctly; both CI workflows gain a format:check step between lint and test.
  • Source: src/index.ts disable comment updated from eslint-disable-next-line to oxlint-disable-next-line.

Confidence Score: 5/5

Safe to merge — this is a pure tooling swap with no changes to library logic or public API.

All changed files are dev-tooling configuration. The new configs are well-formed, all oxfmt options are verified as supported, and the lint-staged setup correctly passes staged files to the binaries. No functional code changes outside of reformatting and updating a disable comment.

Files Needing Attention: No files require special attention.

Important Files Changed

Filename Overview
oxlint.config.ts New oxlint config with plugins and category-based rules; overrides correctly disable import/no-default-export for *.config.ts files.
oxfmt.config.ts New oxfmt config preserving Prettier settings; all options (arrowParens, bracketSpacing, trailingComma, etc.) are valid and supported by oxfmt.
package.json ESLint/Prettier deps removed, oxlint and oxfmt added; lint-staged calls binaries directly (not via npm run), ensuring staged file arguments are forwarded correctly.
src/index.ts ESLint disable comment updated to oxlint-disable-next-line; file reformatted by oxfmt with no functional changes.
.github/workflows/npm-test.yml Added format:check step between lint and test; correct placement ensures formatting failures fail fast.
.github/workflows/npm-publish.yml Added format:check step to match npm-test workflow; publish gate now verifies lint, formatting, and tests.
.husky/pre-commit Simple pre-commit hook running npx lint-staged; correct since lint-staged is a devDependency.
.husky/pre-push Pre-push hook runs npm test (which includes pretest build step); correct gate for push.

Reviews (3): Last reviewed commit: "Chore: [#389] Remove `any` from combineQ..." | Re-trigger Greptile

Comment thread package.json
@RomiC
RomiC force-pushed the chore/389-migrate-to-oxlint-oxfmt branch from 943562d to 591fb70 Compare August 2, 2026 06:01
RomiC added 2 commits August 2, 2026 10:02
- Swap ESLint/Prettier dev deps for oxlint and oxfmt
- Add oxlint.config.ts and oxfmt.config.ts, remove old configs
- Update scripts: lint/lint:fix -> oxlint, format/format:check -> oxfmt
- Enable husky hooks (pre-commit lint-staged, pre-push tests)
- Add format:check step to CI workflows
- Reformat codebase with oxfmt
- Constrain casts with AnyQueryCastMap instead of QueryCastMap<any>
- Infer per-cast result types via ReturnType, replacing conditional
  type inference
- Remove now-unused CastSchemaMap and QueryCastMap types
@RomiC
RomiC force-pushed the chore/389-migrate-to-oxlint-oxfmt branch from 591fb70 to fded10e Compare August 2, 2026 07:03
@RomiC
RomiC merged commit 3fa0007 into main Aug 2, 2026
13 checks passed
@RomiC
RomiC deleted the chore/389-migrate-to-oxlint-oxfmt branch August 2, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependencies update dx Changes relative to the Developer eXperience enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate from ESLint/Prettier to Oxlint/Oxfmt

1 participant