From f43e59f0b4369d258d3e76bde5cbb45d054b95ed Mon Sep 17 00:00:00 2001 From: Touseef Liaqat Date: Tue, 11 Jul 2023 16:52:38 -0700 Subject: [PATCH] chore(swingset): Fix default param lint warnings This PR removes the following lint warnings introduced by version update of eslint-plugin-jsdoc in #8032. (jsdoc/no-defaults) Defaults are not permitted on @param --- packages/SwingSet/src/devices/plugin/device-plugin.js | 2 +- packages/SwingSet/src/devices/timer/device-timer.js | 2 +- packages/SwingSet/src/vats/network/network.js | 4 ++-- packages/SwingSet/src/vats/network/router.js | 2 +- packages/SwingSet/test/upgrade/test-upgrade.js | 7 +++---- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/SwingSet/src/devices/plugin/device-plugin.js b/packages/SwingSet/src/devices/plugin/device-plugin.js index e141f8d1465..41927ffe8fa 100644 --- a/packages/SwingSet/src/devices/plugin/device-plugin.js +++ b/packages/SwingSet/src/devices/plugin/device-plugin.js @@ -96,7 +96,7 @@ export function buildRootDeviceNode(tools) { * Load a module and connect to it. * * @param {string} mod module with an exported `bootPlugin(state = undefined)` - * @param {number} [index=connectedMods.length] the module instance index + * @param {number} [index] the module instance index * @returns {number} the allocated index */ function connect(mod, index = connectedMods.length) { diff --git a/packages/SwingSet/src/devices/timer/device-timer.js b/packages/SwingSet/src/devices/timer/device-timer.js index 22f777b7cae..25818d17bc5 100644 --- a/packages/SwingSet/src/devices/timer/device-timer.js +++ b/packages/SwingSet/src/devices/timer/device-timer.js @@ -71,7 +71,7 @@ function copyState(schedState) { * incoming event), we'd want to tell the host loop when we should next be * scheduled. * - * @param {Array} [state=undefined] + * @param {Array} [state] */ function makeTimerMap(state = undefined) { /** diff --git a/packages/SwingSet/src/vats/network/network.js b/packages/SwingSet/src/vats/network/network.js index 803ccf7e7a2..ceb1e326678 100644 --- a/packages/SwingSet/src/vats/network/network.js +++ b/packages/SwingSet/src/vats/network/network.js @@ -32,7 +32,7 @@ export const rethrowUnlessMissing = err => { * @param {ConnectionHandler} handler * @param {Endpoint} localAddr * @param {Endpoint} remoteAddr - * @param {Set} [current=new Set()] + * @param {Set} [current] * @returns {Connection} */ export const makeConnection = ( @@ -110,7 +110,7 @@ export const makeConnection = ( * @param {Endpoint} addr0 * @param {ConnectionHandler} handler1 * @param {Endpoint} addr1 - * @param {WeakSet} [current=new WeakSet()] + * @param {WeakSet} [current] * @returns {[Connection, Connection]} */ export function crossoverConnection( diff --git a/packages/SwingSet/src/vats/network/router.js b/packages/SwingSet/src/vats/network/router.js index f59111be3ff..765717006f8 100644 --- a/packages/SwingSet/src/vats/network/router.js +++ b/packages/SwingSet/src/vats/network/router.js @@ -70,7 +70,7 @@ export default function makeRouter() { /** * Create a router that behaves like a Protocol. * - * @param {typeof defaultE} [E=defaultE] Eventual sender + * @param {typeof defaultE} [E] Eventual sender * @returns {RouterProtocol} The new delegated protocol */ export function makeRouterProtocol(E = defaultE) { diff --git a/packages/SwingSet/test/upgrade/test-upgrade.js b/packages/SwingSet/test/upgrade/test-upgrade.js index 0e0e7f6a368..d4ab354844e 100644 --- a/packages/SwingSet/test/upgrade/test-upgrade.js +++ b/packages/SwingSet/test/upgrade/test-upgrade.js @@ -76,7 +76,6 @@ const makeConfigFromPaths = (bootstrapVatPath, options = {}) => { * @param {SwingSetConfig} config * @param {object} [options] * @param {object} [options.extraRuntimeOpts] - * @param {boolean} [options.holdObjectRefs=true] - DEPRECATED - * Refcount incrementing should be manual, * see https://github.com/Agoric/agoric-sdk/issues/7213 * @returns {Promise<{ @@ -306,8 +305,8 @@ test('kernel sends bringOutYourDead for vat upgrade', async t => { * @param {import('ava').ExecutionContext} t * @param {ManagerType} defaultManagerType * @param {object} [options] - * @param {boolean} [options.restartVatAdmin=false] - * @param {boolean} [options.suppressGC=false] + * @param {boolean} [options.restartVatAdmin] + * @param {boolean} [options.suppressGC] */ const testUpgrade = async (t, defaultManagerType, options = {}) => { const { restartVatAdmin: doVatAdminRestart = false, suppressGC = false } = @@ -411,7 +410,7 @@ const testUpgrade = async (t, defaultManagerType, options = {}) => { * @param {string} when * @param {object} expectations * @param {boolean} expectations.afterGC - * @param {string[]} [expectations.stillOwned=retainedNames] + * @param {string[]} [expectations.stillOwned] */ const verifyObjectTracking = (when, expectations) => { const { afterGC, stillOwned = retainedNames } = expectations;