Skip to content

Modernize lint setup (migrate to oxlint) #303

In progress

Description

@mr-zwets

Wanted to do this before already but put it off because of the work involved, see issue #260

Activity

  1. added
    refactor
    dependencies
    on Apr 14, 2025
  2. added this to the v0.14.0 milestone on Sep 11, 2025
  3. mr-zwets commented on Dec 30, 2025

    @mr-zwets
    MemberAuthor

    we said we'd consider migrating to something more modern than eslint

    biome and deno came up, but oxlint as part of vite-plus would also be an option later in 2026

    vite-plus or deno would both be nice in that they attempt to handle the full JS toolchain

  4. modified the milestones: v0.14.0, v0.15.0 on Jun 16, 2026
  5. mr-zwets commented on Nov 29, 2026

    @mr-zwets
    MemberAuthor

    Proposal: move from ESLint to oxlint (and oxfmt for formatting)

    Why

    • Fast. Linting the three packages takes about 0.13s with oxlint (type-aware) versus about 5.85s with ESLint, roughly 45x (six runs each, same machine).
    • Current. We are on ESLint 8 with the old config format and the deprecated eslint-config-airbnb-typescript. typescript-eslint does not support TypeScript 7; oxlint's type-aware rules run on the TypeScript 7 compiler.
    • Fewer dependencies. 4 top-level packages instead of 241.

    What I tested (oxlint 1.95.0, config mirroring our current rules)

    • 18 of our 33 active rules carry over, including explicit-function-return-type, import/extensions and the type-aware only-throw-error.
    • 13 are formatting rules (indent, quotes, semi, ...) that oxlint doesn't cover.
    • max-len and naming-convention have no equivalent.
    • Only new findings: two unused catch parameters, configurable.

    Formatting with oxfmt (0.80.0, single quotes, semicolons, width 125)

    • Formats all files in about 40ms and replaces the 13 formatting rules plus max-len.
    • One-time reformat: about 800 changed lines in src (6%), plus about 850 in tests if fixtures are excluded.
    • It reflows code to fit the width, so some hand-wrapped imports and calls change shape.
    • Pre-1.0, so we should pin the version.

    Dependency

    oxlint's type-aware rules reject our current moduleResolution: "node" and baseUrl, so that part depends on the tsconfig change in #478. The non-type-aware rules run today.

    Suggested order

    1. oxlint without type-aware rules.
    2. oxfmt, as a single reformat commit.
    3. Type-aware rules once ANTLR is blocking the TypeScript upgrade #478 lands.

    Same direction as cashonize/cashonize-wallet#407.

  6. changed the title [-]Modernize eslint setup[/-] [+]Modernize lint setup (migrate to oxlint)[/+] on Nov 29, 2026
  7. linked a pull request that will close this issueReplace ESLint with oxlint and add oxfmt #480on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesrefactor

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions