-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy path.eslintrc.json
More file actions
164 lines (164 loc) · 4.23 KB
/
.eslintrc.json
File metadata and controls
164 lines (164 loc) · 4.23 KB
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{
"extends": "./node_modules/gts/",
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": [
"./client/tsconfig.json",
"./infrastructure/tsconfig.json",
"./server_manager/tsconfig.json"
]
},
"plugins": [
"compat",
"import"
],
"rules": {
"compat/compat": "error",
"import/no-restricted-paths": [
"error",
{
"zones": [
// This means that in the /infrastructure folder,
// you can't import any code,
// with the exception of other files within the /infrastructure folder.
{
"target": "./infrastructure",
"from": ".",
"except": [
"./infrastructure",
"./node_modules"
]
},
// Similar to above but for web/model, but you can use files from both the
// web/model and web/infrastructure paths.
{
"target": "./client/web/model",
"from": ".",
"except": [
"./client/web/model",
"./infrastructure",
"./node_modules"
]
},
// Prevents the internals of the outline_server_repository from being used publicly in the app.
{
"target": "./client/web/app/*.ts",
"from": "./client/web/app/outline_server_repository/server.ts"
},
{
"target": "./client/web/app/*.ts",
"from": "./client/web/app/outline_server_repository/access_key_serialization.ts"
},
{
"target": "./client/web/views",
"from": "./client/web/model"
},
{
"target": "./client/web/ui_components",
"from": "./client/web/model"
},
{
"target": "./client/web/views",
"from": "./client/web/app"
},
{
"target": "./client/web/ui_components",
"from": "./client/web/app"
}
]
}
],
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal"
],
"pathGroups": [
{
"pattern": "@material/**",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": [
"@material/**"
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"n/no-unsupported-features/node-builtins": [
"error",
{
"version": ">=18.0.0"
}
],
"n/no-unsupported-features/es-builtins": [
"error",
{
"version": ">=18.0.0"
}
],
"n/no-unsupported-features/es-syntax": [
"error",
{
"version": ">=18.0.0"
}
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-floating-promises": [
"error",
{
"ignoreVoid": true
}
],
"no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
]
},
// Disable type-aware linting only for JS config/build files that are not in
// any TS project.
"overrides": [
{
"files": [
"commitlint.config.js",
"server_manager/base.webpack.js",
"server_manager/browser.webpack.js",
"server_manager/css-in-js-rtl-loader.js",
"server_manager/electron_renderer.webpack.js",
"server_manager/electron/release/notarize.js",
"server_manager/install_scripts/build_do_install_script_ts.node.js",
"server_manager/install_scripts/build_gcp_install_script_ts.node.js",
"server_manager/www/karma.conf.js",
"server_manager/electron_main.webpack.mjs",
"server_manager/electron_preload.webpack.mjs",
".prettierrc.js",
"client/web/karma.conf.js"
],
"extends": [
"plugin:@typescript-eslint/disable-type-checked"
],
"parserOptions": {
"project": null
}
}
]
}