Commit eeb0bb4
authored
chore: migrate from eslint to oxlint (#2493)
## Summary
Replaces ESLint with [oxlint](https://oxc.rs/docs/guide/usage/linter),
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, apify-sdk-js, and actor-scraper.
### What changed
- Drop `eslint`, `typescript-eslint`, `eslint-plugin-react`,
`eslint-plugin-yml`, `globals`, `@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`
- `lint:code` / `lint:code:fix` now run `oxlint --type-aware`
- Drop the YAML-specific lint script (`openapi:lint:yaml`) and its CI
step — Redocly + Spectral already validate the OpenAPI spec; oxlint
doesn't lint YAML, and we don't want eslint hanging around just for
style nits on YAML files
- Bump `@apify/tsconfig` to `^0.1.2` and add `module: Node16` /
`moduleResolution: Node16` so oxlint-tsgolint can parse the project
- Disable `typescript/no-floating-promises` and
`typescript/promise-function-async` repo-wide — the React event handlers
in `apify-docs-theme/` intentionally fire-and-forget
- Ignore `examples/` in oxlint (each example has its own tsconfig with
its own bundler settings)
### Lint output
\`\`\`
$ pnpm lint:code
Found 0 warnings and 0 errors.
Finished in 312ms on 132 files with 113 rules using 14 threads.
\`\`\`
## Test plan
- [x] \`pnpm lint:code\` — clean
- [x] \`pnpm openapi:lint\` — clean (Redocly + Spectral; YAML-style step
dropped)1 parent d8943ac commit eeb0bb4
7 files changed
Lines changed: 338 additions & 1150 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 36 | + | |
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| |||
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
44 | | - | |
45 | | - | |
| 42 | + | |
| 43 | + | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
53 | | - | |
54 | | - | |
| 51 | + | |
| 52 | + | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 58 | | |
65 | 59 | | |
| 60 | + | |
| 61 | + | |
66 | 62 | | |
67 | 63 | | |
68 | 64 | | |
69 | | - | |
70 | | - | |
| 65 | + | |
71 | 66 | | |
72 | 67 | | |
73 | 68 | | |
| |||
0 commit comments