Skip to content

Commit 111f0a9

Browse files
ejsmithniemyjski
authored andcommitted
Fix linting issues
1 parent 8fd2a71 commit 111f0a9

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

packages/browser/src/plugins/BrowserGlobalHandlerPlugin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ export class BrowserGlobalHandlerPlugin implements IEventPlugin {
2020
this._client = context.client;
2121

2222
// TODO: Discus if we want to unwire this handler in suspend?
23-
window.addEventListener("error", async event => {
24-
await this._client.submitUnhandledException(this.getError(event), "onerror");
23+
window.addEventListener("error", event => {
24+
void this._client.submitUnhandledException(this.getError(event), "onerror");
2525
});
2626

27-
window.addEventListener("unhandledrejection", async event => {
27+
window.addEventListener("unhandledrejection", event => {
2828
let error = event.reason;
2929
try {
3030
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
@@ -35,7 +35,7 @@ export class BrowserGlobalHandlerPlugin implements IEventPlugin {
3535
// eslint-disable-next-line no-empty
3636
} catch (ex) { }
3737

38-
await this._client.submitUnhandledException(error, "onunhandledrejection");
38+
void this._client.submitUnhandledException(error, "onunhandledrejection");
3939
});
4040

4141

packages/browser/src/plugins/BrowserLifeCyclePlugin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ export class BrowserLifeCyclePlugin implements IEventPlugin {
1717

1818
this._client = context.client;
1919

20-
globalThis.addEventListener("beforeunload", async () => await this._client.suspend());
21-
document.addEventListener("visibilitychange", async () => {
20+
globalThis.addEventListener("beforeunload", () => void this._client.suspend());
21+
document.addEventListener("visibilitychange", () => {
2222
if (document.visibilityState === 'visible') {
23-
await this._client.startup()
23+
void this._client.startup()
2424
} else {
25-
await this._client.suspend()
25+
void this._client.suspend()
2626
}
2727
});
2828

packages/core/src/plugins/default/DuplicateCheckerPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class DuplicateCheckerPlugin implements IEventPlugin {
5050
return hash;
5151
}
5252

53-
const error = context.event.data![KnownEventDataKeys.Error];
53+
const error = context.event.data[KnownEventDataKeys.Error];
5454
const hashCode = calculateHashCode(error);
5555
if (hashCode) {
5656
const count = context.event.count || 1;

packages/core/src/plugins/default/EventExclusionPlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ export class EventExclusionPlugin implements IEventPlugin {
1414

1515
if (ev.type === "log") {
1616
const minLogLevel = this.getMinLogLevel(settings, ev.source);
17-
const logLevel = this.getLogLevel(ev.data![KnownEventDataKeys.Level]);
17+
const logLevel = this.getLogLevel(ev.data[KnownEventDataKeys.Level]);
1818

1919
if (logLevel !== -1 && (logLevel === 6 || logLevel < minLogLevel)) {
2020
log.info("Cancelling log event due to minimum log level.");
2121
context.cancelled = true;
2222
}
2323
} else if (ev.type === "error") {
24-
let error = ev.data![KnownEventDataKeys.Error];
24+
let error = ev.data[KnownEventDataKeys.Error];
2525
while (!context.cancelled && error) {
2626
if (this.getTypeAndSourceSetting(settings, ev.type, error.type, true) === false) {
2727
log.info(`Cancelling error from excluded exception type: ${error.type}`);

packages/core/src/plugins/default/HeartbeatPlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ export class HeartbeatPlugin implements IEventPlugin {
3030
clearInterval(this._intervalId);
3131
this._intervalId = 0;
3232

33-
const user = context.event.data![KnownEventDataKeys.UserInfo];
33+
const user = context.event.data[KnownEventDataKeys.UserInfo];
3434
if (user?.identity) {
3535
this._intervalId = setInterval(
36-
async () => await context.client.submitSessionHeartbeat(user.identity),
36+
() => void context.client.submitSessionHeartbeat(user.identity),
3737
this._interval,
3838
);
3939
}

packages/core/src/plugins/default/SubmissionMethodPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export class SubmissionMethodPlugin implements IEventPlugin {
99
public run(context: EventPluginContext): Promise<void> {
1010
const submissionMethod = context.contextData.getSubmissionMethod();
1111
if (submissionMethod) {
12-
context.event.data![KnownEventDataKeys.SubmissionMethod] = submissionMethod;
12+
context.event.data[KnownEventDataKeys.SubmissionMethod] = submissionMethod;
1313
}
1414

1515
return Promise.resolve();

packages/node/test/storage/NodeFileStorage.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { IStorage } from "@exceptionless/core";
1+
import { IStorage, LocalStorage } from "@exceptionless/core";
22
import { describeStorage } from "../../../core/test/storage/StorageTestBase.js";
3-
import { NodeFileStorage } from "../../src/storage/NodeFileStorage.js";
3+
import { LocalStorage as LocalStoragePolyfill } from "node-localstorage";
44

55
import {
66
mkdirSync,
@@ -15,7 +15,7 @@ function resetStorageDirectory() {
1515
const directory: string = "./test/data";
1616
describeStorage(
1717
"NodeFileStorage",
18-
(): IStorage => new NodeFileStorage(directory),
18+
(): IStorage => new LocalStorage(undefined, new LocalStoragePolyfill(directory)),
1919
resetStorageDirectory,
2020
resetStorageDirectory
2121
);

0 commit comments

Comments
 (0)