diff --git a/src/connection/connection.js b/src/connection/connection.js index 3fb7291..57dd215 100644 --- a/src/connection/connection.js +++ b/src/connection/connection.js @@ -1,4 +1,5 @@ 'use strict' +/* eslint-disable valid-jsdoc */ const PeerId = require('peer-id') const multiaddr = require('multiaddr') @@ -143,7 +144,7 @@ class Connection { return 'Connection' } - get [connectionSymbol]() { + get [connectionSymbol] () { return true } @@ -153,7 +154,7 @@ class Connection { * @param {any} other * @returns {other is Connection} */ - static isConnection(other) { + static isConnection (other) { return Boolean(other && other[connectionSymbol]) } @@ -246,5 +247,4 @@ class Connection { } } - module.exports = Connection diff --git a/src/pubsub/index.js b/src/pubsub/index.js index 6761959..a763fed 100644 --- a/src/pubsub/index.js +++ b/src/pubsub/index.js @@ -1,4 +1,5 @@ 'use strict' +/* eslint-disable valid-jsdoc */ const debug = require('debug') const EventEmitter = require('events') diff --git a/src/pubsub/utils.js b/src/pubsub/utils.js index ae1b6b7..8ba7433 100644 --- a/src/pubsub/utils.js +++ b/src/pubsub/utils.js @@ -1,4 +1,5 @@ 'use strict' +/* eslint-disable valid-jsdoc */ const randomBytes = require('libp2p-crypto/src/random-bytes') const uint8ArrayToString = require('uint8arrays/to-string') @@ -105,7 +106,7 @@ exports.normalizeInRpcMessage = (message, peerId) => { /** * @template {Object} T - * + * * @param {T} message * @return {T & {from?: Uint8Array, data?: Uint8Array}} */ diff --git a/src/topology/index.js b/src/topology/index.js index 30c6996..ef36c5c 100644 --- a/src/topology/index.js +++ b/src/topology/index.js @@ -1,4 +1,5 @@ 'use strict' +/* eslint-disable valid-jsdoc */ const noop = () => {} const topologySymbol = Symbol.for('@libp2p/js-interfaces/topology') @@ -33,10 +34,10 @@ class Topology { } get [Symbol.toStringTag] () { - return 'Topology' + return 'Topology' } - get [topologySymbol]() { + get [topologySymbol] () { return true } @@ -46,7 +47,7 @@ class Topology { * @param {any} other * @returns {other is Topology} */ - static isTopology(other) { + static isTopology (other) { return Boolean(other && other[topologySymbol]) } diff --git a/src/topology/multicodec-topology.js b/src/topology/multicodec-topology.js index 1dd42ae..271f25e 100644 --- a/src/topology/multicodec-topology.js +++ b/src/topology/multicodec-topology.js @@ -1,9 +1,9 @@ 'use strict' +/* eslint-disable valid-jsdoc */ const Topology = require('./index') const multicodecTopologySymbol = Symbol.for('@libp2p/js-interfaces/topology/multicodec-topology') - class MulticodecTopology extends Topology { /** * @param {Object} props @@ -50,7 +50,7 @@ class MulticodecTopology extends Topology { return 'Topology' } - get [multicodecTopologySymbol]() { + get [multicodecTopologySymbol] () { return true } @@ -60,7 +60,7 @@ class MulticodecTopology extends Topology { * @param {any} other * @returns {other is MulticodecTopology} */ - static isMulticodecTopology(other) { + static isMulticodecTopology (other) { return Boolean(other && other[multicodecTopologySymbol]) }