Skip to content

Commit fd4a9ae

Browse files
committed
Better eslint
1 parent 34ba7a6 commit fd4a9ae

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

.eslintrc.json

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,31 @@
33
"parser": "@typescript-eslint/parser",
44
"parserOptions": {
55
"ecmaVersion": 6,
6-
"sourceType": "module"
6+
"sourceType": "module",
7+
"project": "./tsconfig.json"
78
},
89
"plugins": ["@typescript-eslint"],
910
"rules": {
10-
"@typescript-eslint/naming-convention": [
11-
"warn",
12-
{
13-
"selector": "import",
14-
"format": ["camelCase", "PascalCase"]
15-
}
16-
],
11+
"no-var": "error",
12+
"no-unused-vars": "off",
13+
"@typescript-eslint/no-unused-vars": "warn",
14+
"@typescript-eslint/no-explicit-any": "warn",
15+
"@typescript-eslint/no-misused-promises": "error",
16+
"@typescript-eslint/await-thenable": "warn",
17+
"@typescript-eslint/return-await": "error",
18+
"@typescript-eslint/explicit-function-return-type": "warn",
1719
"@typescript-eslint/semi": "off",
1820
"eqeqeq": "warn",
1921
"no-throw-literal": "warn",
2022
"semi": "off"
2123
},
22-
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
24+
"ignorePatterns": ["out", "dist", "**/*.d.ts", "jest.*.js"],
25+
"overrides": [
26+
{
27+
"files": ["webview-ui/src/**/*.tsx"],
28+
"parserOptions": {
29+
"project": "./webview-ui/tsconfig.json"
30+
}
31+
}
32+
]
2333
}

0 commit comments

Comments
 (0)