Skip to content

Commit 51baaff

Browse files
committed
style: run linter
1 parent ffe47d8 commit 51baaff

File tree

8 files changed

+10
-18
lines changed

8 files changed

+10
-18
lines changed

__test__/faker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import "webrtc-adapter";
44
const fakeGlobals = {
55
WebSocket,
66
MediaStream: class MediaStream {
7-
private _tracks: MediaStreamTrack[] = [];
7+
private readonly _tracks: MediaStreamTrack[] = [];
88

99
constructor(tracks?: MediaStreamTrack[]) {
1010
if (tracks) {

e2e/datachannel/serialization_cbor.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import P from "./serialization.page.js";
22
import { serializationTest } from "./serializationTest.js";
3-
import { browser, $, $$, expect } from "@wdio/globals";
3+
import { browser } from "@wdio/globals";
44

55
describe("DataChannel:CBOR", function () {
66
beforeAll(async function () {

lib/baseconnection.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export abstract class BaseConnection<
5151
return this._open;
5252
}
5353

54-
constructor(
54+
protected constructor(
5555
/**
5656
* The ID of the peer on the other end of this connection.
5757
*/

lib/dataconnection/StreamConnection/Cbor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class Cbor extends StreamConnection {
5656
constructor(peerId: string, provider: Peer, options: any) {
5757
super(peerId, provider, { ...options, reliable: true });
5858

59-
this._rawReadStream.pipeTo(this._decoderStream.writable);
59+
void this._rawReadStream.pipeTo(this._decoderStream.writable);
6060

6161
(async () => {
6262
for await (const msg of iterateOver(this._decoderStream.readable)) {

lib/dataconnection/StreamConnection/StreamConnection.ts

+1-7
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@ export abstract class StreamConnection extends DataConnection {
4040
start: (controller) => {
4141
this.once("open", () => {
4242
this.dataChannel.addEventListener("message", (e) => {
43-
// if(e.data?.__peerData?.type === "close")
44-
// {
45-
// controller.close()
46-
// this.close()
47-
// return
48-
// }
4943
controller.enqueue(e.data);
5044
});
5145
});
@@ -55,7 +49,7 @@ export abstract class StreamConnection extends DataConnection {
5549
protected constructor(peerId: string, provider: Peer, options: any) {
5650
super(peerId, provider, { ...options, reliable: true });
5751

58-
this._splitStream.readable.pipeTo(this._rawSendStream);
52+
void this._splitStream.readable.pipeTo(this._rawSendStream);
5953
}
6054

6155
public override _initializeDataChannel(dc) {

lib/mediaconnection.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ export class MediaConnection extends BaseConnection<MediaConnectionEvents> {
100100
switch (message.type) {
101101
case ServerMessageType.Answer:
102102
// Forward to negotiator
103-
this._negotiator.handleSDP(type, payload.sdp);
103+
void this._negotiator.handleSDP(type, payload.sdp);
104104
this._open = true;
105105
break;
106106
case ServerMessageType.Candidate:
107-
this._negotiator.handleCandidate(payload.candidate);
107+
void this._negotiator.handleCandidate(payload.candidate);
108108
break;
109109
default:
110110
logger.warn(`Unrecognized message type:${type} from peer:${this.peer}`);

lib/negotiator.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export class Negotiator<
3737
);
3838
dataConnection._initializeDataChannel(dataChannel);
3939

40-
this._makeOffer();
40+
void this._makeOffer();
4141
} else {
42-
this.handleSDP("OFFER", options.sdp);
42+
void this.handleSDP("OFFER", options.sdp);
4343
}
4444
}
4545

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,8 @@
151151
"source": "lib/global.ts"
152152
},
153153
"browser-minified-cbor": {
154-
"context": "node",
154+
"context": "browser",
155155
"outputFormat": "esmodule",
156-
"includeNodeModules": true,
157156
"isLibrary": true,
158157
"optimize": true,
159158
"engines": {
@@ -164,7 +163,6 @@
164163
"browser-minified-msgpack": {
165164
"context": "browser",
166165
"outputFormat": "esmodule",
167-
"includeNodeModules": true,
168166
"isLibrary": true,
169167
"optimize": true,
170168
"engines": {

0 commit comments

Comments
 (0)