Commit 65bbb40
authored
chore: migrate from eslint to oxlint (#1122)
## 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-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
- [x] `pnpm lint` — clean
- [x] `pnpm format` — clean (still on biome + prettier for markdown)
- [x] `pnpm build` — TypeScript + tsdown both succeed1 parent c21fa27 commit 65bbb40
7 files changed
Lines changed: 374 additions & 1875 deletions
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 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
| 122 | + | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 140 | | |
146 | 141 | | |
147 | 142 | | |
| 143 | + | |
| 144 | + | |
148 | 145 | | |
149 | 146 | | |
150 | 147 | | |
151 | 148 | | |
152 | | - | |
153 | 149 | | |
154 | 150 | | |
155 | 151 | | |
| |||
173 | 169 | | |
174 | 170 | | |
175 | 171 | | |
176 | | - | |
| 172 | + | |
177 | 173 | | |
178 | 174 | | |
179 | 175 | | |
0 commit comments