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

Commit f397c19

Browse files
committed
Add prettier-enforced semicolons
1 parent 074994e commit f397c19

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

lib/net/server/libp2pserver.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ export class Libp2pServer extends Server {
9898
})
9999
})
100100
}
101-
(this.node as Libp2pNode).on('peer:discovery', async (peerInfo: any) => {
101+
// eslint-disable-next-line no-extra-semi
102+
;(this.node as Libp2pNode).on('peer:discovery', async (peerInfo: any) => {
102103
try {
103104
const id = peerInfo.id.toB58String()
104105
if (this.peers.get(id) || this.isBanned(id)) {
@@ -196,7 +197,8 @@ export class Libp2pServer extends Server {
196197
if (err) {
197198
return reject(err)
198199
}
199-
(this.multiaddrs as string[]).forEach((ma: any) => peerInfo.multiaddrs.add(ma))
200+
// eslint-disable-next-line no-extra-semi
201+
;(this.multiaddrs as string[]).forEach((ma: any) => peerInfo.multiaddrs.add(ma))
200202
resolve(peerInfo)
201203
}
202204
if (this.key) {

lib/net/server/rlpxserver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class RlpxServer extends Server {
120120
*/
121121
async stop(): Promise<boolean> {
122122
if (this.started) {
123-
(this.rlpx as Devp2pRLPx).destroy()
123+
;(this.rlpx as Devp2pRLPx).destroy() // eslint-disable-line no-extra-semi
124124
;(this.dpt as Devp2pDPT).destroy()
125125
await super.stop()
126126
this.started = false
@@ -138,7 +138,7 @@ export class RlpxServer extends Server {
138138
if (!this.started) {
139139
return false
140140
}
141-
(this.dpt as Devp2pDPT).banPeer(peerId, maxAge)
141+
;(this.dpt as Devp2pDPT).banPeer(peerId, maxAge) // eslint-disable-line no-extra-semi
142142
return true
143143
}
144144

test/sync/fastsync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tape('[FastSynchronizer]', (t) => {
99
class PeerPool extends EventEmitter {}
1010
td.replace('../../lib/net/peerpool', PeerPool)
1111
class BlockFetcher extends EventEmitter {}
12-
(BlockFetcher.prototype as any).fetch = td.func()
12+
;(BlockFetcher.prototype as any).fetch = td.func() // eslint-disable-line no-extra-semi
1313
td.replace('../../lib/sync/fetcher', { BlockFetcher })
1414
const FastSynchronizer = require('../../lib/sync/fastsync').FastSynchronizer
1515

test/sync/fetcher/blockfetcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async function wait(delay?: number) {
1111

1212
tape('[BlockFetcher]', (t) => {
1313
class PeerPool extends EventEmitter {}
14-
(PeerPool.prototype as any).idle = td.func() // Need semi-colon to separate statements
14+
;(PeerPool.prototype as any).idle = td.func() // eslint-disable-line no-extra-semi
1515
;(PeerPool.prototype as any).ban = td.func()
1616
td.replace('../../../lib/net/peerpool', PeerPool)
1717
const BlockFetcher = require('../../../lib/sync/fetcher/blockfetcher').BlockFetcher

test/sync/fetcher/headerfetcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defaultLogger.silent = true
66

77
tape('[HeaderFetcher]', (t) => {
88
class PeerPool extends EventEmitter {}
9-
(PeerPool.prototype as any).idle = td.func() // Need semi-colon to separate statements
9+
;(PeerPool.prototype as any).idle = td.func() // eslint-disable-line no-extra-semi
1010
;(PeerPool.prototype as any).ban = td.func()
1111
td.replace('../../../lib/net/peerpool', PeerPool)
1212
const HeaderFetcher = require('../../../lib/sync/fetcher/headerfetcher').HeaderFetcher

test/sync/lightsync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tape('[LightSynchronizer]', (t) => {
99
class PeerPool extends EventEmitter {}
1010
td.replace('../../lib/net/peerpool', PeerPool)
1111
class HeaderFetcher extends EventEmitter {}
12-
(HeaderFetcher.prototype as any).fetch = td.func()
12+
;(HeaderFetcher.prototype as any).fetch = td.func() // eslint-disable-line no-extra-semi
1313
td.replace('../../lib/sync/fetcher', { HeaderFetcher })
1414
const LightSynchronizer = require('../../lib/sync/lightsync').LightSynchronizer
1515

0 commit comments

Comments
 (0)