Renable Strict TSLint (#5018)

* removes more builder references

* remove builder from profiler

* formatting

* fix profiler dailog

* remove builder from oatuhdialog

* remove the rest of builder references

* formatting

* add more strict null checks to base

* enable strict tslint rules

* fix formatting

* fix compile error

* fix the rest of the hygeny issues and add pipeline step

* fix pipeline files
This commit is contained in:
Anthony Dresser
2019-04-18 00:34:53 -07:00
committed by GitHub
parent b852f032d3
commit ddd89fc52a
431 changed files with 3147 additions and 3789 deletions

View File

@@ -3,7 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { ITree } from 'vs/base/parts/tree/browser/tree';
import treedefaults = require('vs/base/parts/tree/browser/treeDefaults');
import { IMouseEvent } from 'vs/base/browser/mouseEvent';
@@ -21,12 +20,12 @@ export class FileBrowserController extends treedefaults.DefaultController {
protected onLeftClick(tree: ITree, element: any, event: IMouseEvent, origin: string = 'mouse'): boolean {
// In file browser, double clicking an element calls tree.dispose(). There should not be any tree events after selection.
if (event.detail === 2) {
var payload = { origin: origin, originalEvent: event };
let payload = { origin: origin, originalEvent: event };
if (tree.getInput() === element) {
tree.clearFocus(payload);
tree.clearSelection(payload);
} else {
var isMouseDown = event && event.browserEvent && event.browserEvent.type === 'mousedown';
let isMouseDown = event && event.browserEvent && event.browserEvent.type === 'mousedown';
if (!isMouseDown) {
event.preventDefault(); // we cannot preventDefault onMouseDown because this would break DND otherwise
}
@@ -41,16 +40,16 @@ export class FileBrowserController extends treedefaults.DefaultController {
}
protected onEnter(tree: ITree, event: IKeyboardEvent): boolean {
var payload = { origin: 'keyboard', originalEvent: event };
let payload = { origin: 'keyboard', originalEvent: event };
if (tree.getHighlight()) {
return false;
}
var focus = tree.getFocus();
let focus = tree.getFocus();
if (focus) {
// In file browser, pressing enter key on an element will close dialog and call tree.dispose(). There should not be any tree events after selection.
tree.setSelection([focus], payload);
}
return true;
}
}
}

View File

@@ -3,8 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IFileBrowserService } from 'sql/platform/fileBrowser/common/interfaces';
import { FileNode } from 'sql/workbench/services/fileBrowser/common/fileNode';
import { ITree, IDataSource } from 'vs/base/parts/tree/browser/tree';
@@ -47,7 +45,7 @@ export class FileBrowserDataSource implements IDataSource {
public getChildren(tree: ITree, element: any): Promise<any> {
return new Promise<any>((resolve) => {
if (element instanceof FileNode) {
var node = <FileNode>element;
let node = <FileNode>element;
if (node.children) {
resolve(node.children);
} else {
@@ -69,4 +67,4 @@ export class FileBrowserDataSource implements IDataSource {
public getParent(tree: ITree, element: any): Promise<any> {
return Promise.resolve(null);
}
}
}

View File

@@ -3,7 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { FileNode } from 'sql/workbench/services/fileBrowser/common/fileNode';
import { ITree, IRenderer } from 'vs/base/parts/tree/browser/tree';
import { FileKind } from 'vs/platform/files/common/files';
@@ -61,8 +60,8 @@ export class FileBrowserRenderer implements IRenderer {
templateData.label.element.style.display = 'flex';
const extraClasses = ['explorer-item'];
var fileuri = URI.file(element.fullPath);
var filekind;
let fileuri = URI.file(element.fullPath);
let filekind;
if (element.parent === null) {
filekind = FileKind.ROOT_FOLDER;
} else if (element.isFile === false) {