Skip to content

Commit 725efde

Browse files
committed
lsp module linting fixed
1 parent df8db18 commit 725efde

File tree

5 files changed

+50
-50
lines changed

5 files changed

+50
-50
lines changed

vscode/src/lsp/clientPromise.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class ClientPromise {
2525
client!: Promise<NbLanguageClient>;
2626
activationPending!: boolean;
2727
initialPromiseResolved: boolean = false;
28-
28+
2929
public clientPromiseInitialization = (): void => {
3030
this.client = new Promise<NbLanguageClient>((clientOK, clientErr) => {
3131
this.setClient = [
@@ -44,7 +44,7 @@ export class ClientPromise {
4444
}
4545

4646
public stopClient = async (): Promise<void> => {
47-
if(globalVars.testAdapter){
47+
if (globalVars.testAdapter) {
4848
globalVars.testAdapter.dispose();
4949
globalVars.testAdapter = undefined;
5050
}
@@ -60,7 +60,7 @@ export class ClientPromise {
6060
LOGGER.log("Server activation requested repeatedly, ignoring...", LogLevel.WARN);
6161
return;
6262
}
63-
if(!nbProcessManager){
63+
if (!nbProcessManager) {
6464
LOGGER.log("Nbcode Process is null", LogLevel.ERROR);
6565
return;
6666
}

vscode/src/lsp/launchOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const extraLaunchOptions = [
5252
"--locale", l10n.nbLocaleCode(),
5353
"--start-java-language-server=listen-hash:0",
5454
"--start-java-debug-adapter-server=listen-hash:0"
55-
];
55+
];
5656

5757
const prepareUserConfigLaunchOptions = (): string[] => {
5858
const launchOptions: string[] = [];

vscode/src/lsp/nbProcessManager.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,25 @@ export class NbProcessManager {
7777
disconnect = () => {
7878
return this.process?.disconnect();
7979
}
80-
80+
8181
getProcess = () => {
8282
return this.process;
8383
}
8484

8585
getProcessId = () => {
8686
return this.process?.pid;
8787
}
88-
88+
8989
appendStdOut = (text: string) => {
90-
if(this.stdOutText != null) {
90+
if (this.stdOutText != null) {
9191
this.stdOutText += text;
9292
}
9393
}
9494

9595
appendStdErr = (text: string) => {
9696
this.stdErrText += text;
9797
}
98-
98+
9999
getStdOut = () => {
100100
return this.stdOutText
101101
}

vscode/src/lsp/protocol.ts

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ export interface ShowInputBoxParams {
101101
* An optional title of the input box.
102102
*/
103103
title?: string;
104-
/**
105-
* The text to display underneath the input box.
106-
*/
104+
/**
105+
* The text to display underneath the input box.
106+
*/
107107
prompt: string;
108108
/**
109109
* The value to prefill in the input box.
@@ -131,13 +131,13 @@ export interface ShowMutliStepInputParams {
131131
}
132132

133133
export interface InputCallbackParams {
134-
inputId : string;
134+
inputId: string;
135135
step: number;
136136
data: { [name: string]: readonly vscode.QuickPickItem[] | string };
137137
}
138138

139139
export interface StepInfo {
140-
totalSteps: number;
140+
totalSteps: number;
141141
stepId: string;
142142
}
143143

@@ -212,43 +212,43 @@ export namespace SaveDocumentsRequest {
212212
}
213213

214214
export interface NodeChangedParams {
215-
rootId : number;
216-
nodeId : number | null;
217-
types? : NodeChangeType[];
218-
properties? : String[];
215+
rootId: number;
216+
nodeId: number | null;
217+
types?: NodeChangeType[];
218+
properties?: String[];
219219
}
220220

221221
export interface CreateExplorerParams {
222-
explorerId : string;
222+
explorerId: string;
223223
}
224224

225225
export interface NodeOperationParams {
226-
nodeId : number;
226+
nodeId: number;
227227
}
228228

229229
export interface ProjectActionParams {
230-
action : string;
231-
configuration? : string;
232-
fallback? : boolean;
230+
action: string;
231+
configuration?: string;
232+
fallback?: boolean;
233233
}
234234

235235
export interface GetResourceParams {
236-
uri : vscode.Uri;
237-
acceptEncoding? : string[];
238-
acceptContent? : string[];
236+
uri: vscode.Uri;
237+
acceptEncoding?: string[];
238+
acceptContent?: string[];
239239
}
240240

241241
export interface ResourceData {
242-
contentType : string;
243-
encoding : string;
244-
content : string;
245-
contentSize : number;
242+
contentType: string;
243+
encoding: string;
244+
content: string;
245+
contentSize: number;
246246
}
247247

248248
export interface FindPathParams {
249-
rootNodeId : number;
250-
uri? : vscode.Uri;
251-
selectData? : any;
249+
rootNodeId: number;
250+
uri?: vscode.Uri;
251+
selectData?: any;
252252
}
253253

254254
export enum NodeChangeType {
@@ -271,31 +271,31 @@ export namespace NodeInfoNotification {
271271

272272
export namespace NodeInfoRequest {
273273
export const explorermanager = new ProtocolRequestType<CreateExplorerParams, never, Data, void, void>('nodes/explorermanager');
274-
export const info = new ProtocolRequestType<NodeOperationParams, Data, never,void, void>('nodes/info');
274+
export const info = new ProtocolRequestType<NodeOperationParams, Data, never, void, void>('nodes/info');
275275
export const children = new ProtocolRequestType<NodeOperationParams, number[], never, void, void>('nodes/children');
276276
export const destroy = new ProtocolRequestType<NodeOperationParams, boolean, never, void, void>('nodes/delete');
277277
export const collapsed = new ProtocolNotificationType<NodeOperationParams, void>('nodes/collapsed');
278278
export const getresource = new ProtocolRequestType<GetResourceParams, ResourceData, never, void, void>('nodes/getresource');
279279
export const findparams = new ProtocolRequestType<FindPathParams, number[], never, void, void>('nodes/findpath');
280280
export const changes = new ProtocolRequestType<NodeChangesParams, number, never, void, void>('nodes/changes');
281-
281+
282282
export interface IconDescriptor {
283-
baseUri : vscode.Uri;
283+
baseUri: vscode.Uri;
284284
}
285285
export interface Data {
286-
id : number; /* numeric ID of the node */
287-
name : string; /* Node.getName() */
288-
label : string; /* Node.getDisplayName() */
289-
tooltip? : string;
290-
description : string; /* Node.getShortDescription() */
291-
resourceUri? : string; /* external URL to file: resource */
292-
collapsibleState : vscode.TreeItemCollapsibleState;
293-
canDestroy : boolean; /* Node.canDestroy() */
294-
contextValue : string; /* Node.getCookies() */
295-
iconDescriptor? : IconDescriptor;
296-
iconUri : string | null;
297-
iconIndex : number;
298-
command? : string;
286+
id: number; /* numeric ID of the node */
287+
name: string; /* Node.getName() */
288+
label: string; /* Node.getDisplayName() */
289+
tooltip?: string;
290+
description: string; /* Node.getShortDescription() */
291+
resourceUri?: string; /* external URL to file: resource */
292+
collapsibleState: vscode.TreeItemCollapsibleState;
293+
canDestroy: boolean; /* Node.canDestroy() */
294+
contextValue: string; /* Node.getCookies() */
295+
iconDescriptor?: IconDescriptor;
296+
iconUri: string | null;
297+
iconIndex: number;
298+
command?: string;
299299
}
300300
};
301301

vscode/src/lsp/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ export const findNbcode = (extensionPath: string): string => {
6464
export const restartWithJDKLater = (time: number, notifyKill: boolean): void => {
6565
LOGGER.log(`Restart of ${extConstants.SERVER_NAME} requested in ${time / 1000} s.`);
6666
const nbProcessManager = globalVars.nbProcessManager;
67-
68-
setTimeout(() => globalVars.clientPromise.restartExtension(nbProcessManager, notifyKill), time);
67+
68+
setTimeout(() => globalVars.clientPromise.restartExtension(nbProcessManager, notifyKill), time);
6969
};

0 commit comments

Comments
 (0)