Skip to content

Commit a39db3b

Browse files
mishushakovclaude
andauthored
chore: switch from eslint to oxlint (#1514)
Replaces ESLint (and its `@typescript-eslint/*` and `unused-imports` plugins) with [oxlint](https://oxc.rs) across the `js-sdk` and `cli` packages. A root `.oxlintrc.json` replaces the three `.eslintrc.cjs` files, the package `lint` scripts now run `oxlint`, the related devDependencies are swapped for `oxlint`, and the lint CI path filter is updated accordingly. Formatting rules (`quotes`/`semi`/`linebreak-style`) are dropped because Prettier already enforces them, and `no-unused-vars` is set to error to preserve the previous unused-imports check. The one behavior change is that `@typescript-eslint/member-ordering` has no oxlint equivalent and is no longer enforced. `lint`, `typecheck`, and `prettier` all pass clean for both packages. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9b4a743 commit a39db3b

10 files changed

Lines changed: 225 additions & 953 deletions

File tree

.eslintrc.cjs

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
code:
2525
- 'packages/**/!(*.md)'
2626
- 'spec/**/!(*.md)'
27-
- '.eslintrc.cjs'
27+
- '.oxlintrc.json'
2828
- '.prettierrc'
2929
- '.prettierignore'
3030
- '.editorconfig'

.oxlintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
3+
"ignorePatterns": ["**/dist/**", "**/node_modules/**", "**/*.gen.ts"],
4+
"rules": {
5+
"no-unused-vars": ["error", { "caughtErrors": "none" }],
6+
"typescript/no-explicit-any": "off",
7+
"typescript/ban-ts-comment": "off",
8+
"unicorn/no-useless-fallback-in-spread": "off"
9+
}
10+
}

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@
1717
"@changesets/read": "^0.6.2"
1818
},
1919
"devDependencies": {
20-
"@typescript-eslint/eslint-plugin": "^6.7.2",
21-
"@typescript-eslint/parser": "^6.7.2",
2220
"changeset": "^0.2.6",
23-
"eslint": "^8.57.1",
24-
"eslint-plugin-unused-imports": "^3.0.0"
21+
"oxlint": "^1.72.0"
2522
},
2623
"engines": {
2724
"pnpm": ">=9.0.0 <10"

packages/cli/.eslintrc.cjs

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"build": "tsc --noEmit --skipLibCheck && tsup --minify",
4040
"dev": "tsup --watch",
4141
"typecheck": "tsc --noEmit --skipLibCheck",
42-
"lint": "eslint src",
42+
"lint": "oxlint --config ../../.oxlintrc.json src",
4343
"format": "prettier --write src",
4444
"test:interactive": "pnpm build && ./dist/index.js",
4545
"test": "vitest run",

packages/js-sdk/.eslintrc.cjs

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/js-sdk/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,18 @@
4141
"test:deno": "deno test tests/runtimes/deno/ --allow-net --allow-read --allow-env --unstable-sloppy-imports --trace-leaks",
4242
"test:integration": "E2B_INTEGRATION_TEST=1 vitest run tests/integration/**",
4343
"typecheck": "tsc --noEmit",
44-
"lint": "eslint src/ tests/",
44+
"lint": "oxlint --config ../../.oxlintrc.json src tests",
4545
"format": "prettier --write src/ tests/ example.mts"
4646
},
4747
"devDependencies": {
4848
"@testing-library/react": "^16.2.0",
4949
"@types/node": "^20.19.19",
5050
"@types/platform": "^1.3.6",
5151
"@types/react": "^18.3.11",
52-
"@typescript-eslint/eslint-plugin": "^7.11.0",
53-
"@typescript-eslint/parser": "^7.11.0",
5452
"@vitejs/plugin-react": "^4.3.4",
5553
"@vitest/browser": "^4.1.0",
5654
"@vitest/browser-playwright": "^4.1.0",
5755
"dotenv": "^16.4.5",
58-
"eslint": "^8.57.1",
5956
"json-schema-to-typescript": "^15.0.4",
6057
"knip": "^5.43.6",
6158
"msw": "^2.12.10",

packages/js-sdk/src/template/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ export function callsites(depth: number): NodeJS.CallSite[] {
300300
return callSitesWithoutCurrent
301301
}
302302

303+
// Accessing `.stack` triggers `Error.prepareStackTrace` for its side effect.
304+
// oxlint-disable-next-line no-unused-expressions
303305
new Error().stack
304306
return result
305307
} finally {

0 commit comments

Comments
 (0)