Skip to content
This repository was archived by the owner on Dec 6, 2022. It is now read-only.

Commit dd0c948

Browse files
committed
Add semicolon tslint rule
1 parent a5611dc commit dd0c948

5 files changed

Lines changed: 11 additions & 10 deletions

File tree

src/chromeDebugAdapter.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
213213
} else { // If for any reason that changes, we submit the entire product as-is
214214
properties['Versions.Target.Product'] = response.product;
215215
}
216-
return properties
216+
return properties;
217217
});
218218

219219
// Send the versions information as it's own event so we can easily backfill other events in the user session if needed
@@ -392,7 +392,7 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
392392
frameId: args.frameId,
393393
format: args.format,
394394
context: 'repl'
395-
}
395+
};
396396

397397
const evaluateResult = await this.evaluate(evaluateEventArgs);
398398
return {
@@ -470,7 +470,7 @@ function findExecutable(program: string): string | undefined {
470470
}
471471

472472
async function findNewlyLaunchedChromeProcess(semaphoreFile: string): Promise<string> {
473-
const regexPattern = /processid\s+=\s+(\d+)\s*;/i
473+
const regexPattern = /processid\s+=\s+(\d+)\s*;/i;
474474
let lastAccessFileContent: string;
475475
for (let i = 0 ; i < 25; i++) {
476476
if (fs.existsSync(semaphoreFile)) {
@@ -480,7 +480,7 @@ async function findNewlyLaunchedChromeProcess(semaphoreFile: string): Promise<st
480480

481481
const lines = lastAccessFileContent.split('\n');
482482

483-
const matchedLines = (lines || []).filter(line => line.match(regexPattern))
483+
const matchedLines = (lines || []).filter(line => line.match(regexPattern));
484484
if (matchedLines.length > 1) {
485485
throw new Error(`Unexpected semaphore file format ${lines}`);
486486
}
@@ -493,7 +493,7 @@ async function findNewlyLaunchedChromeProcess(semaphoreFile: string): Promise<st
493493
}
494494
await new Promise<void>((resolve) => {
495495
setTimeout(resolve, 200);
496-
})
496+
});
497497
}
498498

499499
const error = new Error(`Cannot acquire Chrome process id`);

test/chromeDebugAdapter.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ suite('ChromeDebugAdapter', () => {
8181
// Hacky mock cleanup
8282
require('child_process').fork = originalFork;
8383
require('fs').statSync = originalStatSync;
84-
})
84+
});
8585

8686
test('launches with minimal correct args', () => {
8787
let spawnCalled = false;
@@ -175,5 +175,5 @@ suite('ChromeDebugAdapter', () => {
175175
resolveWebRootPattern(WEBROOT, overrides),
176176
expOverrides);
177177
});
178-
})
178+
});
179179
});

test/debugProtocolMocks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface IMockChromeConnectionAPI {
2525
function getBrowserStubs() {
2626
return {
2727
getVersion() { return Promise.resolve({}); }
28-
}
28+
};
2929
}
3030

3131
// See https://github.com/florinn/typemoq/issues/20
@@ -81,7 +81,7 @@ function getPageStubs() {
8181
return {
8282
enable() { },
8383
onFrameNavigated() { }
84-
}
84+
};
8585
}
8686

8787
export function getMockChromeConnectionApi(): IMockChromeConnectionAPI {

test/int/breakOnLoad.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function runCommonTests(breakOnLoadStrategy: string) {
177177
source: { path: script2Path }
178178
});
179179
await dc.continueRequest();
180-
await dc.assertStoppedLocation('breakpoint', { path: script2Path, line: bpLine, column: bpCol })
180+
await dc.assertStoppedLocation('breakpoint', { path: script2Path, line: bpLine, column: bpCol });
181181
});
182182
});
183183
}

tslint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"avoid-escape"
6969
],
7070
"radix": true,
71+
"semicolon": true,
7172
"switch-default": true,
7273
"trailing-comma": [
7374
false,

0 commit comments

Comments
 (0)