mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
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:
@@ -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 {
|
||||
|
||||
@@ -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 ///////////////////////////////////////////////////////////
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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++;
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 }>;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user