tslint.json 9.5 KB
Newer Older
E
Erich Gamma 已提交
1
{
2 3 4
	"rulesDirectory": [
		"build/lib/tslint"
	],
E
Erich Gamma 已提交
5
	"rules": {
F
Felix Becker 已提交
6
		"no-string-throw": true,
E
Erich Gamma 已提交
7
		"no-unused-expression": true,
8
		"no-duplicate-variable": true,
E
Erich Gamma 已提交
9 10 11
		"no-unused-variable": true,
		"curly": true,
		"class-name": true,
12 13 14
		"semicolon": [
			"always"
		],
15 16 17 18
		"triple-equals": true,
		"no-unexternalized-strings": [
			true,
			{
19 20 21 22
				"signatures": [
					"localize",
					"nls.localize"
				],
23 24 25
				"keyIndex": 0,
				"messageIndex": 1
			}
26 27
		],
		"layering": [
28
			true,
29 30 31 32 33 34 35 36
			{
				"common": [],
				"node": [
					"common"
				],
				"browser": [
					"common"
				],
J
Johannes Rieken 已提交
37
				"electron-main": [
38
					"common",
J
Johannes Rieken 已提交
39
					"node"
40 41 42 43 44 45 46
				],
				"electron-browser": [
					"common",
					"browser",
					"node"
				]
			}
47 48
		],
		"import-patterns": [
49
			true,
50 51 52
			// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
			// !!! Do not relax these rules !!!
			// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
53
			{
54
				// vs/base/common cannot depend on anything else
55 56 57 58 59 60
				"target": "**/vs/base/common/**",
				"restrictions": [
					"vs/nls",
					"**/vs/base/common/**"
				]
			},
61 62 63 64 65 66 67 68 69 70
			{
				// vs/base/test/common contains tests for vs/base/common
				"target": "**/vs/base/test/common/**",
				"restrictions": [
					"assert",
					"vs/nls",
					"**/vs/base/common/**",
					"**/vs/base/test/common/**"
				]
			},
71 72 73 74 75 76
			{
				// vs/base/browser can only depend on vs/base/common
				"target": "**/vs/base/browser/**",
				"restrictions": [
					"vs/nls",
					"vs/css!./**/*",
A
Alex Dima 已提交
77
					"**/vs/base/{common,browser}/**"
78 79
				]
			},
80 81 82 83 84 85
			{
				// vs/base/test/browser contains tests for vs/base/browser
				"target": "**/vs/base/test/browser/**",
				"restrictions": [
					"assert",
					"vs/nls",
A
Alex Dima 已提交
86 87
					"**/vs/base/{common,browser}/**",
					"**/vs/base/test/{common,browser}/**"
88 89
				]
			},
90
			{
A
Alex Dima 已提交
91
				"target": "**/vs/base/parts/*/common/**",
92 93
				"restrictions": [
					"vs/nls",
A
Alex Dima 已提交
94 95
					"**/vs/base/common/**",
					"**/vs/base/parts/*/common/**"
96 97 98
				]
			},
			{
A
Alex Dima 已提交
99
				"target": "**/vs/base/parts/*/browser/**",
100 101 102
				"restrictions": [
					"vs/nls",
					"vs/css!./**/*",
A
Alex Dima 已提交
103
					"**/vs/base/{common,browser}/**",
A
Alex Dima 已提交
104
					"**/vs/base/parts/*/{common,browser}/**"
105 106
				]
			},
A
Alex Dima 已提交
107 108 109 110 111
			{
				"target": "**/vs/platform/*/common/**",
				"restrictions": [
					"vs/nls",
					"**/vs/base/common/**",
A
Alex Dima 已提交
112 113 114 115
					"**/vs/base/parts/*/common/**",
					"**/vs/platform/*/common/**"
				]
			},
116 117 118 119
			{
				"target": "**/vs/platform/*/test/common/**",
				"restrictions": [
					"assert",
A
Alex Dima 已提交
120
					"sinon",
121 122 123 124 125 126
					"vs/nls",
					"**/vs/base/common/**",
					"**/vs/platform/*/common/**",
					"**/vs/platform/*/test/common/**"
				]
			},
A
Alex Dima 已提交
127 128 129 130 131 132 133 134
			{
				"target": "**/vs/platform/*/browser/**",
				"restrictions": [
					"vs/nls",
					"vs/css!./**/*",
					"**/vs/base/{common,browser}/**",
					"**/vs/base/parts/*/{common,browser}/**",
					"**/vs/platform/*/{common,browser}/**"
A
Alex Dima 已提交
135 136
				]
			},
137 138 139 140
			{
				"target": "**/vs/platform/*/test/browser/**",
				"restrictions": [
					"assert",
A
Alex Dima 已提交
141
					"sinon",
142 143 144 145 146 147
					"vs/nls",
					"**/vs/base/{common,browser}/**",
					"**/vs/platform/*/{common,browser}/**",
					"**/vs/platform/*/test/{common,browser}/**"
				]
			},
148 149 150 151 152 153 154 155 156 157
			{
				"target": "**/vs/editor/common/**",
				"restrictions": [
					"vs/nls",
					"**/vs/base/common/**",
					"**/vs/base/worker/**",
					"**/vs/platform/*/common/**",
					"**/vs/editor/common/**"
				]
			},
158 159 160 161 162 163 164 165 166 167 168 169
			{
				"target": "**/vs/editor/test/common/**",
				"restrictions": [
					"assert",
					"vs/nls",
					"**/vs/base/common/**",
					"**/vs/platform/*/common/**",
					"**/vs/platform/*/test/common/**",
					"**/vs/editor/common/**",
					"**/vs/editor/test/common/**"
				]
			},
170 171 172 173 174
			{
				"target": "**/vs/editor/browser/**",
				"restrictions": [
					"vs/nls",
					"vs/css!./**/*",
A
Alex Dima 已提交
175 176
					"**/vs/base/{common,browser}/**",
					"**/vs/platform/*/{common,browser}/**",
177
					"**/vs/editor/{common,browser}/**"
178 179
				]
			},
A
Alex Dima 已提交
180 181 182 183 184 185 186
			{
				"target": "**/vs/editor/test/browser/**",
				"restrictions": [
					"assert",
					"vs/nls",
					"**/vs/base/{common,browser}/**",
					"**/vs/platform/*/{common,browser}/**",
187
					"**/vs/platform/*/test/{common,browser}/**",
A
Alex Dima 已提交
188
					"**/vs/editor/{common,browser}/**",
189
					"**/vs/editor/test/{common,browser}/**"
A
Alex Dima 已提交
190 191
				]
			},
192 193 194 195 196 197
			{
				"target": "**/vs/editor/standalone/common/**",
				"restrictions": [
					"vs/nls",
					"**/vs/base/common/**",
					"**/vs/platform/*/common/**",
198 199
					"**/vs/editor/common/**",
					"**/vs/editor/standalone/common/**"
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
				]
			},
			{
				"target": "**/vs/editor/standalone/test/common/**",
				"restrictions": [
					"assert",
					"vs/nls",
					"**/vs/base/common/**",
					"**/vs/platform/*/common/**",
					"**/vs/platform/*/test/common/**",
					"**/vs/editor/common/**",
					"**/vs/editor/test/common/**"
				]
			},
			{
				"target": "**/vs/editor/standalone/browser/**",
				"restrictions": [
					"vs/nls",
					"vs/css!./**/*",
					"**/vs/base/{common,browser}/**",
220
					"**/vs/base/parts/*/{common,browser}/**",
221 222
					"**/vs/platform/*/{common,browser}/**",
					"**/vs/editor/{common,browser}/**",
A
Alex Dima 已提交
223
					"**/vs/editor/contrib/**",
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
					"**/vs/editor/standalone/{common,browser}/**"
				]
			},
			{
				"target": "**/vs/editor/standalone/test/browser/**",
				"restrictions": [
					"assert",
					"vs/nls",
					"**/vs/base/{common,browser}/**",
					"**/vs/platform/*/{common,browser}/**",
					"**/vs/platform/*/test/{common,browser}/**",
					"**/vs/editor/{common,browser}/**",
					"**/vs/editor/standalone/{common,browser}/**",
					"**/vs/editor/test/{common,browser}/**"
				]
			},
A
Alex Dima 已提交
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
			{
				"target": "**/vs/editor/contrib/*/test/**",
				"restrictions": [
					"assert",
					"vs/nls",
					"**/vs/base/{common,browser}/**",
					"**/vs/base/test/{common,browser}/**",
					"**/vs/base/parts/*/{common,browser}/**",
					"**/vs/platform/*/{common,browser}/**",
					"**/vs/platform/*/test/{common,browser}/**",
					"**/vs/editor/{common,browser}/**",
					"**/vs/editor/test/{common,browser}/**",
					"**/vs/editor/contrib/**"
				]
			},
255 256 257
			{
				"target": "**/vs/editor/contrib/**",
				"restrictions": [
258 259 260
					"vs/nls",
					"vs/css!./**/*",
					"**/vs/base/{common,browser}/**",
A
Alex Dima 已提交
261
					"**/vs/base/parts/*/{common,browser}/**",
A
Alex Dima 已提交
262
					"**/vs/platform/*/{common,browser}/**",
A
Alex Dima 已提交
263 264
					"**/vs/editor/{common,browser}/**",
					"**/vs/editor/contrib/**"
265 266
				]
			},
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
			{
				"target": "**/vs/workbench/common/**",
				"restrictions": [
					"vs/nls",
					"vs/css!./**/*",
					"**/vs/base/common/**",
					"**/vs/base/parts/*/common/**",
					"**/vs/platform/*/common/**",
					"**/vs/editor/common/**",
					"**/vs/editor/contrib/*/common/**",
					"**/vs/workbench/common/**",
					"**/vs/workbench/services/*/common/**",
					"assert"
				]
			},
			{
				"target": "**/vs/workbench/browser/**",
				"restrictions": [
					"vs/nls",
					"vs/css!./**/*",
					"**/vs/base/{common,browser}/**",
					"**/vs/base/parts/*/{common,browser}/**",
					"**/vs/platform/*/{common,browser}/**",
					"**/vs/editor/{common,browser}/**",
					"**/vs/editor/contrib/*/{common,browser}/**",
					"**/vs/workbench/{common,browser}/**",
					"**/vs/workbench/services/*/{common,browser}/**",
					"assert"
				]
			},
B
Benjamin Pasero 已提交
297
			{
298
				"target": "**/vs/workbench/workbench.main.ts",
B
Benjamin Pasero 已提交
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342
				"restrictions": [
					"**"
				]
			},
			{
				"target": "**/vs/workbench/electron-browser/**",
				"restrictions": [
					"vs/nls",
					"vs/css!./**/*",
					"**/vs/base/{common,browser,node,electron-browser}/**",
					"**/vs/base/parts/*/{common,browser,node,electron-browser}/**",
					"**/vs/platform/node/**",
					"**/vs/platform/*/{common,browser,node,electron-browser}/**",
					"**/vs/editor/{common,browser,node,electron-browser}/**",
					"**/vs/editor/contrib/*/{common,browser,node,electron-browser}/**",
					"**/vs/workbench/{common,browser,node,electron-browser,api}/**",
					"**/vs/workbench/services/*/{common,browser,node,electron-browser}/**",
					"*" // node modules
				]
			},
			{
				"target": "**/vs/workbench/node/**",
				"restrictions": [
					"vs/nls",
					"vs/css!./**/*",
					"**/vs/base/{common,node}/**",
					"**/vs/base/parts/*/{common,node}/**",
					"**/vs/platform/node/**",
					"**/vs/platform/*/{common,node}/**",
					"**/vs/editor/{common,node}/**",
					"**/vs/editor/contrib/*/{common,node}/**",
					"**/vs/workbench/{common,node,api}/**",
					"**/vs/workbench/services/*/{common,node}/**",
					"*" // node modules
				]
			},
			{
				"target": "**/vs/workbench/services/**/test/**",
				"restrictions": [
					"vs/nls",
					"vs/css!./**/*",
					"**/vs/base/**",
					"**/vs/platform/**",
					"**/vs/editor/**",
B
Benjamin Pasero 已提交
343
					"**/vs/workbench/{common,browser,node,electron-browser}/**",
B
Benjamin Pasero 已提交
344
					"vs/workbench/parts/files/common/editors/fileEditorInput",
B
Benjamin Pasero 已提交
345 346 347 348 349 350 351 352 353 354 355 356 357
					"**/vs/workbench/services/**",
					"**/vs/workbench/test/**",
					"*" // node modules
				]
			},
			{
				"target": "**/vs/workbench/services/**",
				"restrictions": [
					"vs/nls",
					"vs/css!./**/*",
					"**/vs/base/**",
					"**/vs/platform/**",
					"**/vs/editor/**",
358
					"**/vs/workbench/{common,browser,node,electron-browser,api}/**",
B
Benjamin Pasero 已提交
359 360 361 362
					"**/vs/workbench/services/**",
					"*" // node modules
				]
			},
B
Benjamin Pasero 已提交
363 364 365 366 367 368 369 370 371 372
			{
				"target": "**/vs/code/**",
				"restrictions": [
					"vs/nls",
					"**/vs/base/**",
					"**/vs/platform/**",
					"**/vs/code/**",
					"*" // node modules
				]
			},
373
			{
J
Johannes Rieken 已提交
374
				"target": "**/{node,electron-browser,electron-main,extensions}/**",
375 376
				"restrictions": "**/*"
			},
B
Benjamin Pasero 已提交
377 378 379 380 381 382 383
			{
				"target": "**/test/smoke/**",
				"restrictions": [
					"**/test/smoke/**",
					"*"
				]
			},
384
			{
J
Johannes Rieken 已提交
385
				"target": "{**/**.test.ts,**/test/**}",
386 387
				"restrictions": "{**/vs/**,assert,sinon}"
			},
388 389
			{
				"target": "**/{common,browser,workbench}/**",
J
Johannes Rieken 已提交
390
				"restrictions": "**/vs/**"
391
			}
J
Joao Moreno 已提交
392
		],
393
		"duplicate-imports": true,
M
Michel Kaporin 已提交
394
		"translation-remind": true
E
Erich Gamma 已提交
395
	}
396
}