Skip to content

chore: migrate from ESLint to OxLint and OxFmt - #180

Merged
RedStar071 merged 4 commits into
mainfrom
chore/migrate-eslint-to-oxlint
Apr 6, 2026
Merged

RedStar071 merged 4 commits into
mainfrom
chore/migrate-eslint-to-oxlint

Conversation

@RedStar071

@RedStar071 RedStar071 commented Apr 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Migrates the project linting and formatting toolchain from ESLint + Prettier to OxLint + OxFmt.

Changes

Linting (ESLint -> OxLint)

  • Removed ESLint and all related packages (`eslint`, `@sapphire/eslint-config`, `@typescript-eslint/*`, `eslint-config-prettier`, `eslint-plugin-prettier`)
  • Added `oxlint` with `.oxlintrc.json` config adapted from wolfstar.rocks
  • Plugins: `unicorn`, `typescript`, `oxc`, `import`, `vitest`, `node`
  • Categories: `correctness: error`, `suspicious: warn`, `perf: warn`

Formatting (Prettier -> OxFmt)

  • Replaced Prettier with OxFmt via `.oxfmtrc.json`

CI Workflows

  • Restructured CI based on ring workflow pattern
  • Pinned GitHub Actions to commit SHAs
  • Added concurrency groups with cancel-in-progress
  • Added `merge_group` trigger
  • Lightweight lint job (`pnpm install --filter . --ignore-scripts`)

Cleanup

  • Removed: `.eslintrc.json`, `.eslintignore`, `tsconfig.eslint.json`, `.github/problemMatchers/eslint.json`, `.prettierignore`
  • Removed `allowedDeprecatedVersions: eslint` from `pnpm-workspace.yaml`
  • Updated `.github/agents/wolfstar-dev-agent.md` (ESLint -> OxLint references)
  • Applied auto-fixable lint fixes to source files

Scripts

Script Command
`lint` `oxlint` (read-only)
`lint:fix` `oxlint --fix`

- Replace ESLint with OxLint for linting
- Replace Prettier with OxFmt for formatting
- Add .oxlintrc.json based on wolfstar.rocks config
- Add .oxfmtrc.json for formatting config
- Update CI workflows with pinned actions and concurrency
- Update lint-staged, scripts, and agent docs
- Remove ESLint config files and dependencies
- Apply auto-fixable lint fixes to source files
Copilot AI review requested due to automatic review settings April 5, 2026 16:33
@coderabbitai

coderabbitai Bot commented Apr 5, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (2)
  • refactor
  • feature

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c8d96721-f9e0-46af-8fc8-261f5137ea00

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/migrate-eslint-to-oxlint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sentry

sentry Bot commented Apr 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.07%. Comparing base (27069c3) to head (b84351c).

Files with missing lines Patch % Lines
src/lib/schedule/manager/ScheduleEntry.ts 0.00% 1 Missing ⚠️
src/lib/util/Sanitizer/clean.ts 0.00% 1 Missing ⚠️
src/lib/util/resolvers/TimeSpan.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #180      +/-   ##
==========================================
- Coverage   78.12%   78.07%   -0.05%     
==========================================
  Files          81       81              
  Lines        2153     2153              
  Branches      212      211       -1     
==========================================
- Hits         1682     1681       -1     
- Misses        448      449       +1     
  Partials       23       23              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the repo’s linting/formatting stack and related automation away from ESLint/Prettier toward OxLint/OxFmt, updating configs, docs, CI, and applying auto-fixable code/style changes across the codebase.

Changes:

  • Replace ESLint configuration/assets with an OxLint configuration (.oxlintrc.json) and update developer/CI workflows accordingly.
  • Introduce OxFmt configuration (.oxfmtrc.json) and apply formatting/lint auto-fixes across source and docs.
  • Restructure CI workflow(s) (including concurrency + merge queue trigger) and remove ESLint-specific tooling/files.

Reviewed changes

Copilot reviewed 26 out of 37 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tsconfig.eslint.json Removed ESLint-specific TypeScript config.
src/listeners/guilds/messages/guildUserMessageImageNotify.ts Minor lint-driven parseInt style update.
src/lib/util/Sanitizer/clean.ts Switch to TypeError for invalid call order (lint-driven).
src/lib/util/resolvers/TimeSpan.ts Use Number.NaN (lint-driven).
src/lib/util/functions/emojis.ts Normalize unicode escapes / hex literal casing (format-driven).
src/lib/util/constants.ts Normalize hex literal casing (format-driven).
src/lib/structures/SettingsMenu.ts Normalize hex literal casing (format-driven).
src/lib/schedule/manager/ScheduleEntry.ts Lint-driven refactor around task payload creation.
src/commands/Moderation/Utilities/case.ts Normalize hex literal casing (format-driven).
src/commands/Moderation/dehoist.ts Normalize hex literal casing (format-driven).
src/commands/General/info.ts Prefer node: protocol import.
src/commands/Games/trivia.ts Minor lint/format tweaks (Number.parseInt, hex casing).
src/commands/Games/hungergames.ts Lint/cleanup refactors (promise executor, set construction, remove no-op catch).
README.md Formatting/indentation normalization.
prisma/migrations/migration_lock.toml Formatting/indentation normalization.
pnpm-workspace.yaml Remove ESLint deprecated version allowlist entry.
package.json Add OxLint/OxFmt + new lint scripts; remove ESLint deps; update lint-staged.
crowdin.yml YAML formatting normalization.
.vscode/mcp.json Remove ESLint MCP server entry.
.prettierignore Removed Prettier ignore file as part of toolchain migration.
.oxlintrc.json Added OxLint configuration (rules/plugins/overrides).
.oxfmtrc.json Added OxFmt configuration (formatting preferences + ignores).
.github/workflows/update-tlds.yml Workflow formatting adjustments.
.github/workflows/publish-stable.yml Workflow formatting adjustments.
.github/workflows/labelsync.yml Workflow formatting adjustments.
.github/workflows/continuous-integration.yml Reworked CI workflow (renamed, concurrency, merge_group, split jobs).
.github/workflows/continuous-delivery.yml Workflow formatting adjustments.
.github/workflows/codeql-analysis.yml Workflow formatting adjustments.
.github/TERMS_OF_SERVICE.md Markdown formatting normalization.
.github/problemMatchers/eslint.json Removed ESLint problem matcher.
.github/PRIVACY_POLICY.md Markdown formatting normalization.
.github/agents/wolfstar-dev-agent.md Update dev-agent doc from ESLint to OxLint.
.github/.kodiak.toml TOML formatting normalization.
.eslintrc.json Removed ESLint config.
.eslintignore Removed ESLint ignore file.
.codecov.yml YAML formatting normalization.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Resolved
Comment thread .github/agents/wolfstar-dev-agent.md Resolved
Comment thread .github/workflows/update-tlds.yml Resolved
coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 5, 2026
@RedStar071
RedStar071 requested a review from lorypelli April 5, 2026 16:47

@lorypelli lorypelli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this change, LGTM!!!

@RedStar071
RedStar071 enabled auto-merge April 5, 2026 16:54
@RedStar071
RedStar071 disabled auto-merge April 6, 2026 10:19
@RedStar071
RedStar071 merged commit fe4341c into main Apr 6, 2026
8 checks passed
@RedStar071
RedStar071 deleted the chore/migrate-eslint-to-oxlint branch April 6, 2026 10:20
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.

4 participants