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 { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
import { Button } from 'sql/base/browser/ui/button/button';
import { append, $, addClass, addClasses } from 'vs/base/browser/dom';
@@ -51,7 +50,7 @@ export function getBooleanValueFromStringOrBoolean(value: any): boolean {
}
export function getCategoryDisplayName(categories: azdata.CategoryValue[], categoryName: string) {
var displayName: string;
let displayName: string;
categories.forEach(c => {
if (c.name === categoryName) {
displayName = c.displayName;
@@ -61,7 +60,7 @@ export function getCategoryDisplayName(categories: azdata.CategoryValue[], categ
}
export function getCategoryName(categories: azdata.CategoryValue[], categoryDisplayName: string) {
var categoryName: string;
let categoryName: string;
categories.forEach(c => {
if (c.displayName === categoryDisplayName) {
categoryName = c.name;

View File

@@ -136,7 +136,6 @@ export abstract class Modal extends Disposable implements IThemable {
* Constructor for modal
* @param _title Title of the modal, if undefined, the title section is not rendered
* @param _name Name of the modal, used for telemetry
* @param _partService
* @param options Modal options
*/
constructor(
@@ -474,7 +473,6 @@ export abstract class Modal extends Disposable implements IThemable {
/**
* Set the title of the modal
* @param title
*/
protected set title(title: string) {
if (this._title !== undefined) {
@@ -488,7 +486,6 @@ export abstract class Modal extends Disposable implements IThemable {
/**
* Set the icon title class name
* @param iconClassName
*/
protected set titleIconClassName(iconClassName: string) {
if (this._modalTitleIcon) {

View File

@@ -3,8 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as DialogHelper from './dialogHelper';
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
import { MessageType } from 'vs/base/browser/ui/inputbox/inputBox';
@@ -69,7 +67,7 @@ export function createOptionElement(option: azdata.ServiceOption, rowContainer:
}
export function getOptionValueAndCategoryValues(option: azdata.ServiceOption, options: { [optionName: string]: any }, possibleInputs: string[]): any {
var optionValue = option.defaultValue;
let optionValue = option.defaultValue;
if (options[option.name]) {
// if the value type is boolean, the option value can be either boolean or string
if (option.valueType === ServiceOptionType.boolean) {
@@ -106,10 +104,10 @@ export function getOptionValueAndCategoryValues(option: azdata.ServiceOption, op
export function validateInputs(optionsMap: { [optionName: string]: IOptionElement }): boolean {
let isValid = true;
let isFocused = false;
for (var optionName in optionsMap) {
var optionElement: IOptionElement = optionsMap[optionName];
var widget = optionElement.optionWidget;
var isInputBox = (optionElement.option.valueType === ServiceOptionType.string ||
for (let optionName in optionsMap) {
let optionElement: IOptionElement = optionsMap[optionName];
let widget = optionElement.optionWidget;
let isInputBox = (optionElement.option.valueType === ServiceOptionType.string ||
optionElement.option.valueType === ServiceOptionType.password ||
optionElement.option.valueType === ServiceOptionType.number);
@@ -127,8 +125,8 @@ export function validateInputs(optionsMap: { [optionName: string]: IOptionElemen
}
export function updateOptions(options: { [optionName: string]: any }, optionsMap: { [optionName: string]: IOptionElement }): void {
for (var optionName in optionsMap) {
var optionElement: IOptionElement = optionsMap[optionName];
for (let optionName in optionsMap) {
let optionElement: IOptionElement = optionsMap[optionName];
if (optionElement.optionWidget.value !== options[optionName]) {
if (!optionElement.optionWidget.value && options[optionName]) {
delete options[optionName];
@@ -149,9 +147,9 @@ export let trueInputValue: string = 'True';
export let falseInputValue: string = 'False';
export function findElement(container: HTMLElement, className: string): HTMLElement {
var elementBuilder = container;
let elementBuilder = container;
while (elementBuilder) {
var htmlElement = elementBuilder;
let htmlElement = elementBuilder;
if (htmlElement.className.startsWith(className)) {
break;
}
@@ -161,9 +159,9 @@ export function findElement(container: HTMLElement, className: string): HTMLElem
}
export function groupOptionsByCategory(options: azdata.ServiceOption[]): { [category: string]: azdata.ServiceOption[] } {
var connectionOptionsMap: { [category: string]: azdata.ServiceOption[] } = {};
let connectionOptionsMap: { [category: string]: azdata.ServiceOption[] } = {};
options.forEach(option => {
var groupName = option.groupName;
let groupName = option.groupName;
if (groupName === null || groupName === undefined) {
groupName = 'General';
}