Skip to content

Switch from ESLint to oxlint - #96

Merged
bhousel merged 1 commit into
mainfrom
oxlint
Nov 12, 2026
Merged

bhousel merged 1 commit into
mainfrom
oxlint

Conversation

@bhousel

@bhousel bhousel commented Nov 12, 2026

Copy link
Copy Markdown
Owner

This replaces ESLint with oxlint.

typescript-eslint doesn't support TypeScript 7 yet, and it is the only thing keeping #93 from passing. The four ESLint packages also brought in all 11 open bun audit advisories (DoS and ReDoS issues in brace-expansion, minimatch and picomatch). oxlint is a standalone linter that doesn't use the TypeScript compiler, and it uses ESLint's rule names.

Changes

  • Replace eslint, @eslint/js, globals and typescript-eslint with oxlint. The dependency tree goes from 104 packages to 25, and bun audit is clean.
  • Port eslint.config.js to .oxlintrc.json, with the same rules, severities and options wherever oxlint has them. Rules that ESLint's recommended and stylistic sets turned on, but that aren't in oxlint's correctness category, are listed explicitly.
  • check:lint takes about 20 ms instead of about 1 s.

Rules that didn't carry over

  • Whitespace and formatting: semi, brace-style, keyword-spacing, arrow-spacing, block-spacing, semi-spacing, func-call-spacing, space-unary-ops, no-whitespace-before-property, no-trailing-spaces, no-floating-decimal, linebreak-style. oxlint doesn't implement formatting rules, and ESLint has deprecated them too. .editorconfig and .gitattributes still cover trailing whitespace, indentation and line endings.
  • No oxlint version: dot-notation, no-invalid-this, no-process-env, no-undef-init, require-atomic-updates. None of them flagged anything in this code.
  • Deprecated in ESLint: no-return-await, no-catch-shadow.
  • Covered another way:
    • The @typescript-eslint versions of no-unused-vars, no-unused-expressions and no-array-constructor are now oxlint's rules of the same names, with the same options.
    • no-native-reassign was an old name for no-global-assign, which is still on.
    • no-dupe-args, no-octal and no-octal-escape describe code that can't even parse as an ES module.

TypeScript 7

On top of this branch, TypeScript 7.0.2 passes lint, build and tests. Once this lands, #93 should go green after a rebase.

One difference: under TS 7, the dist/diff3.d.mts that tsc generates from the JS has looser inferred types (most return types become any[]). package.json exports point types at the handwritten src/diff3.d.ts, which is unchanged, so normal imports aren't affected. It may be worth not generating that file at all, as a follow-up.

🤖 Generated with Claude Code

- Replace eslint, @eslint/js, globals and typescript-eslint with oxlint
- Port eslint.config.js to .oxlintrc.json, keeping the same rules where oxlint has them
- Drop the whitespace and formatting rules, which oxlint does not implement

typescript-eslint was the only thing blocking TypeScript 7, and the four
ESLint packages brought in all 11 open audit advisories.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bhousel
bhousel merged commit 1757d9c into main Nov 12, 2026
1 check passed
@bhousel
bhousel deleted the oxlint branch November 12, 2026 07:00
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