diff --git a/.eslintrc.cjs b/.eslintrc.cjs index fe5a25050e7..7754fc3e201 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -143,7 +143,7 @@ module.exports = { 'prettier/prettier': 'warn', // Not a risk with our coding style - 'no-constant-condition': 'off', + 'no-use-before-define': 'off', }, settings: { jsdoc: { @@ -177,8 +177,8 @@ module.exports = { { files: [ 'packages/**/demo/**/*.js', - 'packages/*/test/**/*.js', - 'packages/*/test/**/*.test.js', + 'packages/*/test/**/*.*s', + 'packages/*/test/**/*.test.*s', 'packages/wallet/api/test/**/*.js', ], rules: { @@ -188,12 +188,23 @@ module.exports = { // NOTE: This rule is enabled for the repository in general. We turn it // off for test code for now. '@jessie.js/safe-await-separator': 'off', + + // Like `'ava/no-only-test`, but works with @endo/ses-ava + 'no-restricted-properties': [ + 'error', + { + object: 'test', + property: 'only', + message: + 'Do not commit .only tests - they prevent other tests from running', + }, + ], }, }, { // These tests use EV() instead of E(), which are easy to confuse. // Help by erroring when E() packages are imported. - files: ['packages/boot/test/**/*.test.*'], + files: ['packages/boot/test/**/*.test.*s'], rules: { 'no-restricted-imports': [ 'error', @@ -229,8 +240,6 @@ module.exports = { { files: ['*.d.ts'], rules: { - // Irrelevant in a typedef - 'no-use-before-define': 'off', // Linter confuses the type declaration with value declaration 'no-redeclare': 'off', }, diff --git a/packages/ERTP/src/paymentLedger.js b/packages/ERTP/src/paymentLedger.js index 45835366b5d..adc03ce9b7e 100644 --- a/packages/ERTP/src/paymentLedger.js +++ b/packages/ERTP/src/paymentLedger.js @@ -2,7 +2,6 @@ /// -/* eslint-disable no-use-before-define */ import { X, q, Fail, annotateError } from '@endo/errors'; import { isPromise } from '@endo/promise-kit'; import { mustMatch, M, keyEQ } from '@agoric/store'; diff --git a/packages/ERTP/src/types.ts b/packages/ERTP/src/types.ts index 92b7b5b18fd..5195da07f12 100644 --- a/packages/ERTP/src/types.ts +++ b/packages/ERTP/src/types.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-use-before-define */ import type { LatestTopic } from '@agoric/notifier'; import type { ERef } from '@endo/far'; import type { RemotableObject } from '@endo/pass-style'; diff --git a/packages/SwingSet/src/controller/initializeKernel.js b/packages/SwingSet/src/controller/initializeKernel.js index aa84c4b0216..dfe3ba00157 100644 --- a/packages/SwingSet/src/controller/initializeKernel.js +++ b/packages/SwingSet/src/controller/initializeKernel.js @@ -1,5 +1,3 @@ -/* eslint-disable no-use-before-define */ - import { assert, Fail } from '@endo/errors'; import { makeMarshal } from '@endo/marshal'; import { Far } from '@endo/far'; diff --git a/packages/SwingSet/src/devices/lib/deviceTools.js b/packages/SwingSet/src/devices/lib/deviceTools.js index 9b5c91aaf28..624cfe0eb3d 100644 --- a/packages/SwingSet/src/devices/lib/deviceTools.js +++ b/packages/SwingSet/src/devices/lib/deviceTools.js @@ -24,7 +24,6 @@ export function buildSerializationTools(syscall, deviceName) { send(method, args) { assert.typeof(method, 'string'); assert(Array.isArray(args), args); - // eslint-disable-next-line no-use-before-define const capdata = serialize([method, args]); syscall.sendOnly(slot, capdata); }, diff --git a/packages/SwingSet/src/kernel/kernel.js b/packages/SwingSet/src/kernel/kernel.js index b68d6836b95..cd20086dde7 100644 --- a/packages/SwingSet/src/kernel/kernel.js +++ b/packages/SwingSet/src/kernel/kernel.js @@ -1128,7 +1128,6 @@ export default function buildKernel( } else if (message.type === 'changeVatOptions') { // prettier-ignore return `changeVatOptions ${message.vatID} options: ${JSON.stringify(message.options)}`; - // eslint-disable-next-line no-use-before-define } else if (gcMessages.includes(message.type)) { // prettier-ignore return `${message.type} ${message.vatID} ${message.krefs.map(e=>`@${e}`).join(' ')}`; diff --git a/packages/SwingSet/src/kernel/state/kernelKeeper.js b/packages/SwingSet/src/kernel/state/kernelKeeper.js index 976e8d919f1..02d43b45ea0 100644 --- a/packages/SwingSet/src/kernel/state/kernelKeeper.js +++ b/packages/SwingSet/src/kernel/state/kernelKeeper.js @@ -1,4 +1,3 @@ -/* eslint-disable no-use-before-define */ import { Nat, isNat } from '@endo/nat'; import { assert, Fail } from '@endo/errors'; import { diff --git a/packages/SwingSet/src/kernel/vat-warehouse.js b/packages/SwingSet/src/kernel/vat-warehouse.js index 2d4a167c398..96ecf828d2a 100644 --- a/packages/SwingSet/src/kernel/vat-warehouse.js +++ b/packages/SwingSet/src/kernel/vat-warehouse.js @@ -389,7 +389,6 @@ export function makeVatWarehouse({ // entriesReplayed, // retval of replayTranscript() above // ); ephemeral.vats.set(vatID, result); - // eslint-disable-next-line no-use-before-define await applyAvailabilityPolicy(vatID); return result; } @@ -596,7 +595,6 @@ export function makeVatWarehouse({ // /** @type { KernelDeliveryObject } */ const kd = harden(['bringOutYourDead']); - // eslint-disable-next-line no-use-before-define const vd = kernelDeliveryToVatDelivery(vatID, kd); const vs = kernelSlog.provideVatSlogger(vatID).vatSlog; await deliverToVat(vatID, kd, vd, vs); diff --git a/packages/SwingSet/src/vats/comms/delivery.js b/packages/SwingSet/src/vats/comms/delivery.js index bdfd8703226..c513a877812 100644 --- a/packages/SwingSet/src/vats/comms/delivery.js +++ b/packages/SwingSet/src/vats/comms/delivery.js @@ -1,5 +1,3 @@ -/* eslint-disable no-use-before-define */ - import { assert, Fail } from '@endo/errors'; import { kser } from '@agoric/kmarshal'; import { parseLocalSlot, insistLocalType } from './parseLocalSlots.js'; diff --git a/packages/SwingSet/src/vats/comms/state.js b/packages/SwingSet/src/vats/comms/state.js index 65813f276b7..8e0f9a616eb 100644 --- a/packages/SwingSet/src/vats/comms/state.js +++ b/packages/SwingSet/src/vats/comms/state.js @@ -150,7 +150,6 @@ export function makeState(syscall) { store.set('r.nextID', '1'); store.set('initialized', 'true'); if (controller) { - // eslint-disable-next-line no-use-before-define addMetaObject(controller); cdebug(`comms controller is ${controller}`); } @@ -393,7 +392,6 @@ export function makeState(syscall) { // the object is unreachable const { owner, isReachable, isRecognizable } = - // eslint-disable-next-line no-use-before-define getOwnerAndStatus(lref); if (isReachable) { // but the exporter doesn't realize it yet, so schedule a @@ -558,7 +556,6 @@ export function makeState(syscall) { isReachable = isReachableByKernel(lref); isRecognizable = !!mapToKernel(lref); } else { - // eslint-disable-next-line no-use-before-define const remote = getRemote(owner); isReachable = remote.isReachable(lref); isRecognizable = !!remote.mapToRemote(lref); @@ -794,7 +791,6 @@ export function makeState(syscall) { insistPromiseIsUnresolved, markPromiseAsResolved, - // eslint-disable-next-line no-use-before-define getRemote, addRemote, getRemoteIDForName, diff --git a/packages/SwingSet/src/vats/timer/vat-timer.js b/packages/SwingSet/src/vats/timer/vat-timer.js index 1f1ce669439..7e137bbe540 100644 --- a/packages/SwingSet/src/vats/timer/vat-timer.js +++ b/packages/SwingSet/src/vats/timer/vat-timer.js @@ -1,5 +1,3 @@ -/* eslint-disable no-use-before-define */ - import { assert } from '@endo/errors'; import { Far, E, passStyleOf } from '@endo/far'; import { makePromiseKit } from '@endo/promise-kit'; diff --git a/packages/SwingSet/src/vats/vat-admin/vat-vat-admin.js b/packages/SwingSet/src/vats/vat-admin/vat-vat-admin.js index 965fcb47864..675db94cbb1 100644 --- a/packages/SwingSet/src/vats/vat-admin/vat-vat-admin.js +++ b/packages/SwingSet/src/vats/vat-admin/vat-vat-admin.js @@ -100,7 +100,6 @@ export function buildRootObject(vatPowers, _vatParameters, baggage) { // getNotifier: ({ state }) => state.notifier, // XXX RESTORE getNotifier: ({ _self }) => Fail`not implemented, see #7234`, // XXX TEMP }, - // eslint-disable-next-line no-use-before-define { finish: finishMeter }, ); @@ -120,18 +119,15 @@ export function buildRootObject(vatPowers, _vatParameters, baggage) { // getNotifier: ({ state }) => state.notifier, // will never fire // XXX RESTORE getNotifier: ({ _self }) => Fail`not implemented, see #7234`, // XXX TEMP }, - // eslint-disable-next-line no-use-before-define { finish: finishMeter }, ); function finishMeter({ state, self }) { - // eslint-disable-next-line no-use-before-define meterByID.init( state.meterID, // harden({ meter: self, updater: state.updater }), // XXX RESTORE harden({ meter: self }), // XXX TEMP ); - // eslint-disable-next-line no-use-before-define meterIDByMeter.set(self, state.meterID); } diff --git a/packages/SwingSet/test/snapshots/xsnap-store.test.js.md b/packages/SwingSet/test/snapshots/xsnap-store.test.js.md index 00ec65bdc3a..43137c2f9e3 100644 --- a/packages/SwingSet/test/snapshots/xsnap-store.test.js.md +++ b/packages/SwingSet/test/snapshots/xsnap-store.test.js.md @@ -22,8 +22,8 @@ Generated by [AVA](https://avajs.dev). archiveWriteSeconds: undefined, compressSeconds: 0, dbSaveSeconds: 0, - hash: '7623fab3851503c9904ed7b76e832dee6cfcb414b409677376cd47a1a5589a18', - uncompressedSize: 854339, + hash: '8da7b45fc3fbb377376a4569e8d8f8f971b2d1cd82e5b0d2e7210532c350568e', + uncompressedSize: 854315, } > after use of harden() - sensitive to SES-shim, XS, and supervisor @@ -32,6 +32,6 @@ Generated by [AVA](https://avajs.dev). archiveWriteSeconds: undefined, compressSeconds: 0, dbSaveSeconds: 0, - hash: 'f5619dc112ea57402d8dea36bd8886f1bd22e5534c0b101693ef20a154152860', - uncompressedSize: 854499, + hash: 'f4adb516a299d85752f93ee1191844efc77ae73313ab93971b2d1eb10a04f5f9', + uncompressedSize: 854475, } diff --git a/packages/SwingSet/test/snapshots/xsnap-store.test.js.snap b/packages/SwingSet/test/snapshots/xsnap-store.test.js.snap index 1354b878710..96ba58ad65f 100644 Binary files a/packages/SwingSet/test/snapshots/xsnap-store.test.js.snap and b/packages/SwingSet/test/snapshots/xsnap-store.test.js.snap differ diff --git a/packages/SwingSet/tools/baggage-check.js b/packages/SwingSet/tools/baggage-check.js index 6455952d10e..6d190e19e00 100644 --- a/packages/SwingSet/tools/baggage-check.js +++ b/packages/SwingSet/tools/baggage-check.js @@ -1,8 +1,6 @@ import { makeMarshal } from '@endo/marshal'; import { Far } from '@endo/far'; -/* eslint-disable no-use-before-define */ - function fakeSTV(slot, iface = 'Remotable') { return Far(iface, { getSlot: () => slot, diff --git a/packages/SwingSet/tools/bootstrap-dvo-test.js b/packages/SwingSet/tools/bootstrap-dvo-test.js index 337e4d95abe..eb085aa7814 100644 --- a/packages/SwingSet/tools/bootstrap-dvo-test.js +++ b/packages/SwingSet/tools/bootstrap-dvo-test.js @@ -11,7 +11,6 @@ export function buildRootObject() { async function runTests(phase) { testLog = []; doneP = makePromiseKit(); - // eslint-disable-next-line no-use-before-define await E(testVatRoot).runTests(self, phase); await doneP.promise; return testLog; diff --git a/packages/agoric-cli/src/install.js b/packages/agoric-cli/src/install.js index c42eb125780..25c605991d2 100644 --- a/packages/agoric-cli/src/install.js +++ b/packages/agoric-cli/src/install.js @@ -131,7 +131,6 @@ export default async function installMain(progname, rawArgs, powers, opts) { // Ensure we update the package.json before exiting. const updatePackageJson = async () => { // Don't update on exit anymore. - // eslint-disable-next-line no-use-before-define process.off('beforeExit', updatePackageJsonOnExit); log.info(`updating ${pjson}`); await fs.writeFile( diff --git a/packages/async-flow/src/convert.js b/packages/async-flow/src/convert.js index 51ed928ec2e..aa2e7b2be23 100644 --- a/packages/async-flow/src/convert.js +++ b/packages/async-flow/src/convert.js @@ -22,11 +22,9 @@ const makeConvert = (convertRemotable, convertPromiseOrVow, convertError) => { // to keep track of the error labeling. // See https://github.com/endojs/endo/pull/1795#issuecomment-1756093032 if (label === undefined) { - // eslint-disable-next-line no-use-before-define return innerConvert(specimen); } try { - // eslint-disable-next-line no-use-before-define return innerConvert(specimen); } catch (err) { throwLabeled(err, label); diff --git a/packages/async-flow/src/equate.js b/packages/async-flow/src/equate.js index 9bfa3bba4a3..a4798a0bd76 100644 --- a/packages/async-flow/src/equate.js +++ b/packages/async-flow/src/equate.js @@ -13,11 +13,9 @@ export const makeEquate = bijection => { // TODO switch to Richard Gibson's suggestion for a better way // to keep track of the error labeling. if (label === undefined) { - // eslint-disable-next-line no-use-before-define innerEquate(g, h); } try { - // eslint-disable-next-line no-use-before-define innerEquate(g, h); } catch (err) { throwLabeled(err, label); diff --git a/packages/async-flow/src/replay-membrane.js b/packages/async-flow/src/replay-membrane.js index 57aa83aef9b..702e6920a67 100644 --- a/packages/async-flow/src/replay-membrane.js +++ b/packages/async-flow/src/replay-membrane.js @@ -1,4 +1,3 @@ -/* eslint-disable no-use-before-define */ import { isVow } from '@agoric/vow/src/vow-utils.js'; import { heapVowE } from '@agoric/vow/vat.js'; import { throwLabeled } from '@endo/common/throw-labeled.js'; diff --git a/packages/async-flow/src/types.ts b/packages/async-flow/src/types.ts index c9b00533392..29359000d39 100644 --- a/packages/async-flow/src/types.ts +++ b/packages/async-flow/src/types.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-use-before-define */ import type { Passable } from '@endo/pass-style'; import type { Vow, VowTools } from '@agoric/vow'; import type { LogStore } from './log-store.js'; diff --git a/packages/boot/tools/supports.ts b/packages/boot/tools/supports.ts index 209dcf1924a..7addf5619a5 100644 --- a/packages/boot/tools/supports.ts +++ b/packages/boot/tools/supports.ts @@ -354,7 +354,6 @@ export const makeSwingsetTestKit = async ( ...args ) => { console.log('inbound', ...args); - // eslint-disable-next-line no-use-before-define bridgeInbound!(...args); }; diff --git a/packages/casting/src/leader.js b/packages/casting/src/leader.js index 793551326ba..eed8d9de8ca 100644 --- a/packages/casting/src/leader.js +++ b/packages/casting/src/leader.js @@ -31,7 +31,6 @@ export const makeRoundRobinLeader = (endpoints, leaderOptions = {}) => { } throw err; }, - // eslint-disable-next-line no-use-before-define watchCasting: _castingSpecP => pollingChangeFollower, /** * @template T @@ -55,10 +54,7 @@ export const makeRoundRobinLeader = (endpoints, leaderOptions = {}) => { }); } - retrying - .then(() => jitter && jitter(where)) - // eslint-disable-next-line no-use-before-define - .then(applyOne, reject); + retrying.then(() => jitter && jitter(where)).then(applyOne, reject); thisAttempt += 1; }; diff --git a/packages/cosmic-swingset/src/chain-main.js b/packages/cosmic-swingset/src/chain-main.js index 0221529fbf5..2efd94998a8 100644 --- a/packages/cosmic-swingset/src/chain-main.js +++ b/packages/cosmic-swingset/src/chain-main.js @@ -222,7 +222,6 @@ export default async function main(progname, args, { env, homedir, agcc }) { // Actually run the main ag-chain-cosmos program. Before we start the daemon, // there will be a call to nodePort/AG_COSMOS_INIT, otherwise exit. - // eslint-disable-next-line no-use-before-define const nodePort = registerPortHandler(toSwingSet); // Need to keep the process alive until Go exits. diff --git a/packages/cosmic-swingset/src/sim-chain.js b/packages/cosmic-swingset/src/sim-chain.js index f5192ce1a20..93e5a98d4e5 100644 --- a/packages/cosmic-swingset/src/sim-chain.js +++ b/packages/cosmic-swingset/src/sim-chain.js @@ -173,7 +173,6 @@ export async function connectToFakeChain(basedir, GCI, delay, inbound) { await blockingSend({ type: 'COMMIT_BLOCK', blockHeight, blockTime }); clearTimeout(nextBlockTimeout); - // eslint-disable-next-line no-use-before-define nextBlockTimeout = setTimeout(simulateBlock, maximumDelay); // TODO: maybe add latency to the inbound messages. diff --git a/packages/fast-usdc/src/fast-usdc.contract.js b/packages/fast-usdc/src/fast-usdc.contract.js index 5e5a0466f5a..0d838534184 100644 --- a/packages/fast-usdc/src/fast-usdc.contract.js +++ b/packages/fast-usdc/src/fast-usdc.contract.js @@ -120,7 +120,6 @@ export const contract = async (zcf, privateArgs, zone, tools) => { testBorrow(amounts) { console.log('🚧🚧 UNTIL: borrow is integrated (#10388) 🚧🚧', amounts); const { zcfSeat: tmpAssetManagerSeat } = zcf.makeEmptySeatKit(); - // eslint-disable-next-line no-use-before-define poolKit.borrower.borrow(tmpAssetManagerSeat, amounts); return tmpAssetManagerSeat.getCurrentAllocation(); }, @@ -141,7 +140,6 @@ export const contract = async (zcf, privateArgs, zone, tools) => { ), payments, ); - // eslint-disable-next-line no-use-before-define poolKit.repayer.repay(tmpAssetManagerSeat, amounts); return tmpAssetManagerSeat.getCurrentAllocation(); }, @@ -164,15 +162,12 @@ export const contract = async (zcf, privateArgs, zone, tools) => { return makeTestInvitation(); }, makeDepositInvitation() { - // eslint-disable-next-line no-use-before-define return poolKit.public.makeDepositInvitation(); }, makeWithdrawInvitation() { - // eslint-disable-next-line no-use-before-define return poolKit.public.makeWithdrawInvitation(); }, getPublicTopics() { - // eslint-disable-next-line no-use-before-define return poolKit.public.getPublicTopics(); }, }); diff --git a/packages/governance/src/contractGovernance/paramManager.js b/packages/governance/src/contractGovernance/paramManager.js index ccafa4fc6b7..f79d9af10cc 100644 --- a/packages/governance/src/contractGovernance/paramManager.js +++ b/packages/governance/src/contractGovernance/paramManager.js @@ -120,7 +120,6 @@ const makeParamManagerBuilder = (publisherKit, zoe) => { }); // names are keywords so they will necessarily be TitleCase - // eslint-disable-next-line no-use-before-define getters[`get${name}`] = () => getTypedParam(type, name); // CRUCIAL: here we're creating the update functions that can change the // values of the governed contract's parameters. We'll return the updateFns @@ -292,7 +291,6 @@ const makeParamManagerBuilder = (publisherKit, zoe) => { getVisibleValue, }); - // eslint-disable-next-line no-use-before-define getters[`get${name}`] = () => getTypedParam(ParamTypes.INVITATION, name); // CRUCIAL: here we're creating the update functions that can change the // values of the governed contract's parameters. We'll return updateParams diff --git a/packages/inter-protocol/src/auction/auctioneer.js b/packages/inter-protocol/src/auction/auctioneer.js index 28d06979b55..a09589c9a7e 100644 --- a/packages/inter-protocol/src/auction/auctioneer.js +++ b/packages/inter-protocol/src/auction/auctioneer.js @@ -586,7 +586,6 @@ export const start = async (zcf, privateArgs, baggage) => { }, }); - // eslint-disable-next-line no-use-before-define const isActive = () => scheduler.getAuctionState() === AuctionState.ACTIVE; /** @@ -653,7 +652,6 @@ export const start = async (zcf, privateArgs, baggage) => { ); }, getSchedules() { - // eslint-disable-next-line no-use-before-define return scheduler.getSchedule(); }, getScheduleUpdates() { diff --git a/packages/inter-protocol/src/auction/scheduler.js b/packages/inter-protocol/src/auction/scheduler.js index 57ead7b8d97..68eaa038a99 100644 --- a/packages/inter-protocol/src/auction/scheduler.js +++ b/packages/inter-protocol/src/auction/scheduler.js @@ -244,7 +244,6 @@ export const makeScheduler = async ( try { setTimeMonotonically(time); auctionDriver.capturePrices(); - // eslint-disable-next-line no-use-before-define return startAuction(); } catch (e) { console.error(`⚠️ Auction threw ${e}. Caught in SchedulerWaker.`); 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/internal/src/node/shutdown.js b/packages/internal/src/node/shutdown.js index 400b66bde06..fa7b4c01699 100644 --- a/packages/internal/src/node/shutdown.js +++ b/packages/internal/src/node/shutdown.js @@ -22,7 +22,6 @@ export const makeFreshShutdown = (verbose = true) => { process.off('SIGINT', shutdown); process.off('SIGTERM', shutdown); process.off('beforeExit', shutdown); - // eslint-disable-next-line no-use-before-define process.off('uncaughtException', uncaughtShutdown); verbose && console.error(`Shutting down cleanly...`); const shutdowners = [...shutdownThunks.keys()]; diff --git a/packages/notifier/src/types.ts b/packages/notifier/src/types.ts index 972ce7cf0c0..30d1281ea9d 100644 --- a/packages/notifier/src/types.ts +++ b/packages/notifier/src/types.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-use-before-define */ import type { StoredFacet, Unserializer, diff --git a/packages/notifier/test/map-unum.js b/packages/notifier/test/map-unum.js index a0da12b78c8..46039f29a7e 100644 --- a/packages/notifier/test/map-unum.js +++ b/packages/notifier/test/map-unum.js @@ -23,7 +23,6 @@ export const makeMapLeader = initialEntries => { const change = delta => { if (deltaCount >= m.size) { - // eslint-disable-next-line no-use-before-define snapshot(); } else { deltaPublication.updateState(delta); 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/orchestration/src/facade.js b/packages/orchestration/src/facade.js index d2fe5b595d8..65de08c9e78 100644 --- a/packages/orchestration/src/facade.js +++ b/packages/orchestration/src/facade.js @@ -119,7 +119,6 @@ export const makeOrchestrationFacade = ({ const mappedFlows = new Map( Object.entries(guestFns).map(([name, guestFn]) => [ guestFn, - // eslint-disable-next-line no-use-before-define (...args) => orcFns[name](...args), ]), ); diff --git a/packages/orchestration/src/orchestration-api.ts b/packages/orchestration/src/orchestration-api.ts index 986c66ea10f..9bf49592a3a 100644 --- a/packages/orchestration/src/orchestration-api.ts +++ b/packages/orchestration/src/orchestration-api.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-use-before-define */ /** * @file General API of orchestration * - must not have chain-specific types without runtime narrowing by chain id diff --git a/packages/pegasus/src/pegasus.js b/packages/pegasus/src/pegasus.js index d96a2b1dd1b..cf2af1a545f 100644 --- a/packages/pegasus/src/pegasus.js +++ b/packages/pegasus/src/pegasus.js @@ -361,7 +361,6 @@ export const makePegasus = ({ zcf, board, namesByAddress, when }) => { receiveDenomPublication, remoteDenomSubscription, abort: reason => { - // eslint-disable-next-line no-use-before-define actions.abort(reason); }, }; diff --git a/packages/solo/src/chain-cosmos-sdk.js b/packages/solo/src/chain-cosmos-sdk.js index f97e9692f02..9bad3f0a1e2 100644 --- a/packages/solo/src/chain-cosmos-sdk.js +++ b/packages/solo/src/chain-cosmos-sdk.js @@ -696,14 +696,12 @@ ${chainID} chain does not yet know of address ${clientAddr}${adviseEgress( .then(txResult => { // The result had an error code (not 0 or undefined for success). if (txResult.code) { - // eslint-disable-next-line no-use-before-define failedSend( makeError(`Error in tx processing: ${txResult.log}`), ); } }) .catch(err => - // eslint-disable-next-line no-use-before-define failedSend(makeError(`Error in tx processing: ${err}`)), ); diff --git a/packages/solo/src/start.js b/packages/solo/src/start.js index b5e0d7181e4..4df27db7c8d 100644 --- a/packages/solo/src/start.js +++ b/packages/solo/src/start.js @@ -120,7 +120,6 @@ const buildSwingset = async ( const withInputQueue = makeWithQueue(); const queueThunkForKernel = withInputQueue(async thunk => { thunk(); - // eslint-disable-next-line no-use-before-define await processKernel(); }); diff --git a/packages/solo/src/vat-http.js b/packages/solo/src/vat-http.js index 1f79ca8a29f..6b9c221a5d9 100644 --- a/packages/solo/src/vat-http.js +++ b/packages/solo/src/vat-http.js @@ -28,7 +28,6 @@ export function buildRootObject(vatPowers) { const lookup = async (...path) => { // Take a snapshot of the current home. - // eslint-disable-next-line no-use-before-define const root = replObjects.home; if (path.length === 1 && Array.isArray(path[0])) { diff --git a/packages/solo/src/web.js b/packages/solo/src/web.js index 93e70d4d212..04caf2c39f4 100644 --- a/packages/solo/src/web.js +++ b/packages/solo/src/web.js @@ -370,7 +370,6 @@ export async function makeHTTPListener( return; } - // eslint-disable-next-line no-use-before-define sendJSON({ ...res, meta }); } catch (error) { inboundCommand( diff --git a/packages/swing-store/src/hasher.js b/packages/swing-store/src/hasher.js index 384425517e5..c287cc7d3a2 100644 --- a/packages/swing-store/src/hasher.js +++ b/packages/swing-store/src/hasher.js @@ -16,7 +16,6 @@ import { createHash } from 'crypto'; function createSHA256(initial = undefined) { const hash = createHash('sha256'); let done = false; - // eslint-disable-next-line no-use-before-define const self = harden({ add, finish, sample }); function add(more) { !done || Fail`hash already finished`; diff --git a/packages/swingset-liveslots/src/collectionManager.js b/packages/swingset-liveslots/src/collectionManager.js index 9b8b6d4ff2e..69dfc18531d 100644 --- a/packages/swingset-liveslots/src/collectionManager.js +++ b/packages/swingset-liveslots/src/collectionManager.js @@ -146,56 +146,48 @@ export function makeCollectionManager( scalarMapStore: { hasWeakKeys: false, kindID: 0, - // eslint-disable-next-line no-use-before-define reanimator: reanimateMapStore, durable: false, }, scalarWeakMapStore: { hasWeakKeys: true, kindID: 0, - // eslint-disable-next-line no-use-before-define reanimator: reanimateWeakMapStore, durable: false, }, scalarSetStore: { hasWeakKeys: false, kindID: 0, - // eslint-disable-next-line no-use-before-define reanimator: reanimateSetStore, durable: false, }, scalarWeakSetStore: { hasWeakKeys: true, kindID: 0, - // eslint-disable-next-line no-use-before-define reanimator: reanimateWeakSetStore, durable: false, }, scalarDurableMapStore: { hasWeakKeys: false, kindID: 0, - // eslint-disable-next-line no-use-before-define reanimator: reanimateMapStore, durable: true, }, scalarDurableWeakMapStore: { hasWeakKeys: true, kindID: 0, - // eslint-disable-next-line no-use-before-define reanimator: reanimateWeakMapStore, durable: true, }, scalarDurableSetStore: { hasWeakKeys: false, kindID: 0, - // eslint-disable-next-line no-use-before-define reanimator: reanimateSetStore, durable: true, }, scalarDurableWeakSetStore: { hasWeakKeys: true, kindID: 0, - // eslint-disable-next-line no-use-before-define reanimator: reanimateWeakSetStore, durable: true, }, @@ -218,7 +210,6 @@ export function makeCollectionManager( vrm.registerKind( kindID, storeKindInfo[kind].reanimator, - // eslint-disable-next-line no-use-before-define deleteCollection, storeKindInfo[kind].durable, ); @@ -313,7 +304,6 @@ export function makeCollectionManager( // * vref(o-4) -> "vc.5.r0000000001:o-4" const encodeRemotable = remotable => { - // eslint-disable-next-line no-use-before-define const ordinal = getOrdinal(remotable); ordinal !== undefined || Fail`no ordinal for ${remotable}`; const ordinalTag = zeroPad(ordinal, BIGINT_TAG_LEN); diff --git a/packages/swingset-liveslots/src/liveslots.js b/packages/swingset-liveslots/src/liveslots.js index 9363b15e027..73855c704af 100644 --- a/packages/swingset-liveslots/src/liveslots.js +++ b/packages/swingset-liveslots/src/liveslots.js @@ -155,10 +155,8 @@ function build( const { type, allocatedByVat, virtual, durable } = parseVatSlot(vref); if (type === 'object' && allocatedByVat) { if (virtual || durable) { - // eslint-disable-next-line no-use-before-define vrm.setExportStatus(vref, 'reachable'); } else { - // eslint-disable-next-line no-use-before-define const remotable = requiredValForSlot(vref); exportedRemotables.add(remotable); kernelRecognizableRemotables.add(vref); @@ -183,7 +181,6 @@ function build( if (wr && !wr.deref()) { // we're in the COLLECTED state, or FINALIZED after a re-introduction - // eslint-disable-next-line no-use-before-define addToPossiblyDeadSet(baseRef); slotToVal.delete(baseRef); } @@ -209,11 +206,9 @@ function build( // Support: o~.[prop](...args) remote method invocation lsdebug(`makeImportedPresence handler.applyMethod (${slot})`); if (disavowedPresences.has(o)) { - // eslint-disable-next-line no-use-before-define exitVatWithFailure(disavowalError); throw disavowalError; } - // eslint-disable-next-line no-use-before-define return queueMessage(slot, prop, args, returnedP); }, applyFunction(o, args, returnedP) { @@ -222,7 +217,6 @@ function build( get(o, prop) { lsdebug(`makeImportedPresence handler.get (${slot})`); if (disavowedPresences.has(o)) { - // eslint-disable-next-line no-use-before-define exitVatWithFailure(disavowalError); throw disavowalError; } @@ -294,7 +288,6 @@ function build( console.error(`mIPromise handler called after resolution`); Fail`mIPromise handler called after resolution`; } - // eslint-disable-next-line no-use-before-define return queueMessage(vpid, prop, args, returnedP); }, get(p, prop) { @@ -347,17 +340,14 @@ function build( // use a slot from the corresponding allocateX function allocateExportID() { - // eslint-disable-next-line no-use-before-define return vrm.allocateNextID('exportID'); } function allocateCollectionID() { - // eslint-disable-next-line no-use-before-define return vrm.allocateNextID('collectionID'); } function allocatePromiseID() { - // eslint-disable-next-line no-use-before-define const promiseID = vrm.allocateNextID('promiseID'); return makeVatSlot('promise', true, promiseID); } @@ -385,10 +375,8 @@ function build( // do a syscall.resolve when it fires. The caller must finish // doing their syscall before this turn finishes, to ensure the // kernel isn't surprised by a spurious resolution. - // eslint-disable-next-line no-use-before-define const p = requiredValForSlot(vpid); // if (!knownResolutions.has(p)) { // TODO really? - // eslint-disable-next-line no-use-before-define followForKernel(vpid, p); return true; } @@ -400,7 +388,6 @@ function build( return makeVatSlot('object', true, exportID); } - // eslint-disable-next-line no-use-before-define const m = makeMarshal(convertValToSlot, convertSlotToVal, { marshalName: `liveSlots:${forVatID}`, serializeBodyFormat: 'smallcaps', @@ -413,7 +400,6 @@ function build( console.warn('Logging sent error stack', err), }); const unmeteredUnserialize = meterControl.unmetered(m.unserialize); - // eslint-disable-next-line no-use-before-define const unmeteredConvertSlotToVal = meterControl.unmetered(convertSlotToVal); function getSlotForVal(val) { @@ -458,7 +444,6 @@ function build( allocateExportID, getSlotForVal, requiredValForSlot, - // eslint-disable-next-line no-use-before-define registerValue, m.serialize, unmeteredUnserialize, @@ -471,10 +456,8 @@ function build( vrm, allocateExportID, allocateCollectionID, - // eslint-disable-next-line no-use-before-define convertValToSlot, unmeteredConvertSlotToVal, - // eslint-disable-next-line no-use-before-define registerValue, m.serialize, unmeteredUnserialize, @@ -486,7 +469,6 @@ function build( vrm, vom, collectionManager, - // eslint-disable-next-line no-use-before-define convertValToSlot, convertSlotToVal: unmeteredConvertSlotToVal, maybeExportPromise, @@ -516,7 +498,6 @@ function build( slot = allocatePromiseID(); } else { if (disavowedPresences.has(val)) { - // eslint-disable-next-line no-use-before-define exitVatWithFailure(disavowalError); throw disavowalError; // cannot reference a disavowed object } @@ -686,7 +667,6 @@ function build( const priorResolution = knownResolutions.get(p); if (priorResolution && !doneResolutions.has(slot)) { const [priorRejected, priorRes] = priorResolution; - // eslint-disable-next-line no-use-before-define collect(slot, priorRejected, priorRes); } } @@ -972,7 +952,6 @@ function build( } // in both cases, we are now the decider, so treat it like an // exported promise - // eslint-disable-next-line no-use-before-define followForKernel(resultVPID, p); } } @@ -1249,7 +1228,6 @@ function build( possiblyRetiredSet, slotToVal, valToSlot, - // eslint-disable-next-line no-use-before-define afterDispatchActions, }); 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/swingset-liveslots/tools/fakeVirtualSupport.js b/packages/swingset-liveslots/tools/fakeVirtualSupport.js index a8e745810ce..d05939e851e 100644 --- a/packages/swingset-liveslots/tools/fakeVirtualSupport.js +++ b/packages/swingset-liveslots/tools/fakeVirtualSupport.js @@ -234,7 +234,6 @@ export function makeFakeLiveSlotsStuff(options = {}) { assert.fail('fake liveSlots stuff configured without vrm'); } } - // eslint-disable-next-line no-use-before-define registerEntry(baseRef, val, facet !== undefined); if (!result) { result = val; diff --git a/packages/swingset-runner/src/auditstore.js b/packages/swingset-runner/src/auditstore.js index 568196df3a1..0c20b2fcc2a 100644 --- a/packages/swingset-runner/src/auditstore.js +++ b/packages/swingset-runner/src/auditstore.js @@ -2,7 +2,6 @@ import { Fail } from '@endo/errors'; import { parseReachableAndVatSlot } from '@agoric/swingset-vat/src/kernel/state/reachable.js'; import { parseVatSlot } from '@agoric/swingset-vat/src/lib/parseVatSlots.js'; -/* eslint-disable no-use-before-define */ export function auditRefCounts(store, doDump, printPrefix) { const refCounts = new Map(); const refSites = new Map(); diff --git a/packages/swingset-runner/src/dumpstore.js b/packages/swingset-runner/src/dumpstore.js index 74833e48ad7..de70784e199 100644 --- a/packages/swingset-runner/src/dumpstore.js +++ b/packages/swingset-runner/src/dumpstore.js @@ -1,7 +1,6 @@ import fs from 'fs'; import process from 'process'; -/* eslint-disable no-use-before-define */ export function dumpStore(kernelStorage, outfile, rawMode, truncate = true) { const transcriptStore = kernelStorage.transcriptStore; let out; diff --git a/packages/swingset-runner/src/main.js b/packages/swingset-runner/src/main.js index 6003a30227d..4da28ae2681 100644 --- a/packages/swingset-runner/src/main.js +++ b/packages/swingset-runner/src/main.js @@ -220,8 +220,6 @@ function generateIndirectConfig(baseConfig) { return config; } -/* eslint-disable no-use-before-define */ - /** * Command line utility to run a swingset for development and testing purposes. */ diff --git a/packages/swingset-runner/src/slogulator.js b/packages/swingset-runner/src/slogulator.js index 9d8bb9c504a..86cae98534c 100644 --- a/packages/swingset-runner/src/slogulator.js +++ b/packages/swingset-runner/src/slogulator.js @@ -5,8 +5,6 @@ import yargs from 'yargs'; import { Fail } from '@endo/errors'; -/* eslint-disable no-use-before-define */ - function usage() { console.error('usage message goes here'); } diff --git a/packages/time/src/types.ts b/packages/time/src/types.ts index dd3ca10ae68..b890f2853ec 100644 --- a/packages/time/src/types.ts +++ b/packages/time/src/types.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-use-before-define */ import type { ERef, RemotableBrand } from '@endo/eventual-send'; import type { RankComparison, RemotableObject } from '@endo/marshal'; diff --git a/packages/vat-data/src/index.test-d.ts b/packages/vat-data/src/index.test-d.ts index 8300a1b5c50..9aff6547b06 100644 --- a/packages/vat-data/src/index.test-d.ts +++ b/packages/vat-data/src/index.test-d.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-use-before-define */ import { expectType } from 'tsd'; import type { KindFacets, diff --git a/packages/vats/src/core/lib-boot.js b/packages/vats/src/core/lib-boot.js index ada8fedc1f4..beeb09dc833 100644 --- a/packages/vats/src/core/lib-boot.js +++ b/packages/vats/src/core/lib-boot.js @@ -106,7 +106,6 @@ export const makeBootstrap = ( const runBehaviors = manifest => { return runModuleBehaviors({ - // eslint-disable-next-line no-use-before-define allPowers, behaviors, manifest, diff --git a/packages/vats/src/repl.js b/packages/vats/src/repl.js index fb8736482ef..28f7be203bc 100644 --- a/packages/vats/src/repl.js +++ b/packages/vats/src/repl.js @@ -18,7 +18,6 @@ const UNJSONABLES = new Map([ // A REPL-specific data dump-to-string. This specifically is *not* JSON, but its // output is unambiguous (even though it cannot be round-tripped). export const dump = (value, spaces = 0) => - // eslint-disable-next-line no-use-before-define dump0(value, spaces, new WeakSet(), 0); function dump0(value, spaces, inProgress, depth) { diff --git a/packages/vats/src/types.ts b/packages/vats/src/types.ts index c6001f8f041..34a25fcf68f 100644 --- a/packages/vats/src/types.ts +++ b/packages/vats/src/types.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-use-before-define */ import type { FungibleTokenPacketData } from '@agoric/cosmic-proto/ibc/applications/transfer/v2/packet.js'; import type { BridgeId, Remote } from '@agoric/internal'; import type { Bytes } from '@agoric/network'; diff --git a/packages/vow/src/types.ts b/packages/vow/src/types.ts index 7c7e8418b20..83a07eb07b8 100644 --- a/packages/vow/src/types.ts +++ b/packages/vow/src/types.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-use-before-define */ import type { Remote } from '@agoric/internal'; import type { Zone } from '@agoric/zone'; import type { CopyTagged, RemotableObject } from '@endo/pass-style'; diff --git a/packages/vow/test/retryable.test.js b/packages/vow/test/retryable.test.js index 5c9e98089b2..3db86d0e526 100644 --- a/packages/vow/test/retryable.test.js +++ b/packages/vow/test/retryable.test.js @@ -174,7 +174,6 @@ test('restart', async t => { await eventLoopIteration(); if (currentRun < 3) { // Trigger our own invocation restart - // eslint-disable-next-line no-use-before-define flow.restart(); } if (currentRun === 2) { diff --git a/packages/wallet/api/src/lib-dehydrate.js b/packages/wallet/api/src/lib-dehydrate.js index 5f96148f1a2..44524d85b98 100644 --- a/packages/wallet/api/src/lib-dehydrate.js +++ b/packages/wallet/api/src/lib-dehydrate.js @@ -54,7 +54,6 @@ export const makeDehydrator = (initialUnnamedCount = 0) => { if (!isPath(strongname)) { return strongname; } - // eslint-disable-next-line no-use-before-define const { valToPetname: rootToPetname } = edgeMapping; const petname = rootToPetname.get(strongname[0]); assert(!isPath(petname)); @@ -73,7 +72,6 @@ export const makeDehydrator = (initialUnnamedCount = 0) => { // A strong path must have a root name we have mapped. const path = [...strongname]; - // eslint-disable-next-line no-use-before-define const { petnameToVal: petnameToRoot } = edgeMapping; if (!petnameToRoot.has(path[0])) { // Avoid asserting, which fills up the logs. @@ -163,11 +161,7 @@ export const makeDehydrator = (initialUnnamedCount = 0) => { const addPath = (path, val) => { isPath(path) || Fail`path ${q(path)} must be an array of strings`; - if ( - !valToPetname.has(val) && - // eslint-disable-next-line no-use-before-define - edgeMapping.valToPetname.has(path[0]) - ) { + if (!valToPetname.has(val) && edgeMapping.valToPetname.has(path[0])) { // We have a petname for the root of the path, so use it as our // strongname. valToPetname.init(val, path); diff --git a/packages/wallet/api/src/lib-wallet.js b/packages/wallet/api/src/lib-wallet.js index 721ebb256ae..5ca726cfd89 100644 --- a/packages/wallet/api/src/lib-wallet.js +++ b/packages/wallet/api/src/lib-wallet.js @@ -409,7 +409,6 @@ export function makeWalletRoot({ Object.entries(pursePetnameValueKeywordRecord).map( ([keyword, { pursePetname, value, amount, purse }]) => { if (!amount) { - // eslint-disable-next-line no-use-before-define purse = getPurse(pursePetname); amount = { value }; } else { @@ -642,7 +641,6 @@ export function makeWalletRoot({ // Now send it back to the purse. try { - // eslint-disable-next-line no-use-before-define return addPayment(payment, purse); } finally { // Once we've called addPayment, mark this one as done. @@ -688,7 +686,6 @@ export function makeWalletRoot({ // we still make it a normal incoming payment. const purseOrUndefined = purseKeywordRecord[keyword]; - // eslint-disable-next-line no-use-before-define return addPayment(payoutP, purseOrUndefined); }), ); @@ -718,7 +715,6 @@ export function makeWalletRoot({ const already = brandMapping.valToPetname.has(brand); petnameForBrand = brandMapping.suggestPetname(petnameForBrand, brand); if (!already && makePurse) { - // eslint-disable-next-line no-use-before-define p = makeEmptyPurse(petnameForBrand, petnameForBrand, true); } else { p = Promise.resolve(undefined); @@ -821,7 +817,6 @@ export function makeWalletRoot({ if (defaultAutoDeposit && !brandToAutoDepositPurse.has(brand)) { // Try to initialize the autodeposit purse for this brand. // Don't do state updates, since we'll do that next. - // eslint-disable-next-line no-use-before-define await doEnableAutoDeposit(petnameForPurse, false); } @@ -943,7 +938,6 @@ export function makeWalletRoot({ arguments: args, } = compileProposal(offer.proposalTemplate); - // eslint-disable-next-line no-use-before-define const zoeIssuer = issuerManager.get(ZOE_INVITE_BRAND_PETNAME); const { brand: invitationBrand } = brandTable.getByIssuer(zoeIssuer); const invitationP = findOrMakeInvitation( @@ -1158,7 +1152,6 @@ export function makeWalletRoot({ return; } - // eslint-disable-next-line no-use-before-define await addPayment(E.get(compiledOfferP).inviteP).catch(console.error); } @@ -1481,7 +1474,6 @@ export function makeWalletRoot({ // suggestion can be rejected and the suggested petname can be // changed return acceptPetname( - // eslint-disable-next-line no-use-before-define installationManager.add, suggestedPetname, installationHandleBoardId, 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 diff --git a/packages/xsnap/src/xsnap.js b/packages/xsnap/src/xsnap.js index ab4ce46dfed..5306281a095 100644 --- a/packages/xsnap/src/xsnap.js +++ b/packages/xsnap/src/xsnap.js @@ -501,7 +501,6 @@ export async function xsnap(options) { if (cleaned) return; cleaned = true; sourceStream.unpipe(output); - // eslint-disable-next-line no-use-before-define output.off('data', onData); output.end(); }; diff --git a/packages/xsnap/test/xsnap-eof.test.js b/packages/xsnap/test/xsnap-eof.test.js index e51407391ce..c5dcb7d8cea 100644 --- a/packages/xsnap/test/xsnap-eof.test.js +++ b/packages/xsnap/test/xsnap-eof.test.js @@ -198,7 +198,6 @@ const testInterruption = test.macro( */ async (t, beforeWait, onRequest, afterWait, verifyResults) => { const handleCommand = message => { - // eslint-disable-next-line no-use-before-define return onRequest(worker, message); }; const worker = await spawnReflectiveWorker(handleCommand); diff --git a/packages/zoe/src/contractSupport/prepare-ownable.js b/packages/zoe/src/contractSupport/prepare-ownable.js index 0f563056eb3..2c750c3c37b 100644 --- a/packages/zoe/src/contractSupport/prepare-ownable.js +++ b/packages/zoe/src/contractSupport/prepare-ownable.js @@ -62,7 +62,6 @@ export const prepareOwnable = ( const { underlying } = this.state; const { revocable } = this.facets; const customDetails = underlying.getInvitationCustomDetails(); - // eslint-disable-next-line no-use-before-define const transferHandler = makeTransferHandler(underlying); const invitation = makeInvitation( diff --git a/packages/zoe/src/contracts/priceAggregator.js b/packages/zoe/src/contracts/priceAggregator.js index 0a50a514c82..f3ee1c4de1d 100644 --- a/packages/zoe/src/contracts/priceAggregator.js +++ b/packages/zoe/src/contracts/priceAggregator.js @@ -152,7 +152,6 @@ const start = async (zcf, privateArgs) => { } if (!querierPs.length) { // Only have push results, so publish them. - // eslint-disable-next-line no-use-before-define querierPs.push(updateQuote(timestamp)); } await Promise.all(querierPs).catch(console.error); diff --git a/packages/zoe/src/contracts/simpleExchange.js b/packages/zoe/src/contracts/simpleExchange.js index 46915503549..79e910dab20 100644 --- a/packages/zoe/src/contracts/simpleExchange.js +++ b/packages/zoe/src/contracts/simpleExchange.js @@ -32,7 +32,6 @@ import { const start = zcf => { let sellSeats = []; let buySeats = []; - // eslint-disable-next-line no-use-before-define const { notifier, updater } = makeNotifierKit(getBookOrders()); assertIssuerKeywords(zcf, harden(['Asset', 'Price'])); diff --git a/packages/zoe/src/zoeService/startInstance.js b/packages/zoe/src/zoeService/startInstance.js index a0a1515f2a5..35bd0a718ce 100644 --- a/packages/zoe/src/zoeService/startInstance.js +++ b/packages/zoe/src/zoeService/startInstance.js @@ -85,7 +85,6 @@ export const makeStartInstance = ( onRejected: (/** @type {Error} */ reason, instanceAdmin, adminNode) => { if (isUpgradeDisconnection(reason)) { console.log(`resetting promise watcher after upgrade`, reason); - // eslint-disable-next-line no-use-before-define watchForAdminNodeDone(adminNode, instanceAdmin); } else { instanceAdmin.failAllSeats(reason); diff --git a/packages/zoe/src/zoeService/zoe.js b/packages/zoe/src/zoeService/zoe.js index 44990d6e4c1..e8983bdfb57 100644 --- a/packages/zoe/src/zoeService/zoe.js +++ b/packages/zoe/src/zoeService/zoe.js @@ -125,9 +125,7 @@ const makeDurableZoeKit = ({ name, vatParameters: { contractBundleCap, - // eslint-disable-next-line no-use-before-define zoeService, - // eslint-disable-next-line no-use-before-define invitationIssuer: invitationIssuerAccess.getInvitationIssuer(), }, }), diff --git a/packages/zoe/test/unitTests/zcf/zcf.test.js b/packages/zoe/test/unitTests/zcf/zcf.test.js index 828d3757325..216d3eded6b 100644 --- a/packages/zoe/test/unitTests/zcf/zcf.test.js +++ b/packages/zoe/test/unitTests/zcf/zcf.test.js @@ -200,7 +200,6 @@ test(`zcf.saveIssuer - bad issuer`, async t => { test(`zcf.saveIssuer - bad issuer, makeEmptyPurse throws`, async t => { const { zcf } = await setupZCFTest(); const brand = Far('brand', { - // eslint-disable-next-line no-use-before-define isMyIssuer: i => i === badIssuer, getDisplayInfo: () => ({ decimalPlaces: 6, assetKind: AssetKind.NAT }), }); diff --git a/packages/zoe/test/unitTests/zoe-startInstance.test.js b/packages/zoe/test/unitTests/zoe-startInstance.test.js index 552b0cdf41f..61e6f0a4794 100644 --- a/packages/zoe/test/unitTests/zoe-startInstance.test.js +++ b/packages/zoe/test/unitTests/zoe-startInstance.test.js @@ -115,7 +115,6 @@ test('bad issuer, makeEmptyPurse throws', async t => { const { zoe } = setup(); const installation = await E(zoe).installBundleID('b1-contract'); const brand = Far('brand', { - // eslint-disable-next-line no-use-before-define isMyIssuer: i => i === badIssuer, getDisplayInfo: () => ({ decimalPlaces: 6, assetKind: AssetKind.NAT }), }); diff --git a/packages/zone/src/durable.js b/packages/zone/src/durable.js index 8f9461e489b..b0feedd98dc 100644 --- a/packages/zone/src/durable.js +++ b/packages/zone/src/durable.js @@ -50,7 +50,6 @@ const attachDurableStores = getBaggage => { /** @type {import('.').Stores} */ return Far('durableStores', { - // eslint-disable-next-line no-use-before-define detached: () => detachedDurableStores, isStorable, mapStore,