Skip to content

chore: migrate from eslint to oxlint#1122

Open
B4nan wants to merge 1 commit intomasterfrom
chore/migrate-to-oxlint
Open

chore: migrate from eslint to oxlint#1122
B4nan wants to merge 1 commit intomasterfrom
chore/migrate-to-oxlint

Conversation

@B4nan
Copy link
Copy Markdown
Member

@B4nan B4nan commented May 5, 2026

Summary

Replaces ESLint with oxlint, pulling in the shared @apify/oxlint-config preset and oxlint-tsgolint for type-aware rules. Mirrors the migration already shipped in apify-storage-local-js, apify-shared-js, apify-client-js, and apify-core. Biome stays as the formatter — no formatting changes.

What changed

  • Drop @apify/eslint-config, eslint, eslint-config-prettier, eslint-plugin-react, eslint-plugin-react-hooks, globals, typescript-eslint
  • Add oxlint@1.62.0, oxlint-tsgolint@0.22.0, @apify/oxlint-config@^0.2.5
  • Bump @apify/tsconfig to ^0.1.2 (drops removed importsNotUsedAsValues option that oxlint-tsgolint flags as invalid)
  • Replace eslint.config.mjs with oxlint.config.ts; drop unused tsconfig.eslint.json
  • lint / lint:fix (and lint-staged) now run oxlint --type-aware
  • Drop the dangling references: [{ "path": ".." }] from test/tsconfig.json — the root tsconfig isn't a composite project, and tsgolint rejects the malformed reference. The reference wasn't doing anything for tsc either.
  • Auto-fix surfaced one regex that should use String#startsWith (utils.ts).

Things to note

  • website/ (one .jsx file) is ignored, matching biome's behaviour. Not worth carrying React linting just for that.
  • The no-restricted-syntax rule that forbade direct LoginCommand calls in tests is gone — oxlint doesn't implement that rule yet. Convention now relies on review + the safeLogin() helper in test/__setup__/hooks/useAuthSetup.ts. Could be re-added as a custom oxlint plugin (like apify-core's oxlint_plugins/local.mjs) if desired.

Lint output

$ pnpm lint
Found 0 warnings and 0 errors.
Finished in 466ms on 244 files with 117 rules using 14 threads.

Test plan

  • pnpm lint — clean
  • pnpm format — clean (still on biome + prettier for markdown)
  • pnpm build — TypeScript + tsdown both succeed

@B4nan B4nan requested a review from vladfrangu as a code owner May 5, 2026 19:54
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label May 5, 2026
@github-actions github-actions Bot added this to the 140th sprint - Tooling team milestone May 5, 2026
@github-actions github-actions Bot added t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics. labels May 5, 2026
@B4nan B4nan force-pushed the chore/migrate-to-oxlint branch from fb1688e to 1d515f1 Compare May 5, 2026 20:27
@B4nan B4nan mentioned this pull request May 5, 2026
3 tasks
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-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants