Skip to content

Commit 56138b6

Browse files
Eskibearfbricon
authored andcommitted
Fix tslint
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
1 parent 0783074 commit 56138b6

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ install:
3131
- ls -ll java-*vsix
3232

3333
script:
34+
- npm run tslint
3435
- npm test --silent

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,8 @@
510510
"pretest": "npm run compile",
511511
"test": "node ./out/test/runtest.js",
512512
"build-server": "./node_modules/.bin/gulp build_server",
513-
"watch-server": "./node_modules/.bin/gulp watch_server"
513+
"watch-server": "./node_modules/.bin/gulp watch_server",
514+
"tslint": "tslint -p ."
514515
},
515516
"devDependencies": {
516517
"@types/glob": "5.0.30",

src/commands.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export namespace Commands {
7979
*/
8080
export const OPEN_CLIENT_LOG = 'java.open.clientLog';
8181

82-
8382
/**
8483
* Open Java formatter settings
8584
*/
@@ -152,4 +151,4 @@ export namespace Commands {
152151
* Rename Command.
153152
*/
154153
export const RENAME_COMMAND = 'java.action.rename';
155-
}
154+
}

src/extension.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,7 @@ function openClientLogFile(logFile: string): Thenable<boolean> {
516516
});
517517
}
518518

519-
520-
function openLogFile(logFile, openingFailureWarning:string ): Thenable<boolean> {
519+
function openLogFile(logFile, openingFailureWarning: string): Thenable<boolean> {
521520
if (!fs.existsSync(logFile)) {
522521
return window.showWarningMessage('No log file available').then(() => false);
523522
}

src/sourceAction.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function registerGenerateAccessorsCommand(languageClient: LanguageClient, contex
223223
}
224224
return {
225225
label: accessor.fieldName,
226-
description: (accessor.isStatic?'static ':'')+ description.join(', '),
226+
description: (accessor.isStatic ? 'static ' : '')+ description.join(', '),
227227
originalField: accessor,
228228
};
229229
});
@@ -323,12 +323,12 @@ function registerGenerateDelegateMethodsCommand(languageClient: LanguageClient,
323323
selectedDelegateField = selectedFieldItem.originalField;
324324
}
325325

326-
let delegateEntryItems = selectedDelegateField.delegateMethods.map(delegateMethod => {
326+
const delegateEntryItems = selectedDelegateField.delegateMethods.map(delegateMethod => {
327327
return {
328328
label: `${selectedDelegateField.field.name}.${delegateMethod.name}(${delegateMethod.parameters.join(',')})`,
329329
originalField: selectedDelegateField.field,
330330
originalMethod: delegateMethod,
331-
}
331+
};
332332
});
333333

334334
if (!delegateEntryItems.length) {
@@ -356,4 +356,4 @@ function registerGenerateDelegateMethodsCommand(languageClient: LanguageClient,
356356
});
357357
applyWorkspaceEdit(workspaceEdit, languageClient);
358358
}));
359-
}
359+
}

0 commit comments

Comments
 (0)