vscode/tslint.json
2018-10-25 10:05:34 -07:00

531 lines
No EOL
13 KiB
JSON

{
"rulesDirectory": [
"build/lib/tslint"
],
"rules": {
"no-string-throw": true,
"no-unused-expression": true,
"no-duplicate-variable": true,
"curly": true,
"class-name": true,
"semicolon": [
true,
"always"
],
"triple-equals": true,
"no-unexternalized-strings": [
true,
{
"signatures": [
"localize",
"nls.localize"
],
"keyIndex": 0,
"messageIndex": 1
}
],
"layering": [
true,
{
"common": [],
"node": [
"common"
],
"browser": [
"common"
],
"electron-main": [
"common",
"node"
],
"electron-browser": [
"common",
"browser",
"node"
]
}
],
"import-patterns": [
true,
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!! Do not relax these rules !!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
{
"target": "**/vs/base/common/**",
"restrictions": [
"vs/nls",
"**/vs/base/common/**"
]
},
{
"target": "**/vs/base/test/common/**",
"restrictions": [
"assert",
"vs/nls",
"**/vs/base/common/**",
"**/vs/base/test/common/**"
]
},
{
"target": "**/vs/base/browser/**",
"restrictions": [
"vs/nls",
"vs/css!./**/*",
"**/vs/base/{common,browser}/**"
]
},
{
"target": "**/vs/base/node/**",
"restrictions": [
"vs/nls",
"**/vs/base/{common,browser,node}/**",
"*" // node modules
]
},
{
// vs/base/test/browser contains tests for vs/base/browser
"target": "**/vs/base/test/browser/**",
"restrictions": [
"assert",
"vs/nls",
"**/vs/base/{common,browser}/**",
"**/vs/base/test/{common,browser}/**"
]
},
{
"target": "**/vs/base/parts/*/common/**",
"restrictions": [
"vs/nls",
"**/vs/base/common/**",
"**/vs/base/parts/*/common/**"
]
},
{
"target": "**/vs/base/parts/*/browser/**",
"restrictions": [
"vs/nls",
"vs/css!./**/*",
"**/vs/base/{common,browser}/**",
"**/vs/base/parts/*/{common,browser}/**"
]
},
{
"target": "**/vs/base/parts/*/node/**",
"restrictions": [
"vs/nls",
"**/vs/base/{common,browser,node}/**",
"**/vs/base/parts/*/{common,browser,node}/**",
"*" // node modules
]
},
{
"target": "**/vs/base/parts/*/electron-browser/**",
"restrictions": [
"vs/nls",
"vs/css!./**/*",
"**/vs/base/{common,browser,node,electron-browser}/**",
"**/vs/base/parts/*/{common,browser,node,electron-browser}/**",
"*" // node modules
]
},
{
"target": "**/vs/base/parts/*/electron-main/**",
"restrictions": [
"vs/nls",
"**/vs/base/{common,browser,node,electron-main}/**",
"**/vs/base/parts/*/{common,browser,node,electron-main}/**",
"*" // node modules
]
},
{
"target": "**/vs/platform/*/common/**",
"restrictions": [
"vs/nls",
"**/vs/base/common/**",
"**/vs/base/parts/*/common/**",
"**/vs/platform/*/common/**"
]
},
{
"target": "**/vs/platform/*/test/common/**",
"restrictions": [
"assert",
"sinon",
"vs/nls",
"**/vs/base/common/**",
"**/vs/platform/*/common/**",
"**/vs/platform/*/test/common/**"
]
},
{
"target": "**/vs/platform/*/browser/**",
"restrictions": [
"vs/nls",
"vs/css!./**/*",
"**/vs/base/{common,browser}/**",
"**/vs/base/parts/*/{common,browser}/**",
"**/vs/platform/*/{common,browser}/**"
]
},
{
"target": "**/vs/platform/*/node/**",
"restrictions": [
"vs/nls",
"**/vs/base/{common,browser,node}/**",
"**/vs/base/parts/*/{common,browser,node}/**",
"**/vs/platform/node/*",
"**/vs/platform/*/{common,browser,node}/**",
"*" // node modules
]
},
{
"target": "**/vs/platform/*/electron-browser/**",
"restrictions": [
"vs/nls",
"vs/css!./**/*",
"**/vs/base/{common,browser,node}/**",
"**/vs/base/parts/*/{common,browser,node,electron-browser}/**",
"**/vs/platform/node/*",
"**/vs/platform/*/{common,browser,node,electron-browser}/**",
"*" // node modules
]
},
{
"target": "**/vs/platform/*/electron-main/**",
"restrictions": [
"vs/nls",
"**/vs/base/{common,browser,node}/**",
"**/vs/base/parts/*/{common,browser,node,electron-browser}/**",
"**/vs/platform/node/*",
"**/vs/platform/*/{common,browser,node,electron-main}/**",
"*" // node modules
]
},
{
"target": "**/vs/platform/*/test/browser/**",
"restrictions": [
"assert",
"sinon",
"vs/nls",
"**/vs/base/{common,browser}/**",
"**/vs/platform/*/{common,browser}/**",
"**/vs/platform/*/test/{common,browser}/**"
]
},
{
"target": "**/vs/editor/common/**",
"restrictions": [
"vs/nls",
"**/vs/base/common/**",
"**/vs/base/worker/**",
"**/vs/platform/*/common/**",
"**/vs/editor/common/**"
]
},
{
"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/**"
]
},
{
"target": "**/vs/editor/browser/**",
"restrictions": [
"vs/nls",
"vs/css!./**/*",
"**/vs/base/{common,browser}/**",
"**/vs/platform/*/{common,browser}/**",
"**/vs/editor/{common,browser}/**"
]
},
{
"target": "**/vs/editor/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/test/{common,browser}/**"
]
},
{
"target": "**/vs/editor/standalone/common/**",
"restrictions": [
"vs/nls",
"**/vs/base/common/**",
"**/vs/platform/*/common/**",
"**/vs/editor/common/**",
"**/vs/editor/standalone/common/**"
]
},
{
"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}/**",
"**/vs/base/parts/*/{common,browser}/**",
"**/vs/platform/*/{common,browser}/**",
"**/vs/editor/{common,browser}/**",
"**/vs/editor/contrib/**",
"**/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}/**"
]
},
{
"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/**"
]
},
{
"target": "**/vs/editor/contrib/**",
"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/**"
]
},
{
"target": "**/vs/workbench/common/**",
"restrictions": [
"vs/nls",
"**/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/**", // editor/contrib is equivalent to /browser/ by convention
"**/vs/workbench/{common,browser}/**",
"**/vs/workbench/services/*/{common,browser}/**",
"assert"
]
},
{
"target": "**/vs/workbench/workbench.main.ts",
"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/**", // editor/contrib is equivalent to /browser/ by convention
"**/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/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/**",
"**/vs/workbench/{common,browser,node,electron-browser}/**",
"vs/workbench/parts/files/common/editors/fileEditorInput",
"**/vs/workbench/services/**",
"**/vs/workbench/test/**",
"*" // node modules
]
},
{
"target": "**/vs/workbench/services/**/common/**",
"restrictions": [
"vs/nls",
"**/vs/base/**/common/**",
"**/vs/platform/**/common/**",
"**/vs/editor/common/**",
"**/vs/workbench/common/**",
"**/vs/workbench/services/**/common/**"
]
},
{
"target": "**/vs/workbench/services/**/browser/**",
"restrictions": [
"vs/nls",
"vs/css!./**/*",
"**/vs/base/**/{common,browser}/**",
"**/vs/platform/**/{common,browser}/**",
"**/vs/editor/{common,browser}/**",
"**/vs/workbench/{common,browser}/**",
"**/vs/workbench/services/**/{common,browser}/**"
]
},
{
"target": "**/vs/workbench/services/**/node/**",
"restrictions": [
"vs/nls",
"**/vs/base/**/{common,node}/**",
"**/vs/platform/**/{common,node}/**",
"**/vs/editor/{common,node}/**",
"**/vs/workbench/{common,node}/**",
"**/vs/workbench/services/**/{common,node}/**",
"*" // node modules
]
},
{
"target": "**/vs/workbench/services/**/electron-browser/**",
"restrictions": [
"vs/nls",
"vs/css!./**/*",
"**/vs/base/**/{common,browser,node,electron-browser}/**",
"**/vs/platform/**/{common,browser,node,electron-browser}/**",
"**/vs/editor/**",
"**/vs/workbench/{common,browser,node,electron-browser,api}/**",
"**/vs/workbench/services/**/{common,browser,node,electron-browser}/**",
"*" // node modules
]
},
{
"target": "**/vs/code/node/**",
"restrictions": [
"vs/nls",
"**/vs/base/**/{common,browser,node}/**",
"**/vs/base/parts/**/{common,browser,node}/**",
"**/vs/platform/**/{common,browser,node}/**",
"**/vs/code/**/{common,browser,node}/**",
"*" // node modules
]
},
{
"target": "**/vs/code/electron-browser/**",
"restrictions": [
"vs/nls",
"vs/css!./**/*",
"**/vs/base/**/{common,browser,node,electron-browser}/**",
"**/vs/base/parts/**/{common,browser,node,electron-browser}/**",
"**/vs/platform/**/{common,browser,node,electron-browser}/**",
"**/vs/code/**/{common,browser,node,electron-browser}/**",
"*" // node modules
]
},
{
"target": "**/vs/code/electron-main/**",
"restrictions": [
"vs/nls",
"**/vs/base/**/{common,browser,node}/**",
"**/vs/base/parts/**/{common,browser,node,electron-main}/**",
"**/vs/platform/**/{common,browser,node,electron-main}/**",
"**/vs/code/**/{common,browser,node,electron-main}/**",
"**/vs/code/code.main",
"*" // node modules
]
},
{
"target": "**/{node,electron-browser,electron-main,extensions}/**",
"restrictions": "**/*"
},
{
"target": "**/test/smoke/**",
"restrictions": [
"**/test/smoke/**",
"*"
]
},
{
"target": "**/test/smoke2/**",
"restrictions": [
"**/test/smoke2/**",
"*"
]
},
{
"target": "{**/**.test.ts,**/test/**}",
"restrictions": "{**/vs/**,assert,sinon,crypto}"
},
{
"target": "**/{common,browser,workbench}/**",
"restrictions": "**/vs/**"
}
],
"duplicate-imports": true,
"no-new-buffer": true,
"translation-remind": true,
"no-standalone-editor": true
},
"defaultSeverity": "warning"
}