Skip to content

chore: migrate from eslint to oxlint - #775

Open
VojtaM39 wants to merge 2 commits into
masterfrom
chore/migrate-eslint-to-oxlint
Open

VojtaM39 wants to merge 2 commits into
masterfrom
chore/migrate-eslint-to-oxlint

Conversation

@VojtaM39

@VojtaM39 VojtaM39 commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What

  • Replaces ESLint, typescript-eslint and @apify/eslint-config with oxlint, oxlint-tsgolint and @apify/oxlint-config, following the setup in chore: migrate from eslint/biome to oxlint/oxfmt crawlee#3569.
  • pnpm run lint is now oxlint --type-aware. Rules live in oxlint.config.ts; eslint.config.mjs and tsconfig.eslint.json are removed.
  • Removes five eslint-disable comments that oxlint reports as unused, and a never-assigned variable in test/e2e/server.ts. Nothing in src changes.
  • No formatter is added.

Why

typescript-eslint cannot run on TypeScript 7, which blocks #758. This PR stays on the current TypeScript version.

Notes on oxlint.config.ts

  • The correctness category is set to error. The preset leaves it at warn, so the former recommended rules (no-debugger, no-dupe-keys, no-unreachable, ...) would not fail CI.
  • Six rules are enabled locally (no-shadow, no-useless-constructor, default-param-last, no-empty-function, consistent-return, dot-notation). The preset sets typescript/x: error and then x: off, oxlint treats both names as one rule, so they end up off.
  • jest/vitest no-conditional-expect, vitest/no-conditional-tests, vitest/expect-expect and vitest/valid-title are off for tests. They are new with the preset and fire on existing tests.
  • typescript/no-floating-promises and no-empty-function are off for examples/**, which is plain JavaScript and was not linted with TypeScript rules before.

Risks

  • Dev tooling only. The published package, its dependencies and the build output are unchanged.
  • Lint is weaker than before in places:
    • No oxlint equivalent: import/no-extraneous-dependencies, simple-import-sort/imports, import/no-useless-path-segments, no-restricted-syntax, no-undef-init, no-octal-escape, no-octal, no-dupe-args and the stylistic rules (indent, quotes, max-len, object-curly-newline, lines-between-class-members).
    • Available in oxlint but not enabled by the preset, for example eqeqeq, no-var, prefer-const, no-underscore-dangle, no-new, import/no-cycle.- Test files are linted without tsconfig.test.json, because oxlint-tsgolint only discovers files named tsconfig.json. Packages declared in test/types/vendor.d.ts are any for type-aware rules.
  • Lint, type-check, unit tests and build were run locally. The e2e, Bun and Docker suites were not.

estimate: 1

🤖 Generated with Claude Code

Replace ESLint, typescript-eslint and @apify/eslint-config with oxlint,
oxlint-tsgolint and @apify/oxlint-config. Linting stays type-aware.

typescript-eslint cannot run on TypeScript 7, which blocks that upgrade.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@VojtaM39 VojtaM39 added adhoc Ad-hoc unplanned task added during the sprint. tech enhancement Enhancement of our tech stack. t-unblocking Issues with this label are in the ownership of the unblocking team. labels Dec 4, 2026
The preset leaves the correctness category at warn, so rules that used to
fail CI under ESLint (no-debugger, no-dupe-keys, no-unreachable, ...) only
warned.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@VojtaM39
VojtaM39 force-pushed the chore/migrate-eslint-to-oxlint branch from 86954d2 to 104c941 Compare December 4, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-unblocking Issues with this label are in the ownership of the unblocking team. tech enhancement Enhancement of our tech stack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants