From b05fc0120b065e080c2663aab1801eede2adc801 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Wed, 13 Nov 2024 12:13:48 -0800 Subject: [PATCH] lint: remove remaining no-use-before-define --- packages/internal/src/node/fs-stream.js | 4 ++-- .../src/examples/staking-combinations.contract.js | 2 -- packages/orchestration/src/exos/chain-hub.js | 1 - packages/swingset-liveslots/src/virtualObjectManager.js | 2 +- packages/swingset-liveslots/src/virtualReferences.js | 2 +- packages/xsnap-lockdown/lib/object-inspect.js | 2 +- 6 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/internal/src/node/fs-stream.js b/packages/internal/src/node/fs-stream.js index 8e7ae36a48b..5d3da5edafe 100644 --- a/packages/internal/src/node/fs-stream.js +++ b/packages/internal/src/node/fs-stream.js @@ -21,13 +21,13 @@ export const fsStreamReady = stream => } const onReady = () => { - cleanup(); // eslint-disable-line no-use-before-define + cleanup(); resolve(); }; /** @param {Error} err */ const onError = err => { - cleanup(); // eslint-disable-line no-use-before-define + cleanup(); reject(err); }; diff --git a/packages/orchestration/src/examples/staking-combinations.contract.js b/packages/orchestration/src/examples/staking-combinations.contract.js index 0f233c85fdf..b38da6633d6 100644 --- a/packages/orchestration/src/examples/staking-combinations.contract.js +++ b/packages/orchestration/src/examples/staking-combinations.contract.js @@ -75,7 +75,6 @@ const contract = async ( * @param {{ validator: CosmosValidatorAddress }} offerArgs */ (seat, { validator }) => - // eslint-disable-next-line no-use-before-define -- defined by orchestrateAll, necessarily after this orchFns.depositAndDelegate(account, seat, validator), 'Deposit and delegate', undefined, @@ -98,7 +97,6 @@ const contract = async ( return zcf.makeInvitation( () => - // eslint-disable-next-line no-use-before-define -- defined by orchestrateAll, necessarily after this orchFns.undelegateAndTransfer(account, { delegations, destination, diff --git a/packages/orchestration/src/exos/chain-hub.js b/packages/orchestration/src/exos/chain-hub.js index 3540e35a60f..2a55b35605c 100644 --- a/packages/orchestration/src/exos/chain-hub.js +++ b/packages/orchestration/src/exos/chain-hub.js @@ -283,7 +283,6 @@ export const makeChainHub = (zone, agoricNames, vowTools) => { }, ); - /* eslint-disable no-use-before-define -- chainHub defined below */ const lookupChainsAndConnection = vowTools.retryable( zone, 'lookupChainsAndConnection', diff --git a/packages/swingset-liveslots/src/virtualObjectManager.js b/packages/swingset-liveslots/src/virtualObjectManager.js index e58430f6c4c..e88d038b1ef 100644 --- a/packages/swingset-liveslots/src/virtualObjectManager.js +++ b/packages/swingset-liveslots/src/virtualObjectManager.js @@ -1,5 +1,5 @@ /* global globalThis */ -/* eslint-disable no-use-before-define, jsdoc/require-returns-type */ +/* eslint-disable jsdoc/require-returns-type */ import { environmentOptionsListHas } from '@endo/env-options'; import { assert, Fail, q, b } from '@endo/errors'; diff --git a/packages/swingset-liveslots/src/virtualReferences.js b/packages/swingset-liveslots/src/virtualReferences.js index ffe0daca3bb..896c47431b9 100644 --- a/packages/swingset-liveslots/src/virtualReferences.js +++ b/packages/swingset-liveslots/src/virtualReferences.js @@ -1,4 +1,4 @@ -/* eslint-disable no-use-before-define, jsdoc/require-returns-type */ +/* eslint-disable jsdoc/require-returns-type */ import { assert, Fail } from '@endo/errors'; import { Nat } from '@endo/nat'; diff --git a/packages/xsnap-lockdown/lib/object-inspect.js b/packages/xsnap-lockdown/lib/object-inspect.js index 4f17c8f987e..19acc2da50d 100644 --- a/packages/xsnap-lockdown/lib/object-inspect.js +++ b/packages/xsnap-lockdown/lib/object-inspect.js @@ -1,5 +1,5 @@ // @ts-nocheck -/* eslint-disable no-nested-ternary,no-use-before-define */ +/* eslint-disable no-nested-ternary */ /* global globalThis */ // Adapted from object-inspect@1.12.0 https://github.com/inspect-js/object-inspect