-
Notifications
You must be signed in to change notification settings - Fork 787
/
.eslintrc.json
120 lines (120 loc) · 3.5 KB
/
.eslintrc.json
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "compat", "import"],
"rules": {
"compat/compat": "error",
"import/no-restricted-paths": [
"error",
{
"zones": [
// this means that in the src/shadowbox/infrastructure folder,
// you can't import any code,
// with the exception of other files within the src/shadowbox/infrastructure folder
{
"target": "./src/shadowbox/infrastructure",
"from": ".",
"except": ["./src/shadowbox/infrastructure", "./node_modules"]
},
{
"target": "./src/server_manager/infrastructure",
"from": ".",
"except": ["./src/server_manager/infrastructure", "./node_modules"]
},
{
"target": "./src/metrics_server/infrastructure",
"from": ".",
"except": ["./src/metrics_server/infrastructure", "./node_modules"]
},
// similar to above but for src/shadowbox/model, but you can use files from both the
// src/shadowbox/model and src/shadowbox/infrastructure paths
{
"target": "./src/shadowbox/model",
"from": ".",
"except": ["./src/shadowbox/model", "./src/shadowbox/infrastructure", "./node_modules"]
},
{
"target": "./src/server_manager/model",
"from": ".",
"except": [
"./src/server_manager/model",
"./src/server_manager/infrastructure",
"./node_modules"
]
}
// TODO(daniellacosse): fix ui_component-specific import violations
// {
// "target": "./src/server_manager/web_app/ui_components",
// "from": "./src/server_manager/model"
// },
// {
// "target": "./src/server_manager/web_app/ui_components",
// "from": "./src/server_manager/web_app",
// "except": ["./ui_components"]
// }
]
}
],
"no-prototype-builtins": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_"
}
]
},
"overrides": [
{
"files": [
"check-version-tracker.js",
"rollup-common.js",
"rollup.config.js",
"web-test-runner.config.js"
],
"env": {
"node": true
}
},
{
"files": ["packages/lit-html/src/test/version-stability_test.js"],
"env": {
"mocha": true
}
},
{
"files": [
"*_test.ts",
"packages/labs/ssr/custom_typings/node.d.ts",
"packages/labs/ssr/src/test/integration/tests/**",
"packages/labs/ssr/src/lib/util/parse5-utils.ts"
],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
}
]
}