Skip to content

Commit

Permalink
chore(swingset): Fix default param lint warnings
Browse files Browse the repository at this point in the history
This PR removes the following lint warnings introduced by
version update of eslint-plugin-jsdoc in Agoric#8032.

(jsdoc/no-defaults) Defaults are not permitted on @param
  • Loading branch information
toliaqat authored and anilhelvaci committed Feb 16, 2024
1 parent 874bfce commit f43e59f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/SwingSet/src/devices/plugin/device-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/devices/timer/device-timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<Event>} [state=undefined]
* @param {Array<Event>} [state]
*/
function makeTimerMap(state = undefined) {
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/SwingSet/src/vats/network/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const rethrowUnlessMissing = err => {
* @param {ConnectionHandler} handler
* @param {Endpoint} localAddr
* @param {Endpoint} remoteAddr
* @param {Set<Closable>} [current=new Set()]
* @param {Set<Closable>} [current]
* @returns {Connection}
*/
export const makeConnection = (
Expand Down Expand Up @@ -110,7 +110,7 @@ export const makeConnection = (
* @param {Endpoint} addr0
* @param {ConnectionHandler} handler1
* @param {Endpoint} addr1
* @param {WeakSet<Connection>} [current=new WeakSet()]
* @param {WeakSet<Connection>} [current]
* @returns {[Connection, Connection]}
*/
export function crossoverConnection(
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/vats/network/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 3 additions & 4 deletions packages/SwingSet/test/upgrade/test-upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<{
Expand Down Expand Up @@ -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 } =
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f43e59f

Please sign in to comment.