-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.eslintrc.js
43 lines (42 loc) · 1.08 KB
/
.eslintrc.js
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
42
43
const DOMGlobals = ["window", "document"]
const NodeGlobals = ["module", "require"]
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
sourceType: "module"
},
rules: {
"no-unused-vars": ["error", { varsIgnorePattern: ".*", args: "none" }],
"no-restricted-globals": ["error", ...DOMGlobals, ...NodeGlobals],
"no-restricted-syntax": [
"error",
"ObjectExpression > SpreadElement",
"ObjectPattern > RestElement",
"AwaitExpression"
],
quotes: ["error", "double", { allowTemplateLiterals: true }],
semi: ["error", "never"]
},
overrides: [
{
files: ["**/__tests__/**", "test-dts/**"],
rules: {
"no-restricted-globals": "off",
"no-restricted-syntax": "off"
}
},
{
files: ["packages/vite-plugin/**"],
rules: {
"no-restricted-globals": ["error", ...DOMGlobals]
}
},
{
files: ["packages/webview/**"],
rules: {
"no-restricted-globals": ["error", ...NodeGlobals]
}
}
],
ignorePatterns: ["**/dist/**", "*.d.ts"]
}