Skip to content

Commit 01afe5e

Browse files
authored
Use the same version of eslint for the webview as for the cline package. (RooCodeInc#3940)
The webview and the cline package were using different version of eslint, which makes it difficult to use custom rules because the webview version wants the rules as ES modules, but the cline version wants commonJS modules. Switch the webview to use the same version as the cline package. Switch the webview eslint JS config to the json config file.
1 parent 83928cc commit 01afe5e

File tree

4 files changed

+256
-218
lines changed

4 files changed

+256
-218
lines changed

webview-ui/.eslintrc.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"root": true,
3+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
4+
"parser": "@typescript-eslint/parser",
5+
"parserOptions": {
6+
"ecmaVersion": 2020,
7+
"sourceType": "module"
8+
},
9+
"plugins": ["@typescript-eslint", "react-hooks", "react-refresh"],
10+
"env": {
11+
"browser": true,
12+
"es2020": true
13+
},
14+
"rules": {
15+
"react-hooks/rules-of-hooks": "error",
16+
// "react-refresh/only-export-components": [
17+
// "warn",
18+
// {
19+
// "allowConstantExport": true
20+
// }
21+
// ],
22+
"@typescript-eslint/no-unused-vars": "off",
23+
"@typescript-eslint/no-explicit-any": "off",
24+
"@typescript-eslint/no-empty-object-type": "off",
25+
"no-case-declarations": "off",
26+
"react-hooks/exhaustive-deps": "off",
27+
"prefer-const": "off",
28+
"no-extra-semi": "off"
29+
},
30+
"ignorePatterns": ["build"]
31+
}

webview-ui/eslint.config.js

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

0 commit comments

Comments
 (0)