Skip to content

Commit 6eacb27

Browse files
Cleanup (#17032)
1 parent e5cda40 commit 6eacb27

File tree

90 files changed

+8550
-227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+8550
-227
lines changed

package-lock.json

Lines changed: 8401 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"systemjs": "0.19.40",
101101
"systemjs-builder": "^0.15.32",
102102
"systemjs-plugin-json": "^0.2.0",
103-
"tslint": "^5.16.0",
103+
"tslint": "^6.1.3",
104104
"tslint-microsoft-contrib": "^5.2.0",
105105
"typemoq": "^1.7.0",
106106
"typescript": "^3.5.3",

src/azure/accountService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
* ------------------------------------------------------------------------------------------ */
55

6-
import vscode = require('vscode');
7-
import { IAccount, IAccountKey, IAccountDisplayInfo } from '../models/contracts/azure/accountInterfaces';
6+
import * as vscode from 'vscode';
7+
import { IAccount, IAccountKey } from '../models/contracts/azure/accountInterfaces';
88
import SqlToolsServiceClient from '../languageservice/serviceclient';
99
import { IAzureSession } from '../models/interfaces';
10-
import Constants = require('../constants/constants');
10+
import * as Constants from '../constants/constants';
1111
import VscodeWrapper from '../controllers/vscodeWrapper';
1212
import { AzureController } from './azureController';
1313
import { AccountStore } from './accountStore';

src/azure/accountStore.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
'use strict';
65

7-
import vscode = require('vscode');
6+
import * as vscode from 'vscode';
87
import { IAccount } from '../models/contracts/azure/accountInterfaces';
9-
import Constants = require('../constants/constants');
8+
import * as Constants from '../constants/constants';
109

1110
export class AccountStore {
1211
constructor(

src/azure/azureAuthRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import LocalizedConstants = require('../constants/localizedConstants');
6+
import * as LocalizedConstants from '../constants/localizedConstants';
77
import { AuthRequest, AzureAuthError } from 'ads-adal-library';
88
import { SimpleWebServer } from './simpleWebServer';
99
import * as crypto from 'crypto';

src/azure/azureController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import vscode = require('vscode');
2-
import LocalizedConstants = require('../constants/localizedConstants');
1+
import * as vscode from 'vscode';
2+
import * as LocalizedConstants from '../constants/localizedConstants';
33
import { AzureStringLookup } from '../azure/azureStringLookup';
44
import { AzureUserInteraction } from '../azure/azureUserInteraction';
55
import { AzureErrorLookup } from '../azure/azureErrorLookup';

src/azure/cacheService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { CachingProvider } from 'ads-adal-library';
1111

1212
function getSystemKeytar(): Keytar | undefined | null {
1313
try {
14+
// tslint:disable-next-line:no-require-imports
1415
return require('keytar');
1516
} catch (err) {
1617
console.log(err);

src/configurations/config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
const fs = require('fs');
6+
import * as fs from 'fs';
87
import * as path from 'path';
98
import * as Constants from '../constants/constants';
109
import {IConfig} from '../languageservice/interfaces';
@@ -91,7 +90,7 @@ export default class Config implements IConfig {
9190

9291
static loadConfig(): any {
9392
let configContent = fs.readFileSync(path.join(__dirname, '../config.json'));
94-
return JSON.parse(configContent);
93+
return JSON.parse(configContent.toString());
9594
}
9695
}
9796

src/configurations/extConfig.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
86
import Config from './config';
97
import { workspace, WorkspaceConfiguration } from 'vscode';
108
import * as Constants from '../constants/constants';

src/connectionconfig/connectionconfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
'use strict';
5+
66
import * as Constants from '../constants/constants';
77
import * as LocalizedConstants from '../constants/localizedConstants';
88
import * as Utils from '../models/utils';

src/connectionconfig/iconnectionconfig.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
'use strict';
65

76
import { IConnectionProfile } from '../models/interfaces';
87

src/controllers/connectionManager.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
import vscode = require('vscode');
6+
import * as vscode from 'vscode';
87
import { ConnectionCredentials } from '../models/connectionCredentials';
9-
import Constants = require('../constants/constants');
10-
import LocalizedConstants = require('../constants/localizedConstants');
8+
import * as Constants from '../constants/constants';
9+
import * as LocalizedConstants from '../constants/localizedConstants';
1110
import * as ConnectionContracts from '../models/contracts/connection';
1211
import * as LanguageServiceContracts from '../models/contracts/languageService';
13-
import Utils = require('../models/utils');
12+
import * as Utils from '../models/utils';
1413
import { ConnectionStore } from '../models/connectionStore';
1514
import { ConnectionUI } from '../views/connectionUI';
1615
import StatusView from '../views/statusView';

src/controllers/mainController.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
76
import * as events from 'events';
8-
import vscode = require('vscode');
9-
import Constants = require('../constants/constants');
10-
import LocalizedConstants = require('../constants/localizedConstants');
11-
import Utils = require('../models/utils');
7+
import * as vscode from 'vscode';
8+
import * as Constants from '../constants/constants';
9+
import * as LocalizedConstants from '../constants/localizedConstants';
10+
import * as Utils from '../models/utils';
1211
import { SqlOutputContentProvider } from '../models/sqlOutputContentProvider';
1312
import { RebuildIntelliSenseNotification, CompletionExtensionParams, CompletionExtLoadRequest } from '../models/contracts/languageService';
1413
import StatusView from '../views/statusView';
@@ -20,7 +19,7 @@ import VscodeWrapper from './vscodeWrapper';
2019
import UntitledSqlDocumentService from './untitledSqlDocumentService';
2120
import { ISelectionData, IConnectionProfile } from './../models/interfaces';
2221
import * as path from 'path';
23-
import fs = require('fs');
22+
import * as fs from 'fs';
2423
import { ObjectExplorerProvider } from '../objectExplorer/objectExplorerProvider';
2524
import { ScriptingService } from '../scripting/scriptingService';
2625
import { TreeNodeInfo } from '../objectExplorer/treeNodeInfo';

src/controllers/queryRunner.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
76
import { EventEmitter } from 'events';
87

98
import * as vscode from 'vscode';
@@ -25,8 +24,8 @@ import { BatchSummary, QueryExecuteParams, QueryExecuteRequest,
2524
import { QueryDisposeParams, QueryDisposeRequest } from '../models/contracts/queryDispose';
2625
import { QueryCancelParams, QueryCancelResult, QueryCancelRequest } from '../models/contracts/queryCancel';
2726
import { ISlickRange, ISelectionData, IResultMessage } from '../models/interfaces';
28-
import Constants = require('../constants/constants');
29-
import LocalizedConstants = require('../constants/localizedConstants');
27+
import * as Constants from '../constants/constants';
28+
import * as LocalizedConstants from '../constants/localizedConstants';
3029
import * as Utils from './../models/utils';
3130
import * as os from 'os';
3231
import { Deferred } from '../protocol';

src/controllers/vscodeWrapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import vscode = require('vscode');
6+
import * as vscode from 'vscode';
77

88
import { AzureLoginStatus } from '../models/interfaces';
99
import * as Constants from './../constants/constants';

src/credentialstore/credentialstore.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
'use strict';
65

76
import * as Contracts from '../models/contracts';
87
import { ICredentialStore } from './icredentialstore';

src/credentialstore/icredentialstore.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
'use strict';
6-
75

86
// This code is originally from https://github.com/microsoft/vsts-vscode
97
// License: https://github.com/Microsoft/vsts-vscode/blob/master/LICENSE.txt

src/extension.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
76
import * as vscode from 'vscode';
87
import * as vscodeMssql from 'vscode-mssql';
9-
import Constants = require('./constants/constants');
8+
import * as Constants from './constants/constants';
109
import * as LocalizedConstants from './constants/localizedConstants';
1110
import MainController from './controllers/mainController';
1211
import VscodeWrapper from './controllers/vscodeWrapper';

src/firewall/firewallService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { CreateFirewallRuleRequest, HandleFirewallRuleRequest,
77
IHandleFirewallRuleParams, IHandleFirewallRuleResponse,
88
ICreateFirewallRuleResponse,
99
ICreateFirewallRuleParams} from '../models/contracts/firewall/firewallRequest';
10-
import Constants = require('../constants/constants');
10+
import * as Constants from '../constants/constants';
1111
import { AccountService } from '../azure/accountService';
1212

1313
export class FirewallService {

src/languageservice/decompressProvider.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
86
import {IDecompressProvider, IPackage} from './interfaces';
97
import {ILogger} from '../models/interfaces';
108
import * as DecompressTar from 'tar';

src/languageservice/httpClient.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
76
import {IPackage, IStatusView, PackageError, IHttpClient} from './interfaces';
87
import {ILogger} from '../models/interfaces';
98
import {parse as parseUrl, Url} from 'url';
109
import * as https from 'https';
1110
import * as http from 'http';
1211
import {getProxyAgent, isBoolean} from './proxy';
13-
14-
let fs = require('fs');
12+
import * as fs from 'fs';
1513

1614
/*
1715
* Http client class to handle downloading files using http or https urls

src/languageservice/proxy.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
86
import { Url, parse as parseUrl } from 'url';
9-
let httpProxyAgent = require('http-proxy-agent');
10-
let httpsProxyAgent = require('https-proxy-agent');
7+
import * as httpProxyAgent from 'http-proxy-agent';
8+
import * as httpsProxyAgent from 'https-proxy-agent';
119

1210
function getSystemProxyURL(requestURL: Url): string {
1311
if (requestURL.protocol === 'http:') {

src/languageservice/server.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
86
import * as path from 'path';
97
import {Runtime} from '../models/platform';
108
import ServiceDownloadProvider from './serviceDownloadProvider';
119
import {IConfig, IStatusView} from './interfaces';
12-
let fs = require('fs-extra-promise');
10+
import * as fs from 'fs-extra-promise';
1311

1412

1513
/*

src/languageservice/serverStatus.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
86
import {IStatusView} from './interfaces';
9-
import vscode = require('vscode');
10-
import Constants = require('../constants/constants');
7+
import * as vscode from 'vscode';
8+
import * as Constants from '../constants/constants';
119

1210
/*
1311
* The status class which includes the service initialization result.

src/languageservice/serviceDownloadProvider.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
76
import * as path from 'path';
87
import * as tmp from 'tmp';
98
import {Runtime, getRuntimeDisplayName} from '../models/platform';
109
import {IConfig, IStatusView, IPackage, PackageError, IHttpClient, IDecompressProvider} from './interfaces';
1110
import {ILogger} from '../models/interfaces';
12-
import Constants = require('../constants/constants');
13-
14-
let fse = require('fs-extra');
11+
import * as Constants from '../constants/constants';
12+
import * as fse from 'fs-extra';
1513

1614
/*
1715
* Service Download Provider class which handles downloading the SQL Tools service.

src/languageservice/serviceclient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
* ------------------------------------------------------------------------------------------ */
5-
'use strict';
5+
66
import * as vscode from 'vscode';
77
import {
88
LanguageClient, LanguageClientOptions, ServerOptions,
@@ -14,7 +14,7 @@ import VscodeWrapper from '../controllers/vscodeWrapper';
1414
import * as Utils from '../models/utils';
1515
import { VersionRequest } from '../models/contracts';
1616
import { Logger } from '../models/logger';
17-
import Constants = require('../constants/constants');
17+
import * as Constants from '../constants/constants';
1818
import ServerProvider from './server';
1919
import ServiceDownloadProvider from './serviceDownloadProvider';
2020
import DecompressProvider from './decompressProvider';

src/models/connectionCredentials.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
import LocalizedConstants = require('../constants/localizedConstants');
6+
import * as LocalizedConstants from '../constants/localizedConstants';
87
import { ConnectionDetails } from './contracts/connection';
98
import { IConnectionProfile, AuthenticationTypes } from './interfaces';
109
import { ConnectionStore } from './connectionStore';

src/models/connectionInfo.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
import Constants = require('../constants/constants');
8-
import LocalizedConstants = require('../constants/localizedConstants');
9-
import Interfaces = require('./interfaces');
6+
import * as Constants from '../constants/constants';
7+
import * as LocalizedConstants from '../constants/localizedConstants';
8+
import * as Interfaces from './interfaces';
109
import { IConnectionProfile } from '../models/interfaces';
1110
import * as ConnectionContracts from '../models/contracts/connection';
1211
import * as Utils from './utils';

src/models/connectionProfile.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
import vscode = require('vscode');
8-
import LocalizedConstants = require('../constants/localizedConstants');
6+
import * as vscode from 'vscode';
7+
import * as LocalizedConstants from '../constants/localizedConstants';
98
import { IConnectionProfile, AuthenticationTypes } from './interfaces';
109
import { ConnectionCredentials } from './connectionCredentials';
1110
import { QuestionTypes, IQuestion, IPrompter, INameValueChoice } from '../prompts/question';

src/models/connectionStore.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
import vscode = require('vscode');
8-
import Constants = require('../constants/constants');
9-
import LocalizedConstants = require('../constants/localizedConstants');
10-
import ConnInfo = require('./connectionInfo');
11-
import Utils = require('../models/utils');
6+
import * as vscode from 'vscode';
7+
import * as Constants from '../constants/constants';
8+
import * as LocalizedConstants from '../constants/localizedConstants';
9+
import * as ConnInfo from './connectionInfo';
10+
import * as Utils from '../models/utils';
1211
import ValidationException from '../utils/validationException';
1312
import { ConnectionCredentials } from '../models/connectionCredentials';
1413
import { IConnectionProfile, IConnectionCredentialsQuickPickItem, CredentialsQuickPickItemType, AuthenticationTypes } from '../models/interfaces';

src/models/contracts/azure/accountInterfaces.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Licensed under the Source EULA. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
86
/**
97
* Represents display information for an account.
108
*/

src/models/contracts/firewall/firewallRequest.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Licensed under the Source EULA. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
86
import { RequestType } from 'vscode-languageclient';
97
import { IAccount } from '../azure/accountInterfaces';
108

0 commit comments

Comments
 (0)