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,17 +3,12 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as vscode from 'vscode';
import * as azdata from 'azdata';
/**
* Wrapper class to act as a facade over VSCode and Data APIs and allow us to test / mock callbacks into
* this API from our code
*
* @export
* @class ApiWrapper
*/
export class ApiWrapper {
public createOutputChannel(name: string): vscode.OutputChannel {

View File

@@ -1,3 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
// CONFIG VALUES ///////////////////////////////////////////////////////////

View File

@@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// This code is originally from https://github.com/Microsoft/vscode/blob/master/src/vs/base/node/ports.ts
'use strict';
import * as net from 'net';
export class StrictPortFindOptions {
@@ -36,9 +34,9 @@ export async function strictFindFreePort(options: StrictPortFindOptions): Promis
/**
* Get a random integer between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random integer
* @param min - min number
* @param max - max number
* @return a random integer
*/
function getRandomInt(min, max): number {
return Math.floor(Math.random() * (max - min + 1) + min);

View File

@@ -1,4 +1,7 @@
'use strict';
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as childProcess from 'child_process';
import * as fs from 'fs-extra';
@@ -108,7 +111,7 @@ export function getOSPlatform(): Platform {
}
export function getOSPlatformId(): string {
var platformId = undefined;
let platformId = undefined;
switch (process.platform) {
case 'win32':
platformId = 'win-x64';

View File

@@ -23,7 +23,7 @@ const msgSampleCodeDataFrame = localize('msgSampleCodeDataFrame', "This sample c
const noNotebookVisible = localize('noNotebookVisible', "No notebook editor is active");
let controller: JupyterController;
type ChooseCellType = { label: string, id: CellType};
type ChooseCellType = { label: string, id: CellType };
export async function activate(extensionContext: vscode.ExtensionContext): Promise<IExtensionApi> {
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.new', (context?: azdata.ConnectedContext) => {

View File

@@ -31,9 +31,9 @@ export function jsIndexToCharIndex(jsIdx: number, text: string): number {
for (let i = 0; i + 1 < text.length && i < jsIdx; i++) {
let charCode = text.charCodeAt(i);
// check for surrogate pair
if (charCode >= 0xd800 && charCode <= 0xdbff) {
if (charCode >= 0xD800 && charCode <= 0xDBFF) {
let nextCharCode = text.charCodeAt(i + 1);
if (nextCharCode >= 0xdc00 && nextCharCode <= 0xdfff) {
if (nextCharCode >= 0xDC00 && nextCharCode <= 0xDFFF) {
charIdx--;
i++;
}
@@ -60,9 +60,9 @@ export function charCountToJsCountDiff(text: string): number {
for (let i = 0; i + 1 < text.length; i++) {
let charCode = text.charCodeAt(i);
// check for surrogate pair
if (charCode >= 0xd800 && charCode <= 0xdbff) {
if (charCode >= 0xD800 && charCode <= 0xDBFF) {
let nextCharCode = text.charCodeAt(i + 1);
if (nextCharCode >= 0xdc00 && nextCharCode <= 0xdfff) {
if (nextCharCode >= 0xDC00 && nextCharCode <= 0xDFFF) {
diff++;
i++;
}

View File

@@ -1,11 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { nb } from 'azdata';
import { Kernel, KernelMessage } from '@jupyterlab/services';

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 UUID from 'vscode-languageclient/lib/utils/uuid';
import * as vscode from 'vscode';
import * as path from 'path';
@@ -224,7 +222,6 @@ export class PerNotebookServerInstance implements IServerInstance {
/**
* Starts a Jupyter instance using the provided a start command. Server is determined to have
* started when the log message with URL to connect to is emitted.
* @returns {Promise<void>}
*/
protected async startInternal(): Promise<void> {
if (this.isStarted) {

View File

@@ -1,5 +1,7 @@
'use strict';
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import vscode = require('vscode');
@@ -56,7 +58,7 @@ export interface IPrompter {
/**
* Prompts for multiple questions
*
* @returns {[questionId: string]: T} Map of question IDs to results, or undefined if
* @returns Map of question IDs to results, or undefined if
* the user canceled the question session
*/
prompt<T>(questions: IQuestion[], ignoreFocusOut?: boolean): Promise<{ [questionId: string]: any }>;

View File

@@ -1,4 +1,3 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.

View File

@@ -1,3 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';

View File

@@ -1,4 +1,3 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.