Skip to content

chore: migrate from eslint to oxlint#276

Merged
B4nan merged 2 commits intomasterfrom
chore/migrate-to-oxlint
May 4, 2026
Merged

chore: migrate from eslint to oxlint#276
B4nan merged 2 commits intomasterfrom
chore/migrate-to-oxlint

Conversation

@B4nan
Copy link
Copy Markdown
Member

@B4nan B4nan commented May 4, 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-core, apify-client-js, and apify-sdk-js. Prettier remains in place — the oxfmt swap is the next PR.

What changed

  • Drop eslint, typescript-eslint, eslint-config-prettier, @apify/eslint-config
  • Add oxlint@1.62.0, oxlint-tsgolint@0.22.0, @apify/oxlint-config@^0.2.5
  • Replace eslint.config.mjs with oxlint.config.ts; drop unused tsconfig.eslint.json / tsconfig.eslint.website.json
  • lint / lint:fix and lint-staged now run oxlint --type-aware
  • Drop deprecated baseUrl from tsconfigs and switch the inline paths entries to relative form so oxlint-tsgolint can parse them
  • Add noEmit: true to test/tsconfig.json so tsgolint doesn't try to overwrite the e2e .mjs fixtures
  • Switch two .ts extension imports in scraper-tools to .js for consistency with the rest of the package
  • Ignore the actor packages (packages/actor-scraper/*) in oxlint — they're application code with their own bundler-specific tsconfigs; the shared scraper-tools library is still linted
  • One source fix: drop unused err in web-scraper catch block
  • One disable comment for an intentional generic param used only by a declaration-merged interface in scraper-tools/src/context.ts

Lint output

```
$ pnpm lint
Found 1 warning and 0 errors.
Finished in 143ms on 40 files with 117 rules using 14 threads.
```

(The single warning — `no-unsafe-optional-chaining` in scraper-tools — is pre-existing.)

Test plan

  • `pnpm lint` — clean
  • `pnpm format:check` — clean
  • `pnpm test` — 16/16 passing
  • `pnpm build` — all 8 turbo tasks succeed

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-core,
apify-client-js, and apify-sdk-js. Prettier remains in place — the oxfmt
swap is the next PR.

- Drop `eslint`, `typescript-eslint`, `eslint-config-prettier`,
  `@apify/eslint-config`
- Add `oxlint@1.62.0`, `oxlint-tsgolint@0.22.0`, `@apify/oxlint-config@^0.2.5`
- Replace `eslint.config.mjs` with `oxlint.config.ts`; drop unused
  `tsconfig.eslint.json` / `tsconfig.eslint.website.json`
- `lint` / `lint:fix` and lint-staged now run `oxlint --type-aware`
- Drop deprecated `baseUrl` from tsconfigs and switch the inline `paths`
  entries to relative form so oxlint-tsgolint can parse them
- Add `noEmit: true` to `test/tsconfig.json` so tsgolint doesn't try to
  overwrite the e2e `.mjs` fixtures
- Switch two `.ts` extension imports in `scraper-tools` to `.js` for
  consistency with the rest of the package
- Ignore the actor packages (`packages/actor-scraper/*`) in oxlint —
  they're application code with their own bundler-specific tsconfigs;
  the shared `scraper-tools` library is still linted
- One source fix: drop unused `err` in `web-scraper` catch block
- One disable comment for an intentional generic param used only by a
  declaration-merged interface in `scraper-tools/src/context.ts`
@B4nan B4nan mentioned this pull request May 4, 2026
3 tasks
@B4nan B4nan added the adhoc Ad-hoc / cross-cutting work label May 4, 2026
@B4nan B4nan merged commit cc1bd46 into master May 4, 2026
4 checks passed
@B4nan B4nan deleted the chore/migrate-to-oxlint branch May 4, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc / cross-cutting work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants