mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
343 lines
8.9 KiB
JSON
343 lines
8.9 KiB
JSON
{
|
|
"rulesDirectory": [
|
|
"build/lib/tslint"
|
|
],
|
|
"rules": {
|
|
"no-arg": true,
|
|
"no-construct": true,
|
|
"no-debugger": true,
|
|
"no-duplicate-super": true,
|
|
"no-duplicate-switch-case": true,
|
|
"no-duplicate-variable": true,
|
|
"no-for-in-array": true,
|
|
"no-eval": true,
|
|
"no-redundant-jsdoc": true,
|
|
"no-restricted-globals": true,
|
|
"no-sparse-arrays": true,
|
|
"no-string-throw": true,
|
|
"no-unsafe-finally": true,
|
|
"no-unused-expression": true,
|
|
"no-var-keyword": true,
|
|
"number-literal-format": true,
|
|
"curly": true,
|
|
"class-name": true,
|
|
"label-position": true,
|
|
"semicolon": [
|
|
true,
|
|
"always"
|
|
],
|
|
"triple-equals": true,
|
|
"no-unexternalized-strings": [
|
|
true,
|
|
{
|
|
"signatures": [
|
|
"localize",
|
|
"nls.localize"
|
|
],
|
|
"keyIndex": 0,
|
|
"messageIndex": 1
|
|
}
|
|
],
|
|
"layering": [
|
|
true,
|
|
{
|
|
"common": [
|
|
"browser" // {{SQL CARBON EDIT}} @anthonydresser not ideal, but for our purposes its fine for now
|
|
],
|
|
"node": [
|
|
"common"
|
|
],
|
|
"browser": [
|
|
"common"
|
|
],
|
|
"electron-main": [
|
|
"common",
|
|
"node"
|
|
],
|
|
"electron-browser": [
|
|
"common",
|
|
"browser",
|
|
"node"
|
|
]
|
|
}
|
|
],
|
|
// {{SQL CARBON EDIT}} @anthonydresser for the most part these rules should be the same as vscode with some changes
|
|
// anything that references **/vs/** should references **/{vs,sql}/** instead
|
|
// @angular/* and rxjs/* are added to browser and electron-browser restrictions since * doesn't cover them
|
|
// to begin with the only import patterns we are enforcing is import patterns in */base/*
|
|
"import-patterns": [
|
|
true,
|
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
// !!! Do not relax these rules !!!
|
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
{
|
|
"target": "**/{vs,sql}/base/common/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/common/**"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/base/test/common/**",
|
|
"restrictions": [
|
|
"assert",
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/common/**",
|
|
"**/{vs,sql}/base/test/common/**"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/base/browser/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"vs/css!./**/*",
|
|
"**/{vs,sql}/base/{common,browser}/**",
|
|
"@angular/*",
|
|
"rxjs/*"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/base/node/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/{common,browser,node}/**",
|
|
"!path" // node modules (except path where we have our own impl)
|
|
]
|
|
},
|
|
{
|
|
// vs/base/test/browser contains tests for vs/base/browser
|
|
"target": "**/{vs,sql}/base/test/browser/**",
|
|
"restrictions": [
|
|
"assert",
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/{common,browser}/**",
|
|
"**/{vs,sql}/base/test/{common,browser}/**",
|
|
"@angular/*",
|
|
"rxjs/*"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/base/parts/*/common/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/common/**",
|
|
"**/{vs,sql}/base/parts/*/common/**"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/base/parts/*/browser/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"vs/css!./**/*",
|
|
"**/{vs,sql}/base/{common,browser}/**",
|
|
"**/{vs,sql}/base/parts/*/{common,browser}/**",
|
|
"@angular/*",
|
|
"rxjs/*"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/base/parts/*/node/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/{common,browser,node}/**",
|
|
"**/{vs,sql}/base/parts/*/{common,browser,node}/**",
|
|
"!path" // node modules (except path where we have our own impl)
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/base/parts/*/electron-browser/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"vs/css!./**/*",
|
|
"**/{vs,sql}/base/{common,browser,node,electron-browser}/**",
|
|
"**/{vs,sql}/base/parts/*/{common,browser,node,electron-browser}/**",
|
|
"!path", // node modules (except path where we have our own impl)
|
|
"@angular/*",
|
|
"rxjs/*"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/base/parts/*/electron-main/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/{common,browser,node,electron-main}/**",
|
|
"**/{vs,sql}/base/parts/*/{common,browser,node,electron-main}/**",
|
|
"!path", // node modules (except path where we have our own impl)
|
|
"@angular/*",
|
|
"rxjs/*"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/platform/*/common/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/common/**",
|
|
"**/{vs,sql}/base/parts/*/common/**",
|
|
"**/{vs,sql}/{platform,workbench}/**/common/**",
|
|
"**/vs/editor/common/**",
|
|
"azdata" // TODO remove
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/platform/*/test/common/**",
|
|
"restrictions": [
|
|
"assert",
|
|
"sinon",
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/common/**",
|
|
"**/{vs,sql}/{platform,workbench}/**/common/**",
|
|
"**/{vs,sql}/{base,platform,workbench}/**/test/common/**",
|
|
"typemoq",
|
|
"azdata" // TODO remove
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/platform/*/browser/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"vs/css!./**/*",
|
|
"**/{vs,sql}/base/{common,browser}/**",
|
|
"**/{vs,sql}/base/parts/*/{common,browser}/**",
|
|
"**/{vs,sql}/{platform,workbench}/**/{common,browser}/**",
|
|
"**/vs/editor/{common,browser}/**",
|
|
"@angular/*",
|
|
"rxjs/*",
|
|
"azdata" // TODO remove
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/platform/*/node/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/{common,browser,node}/**",
|
|
"**/{vs,sql}/base/parts/*/{common,browser,node}/**",
|
|
"**/{vs,sql}/{platform,workbench}/**/{common,browser,node}/**",
|
|
"**/vs/editor/{common,browser,node}/**",
|
|
"!path", // node modules (except path where we have our own impl)
|
|
"azdata" // TODO remove
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/platform/*/electron-browser/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"vs/css!./**/*",
|
|
"**/{vs,sql}/base/{common,browser,node}/**",
|
|
"**/{vs,sql}/base/parts/*/{common,browser,node,electron-browser}/**",
|
|
"**/{vs,sql}/{platform,workbench}/**/{common,browser,node,electron-browser}/**",
|
|
"**/vs/editor/{common,browser,node,electron-browser}/**",
|
|
"!path", // node modules (except path where we have our own impl)
|
|
"@angular/*",
|
|
"rxjs/*",
|
|
"azdata" // TODO remove
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/platform/*/electron-main/**",
|
|
"restrictions": [
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/{common,browser,node}/**",
|
|
"**/{vs,sql}/base/parts/*/{common,browser,node,electron-browser}/**",
|
|
"**/{vs,sql}/{platform,workbench}/**/{common,browser,node,electron-main}/**",
|
|
"**/vs/editor/{common,browser,node,electron-main}/**",
|
|
"!path", // node modules (except path where we have our own impl)
|
|
"azdata" // TODO remove
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/platform/*/test/browser/**",
|
|
"restrictions": [
|
|
"assert",
|
|
"sinon",
|
|
"vs/nls",
|
|
"**/{vs,sql}/base/{common,browser}/**",
|
|
"**/{vs,sql}/{platform,workbench}/**/{common,browser}/**",
|
|
"**/{vs,sql}/{base,platform,workbench}/**/test/{common,browser}/**",
|
|
"typemoq",
|
|
"@angular/*",
|
|
"rxjs/*",
|
|
"azdata" // TODO remove
|
|
]
|
|
}
|
|
],
|
|
// {{SQL CARBON EDIT}}
|
|
// remove import patterns and layering
|
|
"no-nodejs-globals": [
|
|
true,
|
|
{
|
|
"target": "**/{vs,sql}/base/common/{path,process,platform}.ts",
|
|
"allowed": [
|
|
"process" // -> defines safe access to process
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/**/test/{common,browser}/**",
|
|
"allowed": [
|
|
"process",
|
|
"Buffer",
|
|
"__filename",
|
|
"__dirname"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/workbench/api/common/extHostExtensionService.ts",
|
|
"allowed": [
|
|
"global" // -> safe access to 'global'
|
|
]
|
|
},
|
|
{
|
|
"target": "**/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts",
|
|
"allowed": [
|
|
"process"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/**/{common,browser}/**",
|
|
"allowed": [ /* none */]
|
|
}
|
|
],
|
|
"no-dom-globals": [
|
|
true,
|
|
{
|
|
"target": "**/{vs,sql}/**/test/{common,node,electron-main}/**",
|
|
"allowed": [
|
|
"document",
|
|
"HTMLElement"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/vs/workbench/contrib/terminal/common/{terminal.ts,terminalService.ts}",
|
|
"allowed": [
|
|
"HTMLElement"
|
|
]
|
|
},
|
|
{
|
|
"target": "**/{vs,sql}/**/{common,node,electron-main}/**",
|
|
"allowed": [ /* none */]
|
|
}
|
|
],
|
|
"duplicate-imports": true,
|
|
"no-new-buffer": true,
|
|
"translation-remind": true,
|
|
"no-standalone-editor": true,
|
|
"no-nls-in-standalone-editor": true,
|
|
"no-sync": [
|
|
true,
|
|
{
|
|
"exclude": [
|
|
"**/vs/**", // assume they are doing the right thing
|
|
"**/extensions/git/**", // assume they are doing the right thing,
|
|
"**/extensions/extension-editing/**", // assume they are doing the right thing,
|
|
"**/json-language-features/**", // assume they are doing the right thing,
|
|
"**/vscode-test-resolver/**", // testing doesn't matter
|
|
"**/integration-tests/**", // testing doesn't matter
|
|
"**/*.test.*", // testing doesn't matter
|
|
"**/test/**" // testing doesn't matter
|
|
]
|
|
}
|
|
],
|
|
"no-useless-strict": true
|
|
},
|
|
"defaultSeverity": "warning"
|
|
}
|