Skip to content

Commit 85ea1b5

Browse files
authored
Fix linter issues (microsoft#6988)
* Fix linter issues * Call tslint with tsconfig file
1 parent 4a21f25 commit 85ea1b5

41 files changed

Lines changed: 72 additions & 54 deletions

File tree

Some content is hidden

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

build/ci/templates/build_compile_steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ steps:
5656
targets: "prePublishNonBundle"
5757
condition: and(succeeded(), eq(variables['build'], 'false'))
5858

59-
- bash: npx tslint ./src/**/*.ts{,x}
59+
- bash: npx tslint --project tsconfig.json
6060
displayName: "code hygiene"
6161
condition: and(succeeded(), eq(variables['build'], 'false'))
6262

src/client/activation/serviceRegistry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { LanguageServerPackageService } from './languageServer/languageServerPac
2828
import { LanguageServerManager } from './languageServer/manager';
2929
import { LanguageServerOutputChannel } from './languageServer/outputChannel';
3030
import { PlatformData } from './languageServer/platformData';
31-
import { IDownloadChannelRule, IExtensionActivationManager, IExtensionActivationService, IExtensionSingleActivationService, ILanguageClientFactory, ILanguageServer, ILanguageServerActivator, ILanguageServerAnalysisOptions, ILanguageServerCompatibilityService as ILanagueServerCompatibilityService, ILanguageServerDownloader, ILanguageServerExtension, ILanguageServerFolderService, ILanguageServerManager, ILanguageServerPackageService, IPlatformData, LanguageClientFactory, LanguageServerActivator, ILanguageServerOutputChannel } from './types';
31+
import { IDownloadChannelRule, IExtensionActivationManager, IExtensionActivationService, IExtensionSingleActivationService, ILanguageClientFactory, ILanguageServer, ILanguageServerActivator, ILanguageServerAnalysisOptions, ILanguageServerCompatibilityService as ILanagueServerCompatibilityService, ILanguageServerDownloader, ILanguageServerExtension, ILanguageServerFolderService, ILanguageServerManager, ILanguageServerOutputChannel, ILanguageServerPackageService, IPlatformData, LanguageClientFactory, LanguageServerActivator } from './types';
3232

3333
export function registerTypes(serviceManager: IServiceManager) {
3434
serviceManager.addSingleton<IExtensionActivationService>(IExtensionActivationService, LanguageServerExtensionActivationService);

src/client/common/application/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
MessageItem,
2525
MessageOptions,
2626
OpenDialogOptions,
27+
OutputChannel,
2728
Progress,
2829
ProgressOptions,
2930
QuickPick,
@@ -51,8 +52,7 @@ import {
5152
WorkspaceEdit,
5253
WorkspaceFolder,
5354
WorkspaceFolderPickOptions,
54-
WorkspaceFoldersChangeEvent,
55-
OutputChannel
55+
WorkspaceFoldersChangeEvent
5656
} from 'vscode';
5757
import * as vsls from 'vsls/vscode';
5858

src/client/common/featureDeprecationManager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export class FeatureDeprecationManager implements IFeatureDeprecationManager {
104104

105105
if (notify) {
106106
this.notifyDeprecation(deprecatedInfo)
107+
// tslint:disable-next-line: no-console
107108
.catch(ex => console.error('Python Extension: notifyDeprecation', ex));
108109
}
109110
}

src/client/common/net/socket/socketServer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export class SocketServer extends EventEmitter implements ISocketServer {
3535
const port = typeof options.port === 'number' ? options.port! : 0;
3636
const host = typeof options.host === 'string' ? options.host! : 'localhost';
3737
this.socketServer!.on('error', ex => {
38+
// tslint:disable-next-line: no-console
3839
console.error('Error in Socket Server', ex);
3940
const msg = `Failed to start the socket server. (Error: ${ex.message})`;
4041

src/client/common/utils/multiStepInput.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export interface IQuickPickParameters<T extends QuickPickItem> {
3333
shouldResume?(): Promise<boolean>;
3434
}
3535

36+
// tslint:disable-next-line: interface-name
3637
export interface InputBoxParameters {
3738
title: string;
3839
step?: number;

src/client/datascience/editor-integration/codeLensFactory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export class CodeLensFactory implements ICodeLensFactory, IInteractiveWindowList
9999
return fullCommandList;
100100
}
101101

102+
// tslint:disable-next-line: max-func-body-length
102103
private createCodeLens(document: TextDocument, cellRange: { range: Range; cell_type: string }, commandName: string, isFirst: boolean): CodeLens | undefined {
103104
// We only support specific commands
104105
// Be careful here. These arguments will be serialized during liveshare sessions

src/client/datascience/interactive-window/interactiveWindow.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,7 @@ export class InteractiveWindow extends WebViewHost<IInteractiveWindowMapping> im
727727
}
728728
}
729729

730+
// tslint:disable-next-line: max-func-body-length
730731
private async submitCode(code: string, file: string, line: number, id?: string, _editor?: TextEditor, debug?: boolean): Promise<boolean> {
731732
let result = true;
732733

src/client/debugger/debugAdapter/Common/debugStreamProvider.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ export class DebugStreamProvider implements IDebugStreamProvider {
3131
// start as a server, and print to console in VS Code debugger for extension developer.
3232
// Do not print this out when running unit tests.
3333
if (!isTestExecution()) {
34+
// tslint:disable-next-line: no-console
3435
console.error(`waiting for debug protocol on port ${debugPort}`);
3536
}
3637
this.server = createServer((socket) => {
3738
if (!isTestExecution()) {
39+
// tslint:disable-next-line: no-console
3840
console.error('>> accepted connection from client');
3941
}
4042
resolve(socket);

src/client/debugger/debugAdapter/DebugClients/LocalDebugClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export class LocalDebugClient extends DebugClient<LaunchRequestArguments> {
9090
// Only once connected do we know that the application has successfully launched.
9191
this.debugServer!.DebugClientConnected
9292
.then(resolve)
93+
// tslint:disable-next-line: no-console
9394
.catch(ex => console.error('Python Extension: debugServer.DebugClientConnected', ex));
9495
}
9596
}

0 commit comments

Comments
 (0)