Skip to content

Commit d5484b5

Browse files
authored
Upgrade to ESLint 9 + share eslint config across workspaces (RooCodeInc#3815)
1 parent 3eb3169 commit d5484b5

28 files changed

+690
-2612
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ docs/_site/
3030
.env.*
3131
!.env.*.sample
3232

33-
34-
# Local lint config
35-
.eslintrc.local.json
36-
3733
# Logging
3834
logs
3935

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ else
2828
fi
2929

3030
"$npx_cmd" lint-staged
31+
"$pnpm_cmd" lint

.husky/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ else
1212
pnpm_cmd="pnpm"
1313
fi
1414

15-
"$pnpm_cmd" run lint check-types
15+
"$pnpm_cmd" run check-types
1616

1717
# Check for new changesets.
1818
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')

apps/vscode-nightly/.eslintrc.json

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

e2e/.eslintrc.json

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

e2e/eslint.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { config } from "@roo-code/config-eslint/base"
2+
3+
/** @type {import("eslint").Linter.Config} */
4+
export default [...config]

e2e/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
"name": "@roo-code/vscode-e2e",
33
"private": true,
44
"scripts": {
5-
"lint": "eslint src/**/*.ts --max-warnings=0",
5+
"lint": "eslint **/*.ts --max-warnings=0",
66
"check-types": "tsc --noEmit",
77
"format": "prettier --write src",
88
"test:ci": "pnpm --filter roo-cline build:development && pnpm test:run",
99
"test:run": "rimraf out && tsc -p tsconfig.json && npx dotenvx run -f .env.local -- node ./out/runTest.js",
1010
"clean": "rimraf out .turbo"
1111
},
1212
"devDependencies": {
13+
"@roo-code/config-eslint": "workspace:^",
14+
"@roo-code/config-typescript": "workspace:^",
1315
"@roo-code/types": "^1.12.0",
1416
"@types/mocha": "^10.0.10",
1517
"@types/node": "^22.14.1",

package.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@dotenvx/dotenvx": "^1.34.0",
2424
"@vscode/vsce": "3.3.2",
2525
"esbuild": "^0.25.0",
26-
"eslint": "^8.57.0",
26+
"eslint": "^9.27.0",
2727
"husky": "^9.1.7",
2828
"knip": "^5.44.4",
2929
"lint-staged": "^15.2.11",
@@ -38,18 +38,6 @@
3838
"lint-staged": {
3939
"*.{js,jsx,ts,tsx,json,css,md}": [
4040
"prettier --write"
41-
],
42-
"src/**/*.{ts,tsx}": [
43-
"npx eslint -c src/.eslintrc.json --max-warnings=0 --fix"
44-
],
45-
"webview-ui/**/*.{ts,tsx}": [
46-
"npx eslint -c webview-ui/.eslintrc.json --max-warnings=0 --fix"
47-
],
48-
"e2e/**/*.{ts,tsx}": [
49-
"npx eslint -c src/.eslintrc.json --max-warnings=0 --fix"
50-
],
51-
"{apps,packages}/**/*.{ts,tsx}": [
52-
"npx eslint --max-warnings=0 --fix"
5341
]
5442
}
5543
}

packages/build/.eslintrc.json

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

packages/build/eslint.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { config } from "@roo-code/config-eslint/base"
2+
3+
/** @type {import("eslint").Linter.Config} */
4+
export default [...config]

0 commit comments

Comments
 (0)