Global object linting (#6857)

* add more linting

* fix linting issues
This commit is contained in:
Anthony Dresser
2019-08-22 10:51:59 -07:00
committed by GitHub
parent 854508e940
commit 8e070454c3
54 changed files with 375 additions and 388 deletions

View File

@@ -9,10 +9,10 @@
"no-duplicate-super": true,
"no-duplicate-switch-case": true,
"no-duplicate-variable": true,
// "no-for-in-array": true, // {{SQL CARBON EDIT}} @anthonydresser disable till we fix
"no-for-in-array": true,
"no-eval": true,
"no-redundant-jsdoc": true,
// "no-restricted-globals": true, // {{SQL CARBON EDIT}} @anthonydresser disable till we fix
"no-restricted-globals": true,
"no-sparse-arrays": true,
"no-string-throw": true,
"no-unsafe-finally": true,
@@ -170,6 +170,60 @@
],
// {{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,