Skip to content

Commit

Permalink
fix: fix github lint
Browse files Browse the repository at this point in the history
  • Loading branch information
akitaSummer committed May 20, 2023
1 parent bbfa34e commit edbe0a2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/js-runtime/src/runtime/global/webscoket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
})
.catch(err => {
this._readyState = WsState.CLOSED;

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const errorEv = new Event('error', { error: err, message: err.toString() });
this.dispatchEvent(errorEv);
Expand All @@ -127,6 +127,7 @@

LagonAsync.websocketClose(this.wsId, code, reason).catch(err => {
const errorEv = new Event('error', {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
error: err,
message: err.toString(),
Expand Down Expand Up @@ -165,6 +166,7 @@
}

const event = new Event('close', {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
wasClean: true,
});
Expand All @@ -175,6 +177,7 @@
this.serverHandleIdleTimeout();

const event = new Event('message', {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
data,
origin: this._url,
Expand All @@ -184,8 +187,8 @@
} catch (e: any) {
this._readyState = WsState.CLOSED;

// @ts-ignore
const errorEv = new Event('error', {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
message: e,
});
Expand Down Expand Up @@ -213,12 +216,14 @@
this._readyState = WsState.CLOSED;

const errEvent = new Event('error', {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
message: reason,
});
this.dispatchEvent(errEvent);

const event = new Event('close', {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
wasClean: false,
code: 1001,
Expand Down

0 comments on commit edbe0a2

Please sign in to comment.