From 2e28a67f5b2da518ec7a0e80495a109a516c3ef1 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 15 Aug 2023 11:37:15 -0400 Subject: [PATCH 1/3] ci(lint): always lint types / no-floating-promises --- .eslintrc.cjs | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index bd2c0c7da2e..86f4433aa64 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,8 +1,5 @@ /* eslint-disable no-restricted-syntax */ /* eslint-env node */ -const process = require('process'); - -const lintTypes = !!process.env.AGORIC_ESLINT_TYPES; const deprecatedForLoanContract = [ ['currency', 'brand, asset or another descriptor'], @@ -34,26 +31,24 @@ const deprecatedTerminology = Object.fromEntries( module.exports = { root: true, parser: '@typescript-eslint/parser', - parserOptions: lintTypes - ? { - // this is not yet compatible with eslint lsp so it's conditioned on AGORIC_ESLINT_TYPES - EXPERIMENTAL_useProjectService: true, - sourceType: 'module', - project: [ - './packages/*/tsconfig.json', - './packages/*/tsconfig.json', - './packages/wallet/*/tsconfig.json', - './tsconfig.json', - ], - tsconfigRootDir: __dirname, - extraFileExtensions: ['.cjs'], - } - : undefined, + parserOptions: { + // this is not yet compatible with eslint lsp so it's conditioned on AGORIC_ESLINT_TYPES + EXPERIMENTAL_useProjectService: true, + sourceType: 'module', + project: [ + './packages/*/tsconfig.json', + './packages/*/tsconfig.json', + './packages/wallet/*/tsconfig.json', + './tsconfig.json', + ], + tsconfigRootDir: __dirname, + extraFileExtensions: ['.cjs'], + }, plugins: ['@typescript-eslint', 'prettier'], extends: ['@agoric'], rules: { '@typescript-eslint/prefer-ts-expect-error': 'warn', - '@typescript-eslint/no-floating-promises': lintTypes ? 'warn' : 'off', + '@typescript-eslint/no-floating-promises': 'warn', // so that floating-promises can be explicitly permitted with void operator 'no-void': ['error', { allowAsStatement: true }], From 00651854a6890fdddce9ff29c62986b0b549072c Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 15 Aug 2023 11:46:26 -0400 Subject: [PATCH 2/3] ci(lint): error on floating promises --- .eslintrc.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 86f4433aa64..3780afb480a 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -48,7 +48,7 @@ module.exports = { extends: ['@agoric'], rules: { '@typescript-eslint/prefer-ts-expect-error': 'warn', - '@typescript-eslint/no-floating-promises': 'warn', + '@typescript-eslint/no-floating-promises': 'error', // so that floating-promises can be explicitly permitted with void operator 'no-void': ['error', { allowAsStatement: true }], From 49299d1db018074bfdaed210f0853c530dc0e5ce Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 15 Aug 2023 11:47:02 -0400 Subject: [PATCH 3/3] ci(lint): loosen no-floating-promises where failing --- packages/SwingSet/misc-tools/extract-xs-snapshot.js | 1 + packages/SwingSet/test/test-vat-timer.js | 1 + packages/SwingSet/test/transcript/test-state-sync-reload.js | 1 + packages/SwingSet/test/transcript/test-transcript-entries.js | 1 + packages/agoric-cli/src/bin-agops.js | 1 + packages/agoric-cli/src/start.js | 1 + packages/boot/test/bootstrapTests/test-vaults-integration.js | 1 + packages/boot/test/bootstrapTests/test-zcf-upgrade.js | 1 + packages/cosmic-swingset/scripts/clean-core-eval.js | 1 + packages/governance/src/binaryVoteCounter.js | 1 + packages/governance/src/contractGovernance/paramManager.js | 1 + packages/governance/src/multiCandidateVoteCounter.js | 1 + packages/governance/test/unitTests/test-binaryballotCount.js | 1 + .../governance/test/unitTests/test-multiCandidateBallotCount.js | 1 + .../governance/test/unitTests/test-puppetContractGovernor.js | 1 + packages/internal/src/queue.js | 1 + packages/pegasus/src/proposals/core-proposal.js | 1 + packages/pegasus/test/test-peg.js | 1 + packages/smart-wallet/test/gameAssetContract.js | 1 + packages/smart-wallet/test/test-addAsset.js | 1 + packages/solo/public/main.js | 1 + packages/solo/src/captp.js | 1 + packages/solo/src/chain-cosmos-sdk.js | 1 + packages/solo/src/vat-http.js | 1 + packages/solo/test/captp-fixture.js | 1 + packages/swingset-liveslots/src/liveslots.js | 1 + packages/wallet/api/src/lib-wallet.js | 1 + packages/wallet/api/src/wallet.js | 1 + packages/wallet/api/test/test-lib-wallet.js | 1 + packages/xsnap/src/avaXS.js | 1 + packages/xsnap/src/xsnap.js | 1 + packages/xsnap/src/xsrepl.js | 1 + packages/xsnap/test/fixture-xsnap-script.js | 1 + packages/zoe/src/contractFacet/zcfMint.js | 1 + packages/zoe/src/contractFacet/zcfSeat.js | 1 + packages/zoe/src/contractFacet/zcfZygote.js | 1 + packages/zoe/src/contractSupport/priceAuthority.js | 1 + packages/zoe/src/contractSupport/priceAuthorityInitial.js | 1 + packages/zoe/src/contractSupport/zoeHelpers.js | 1 + packages/zoe/src/contracts/auction/index.js | 1 + packages/zoe/src/contracts/callSpread/payoffHandler.js | 1 + packages/zoe/src/contracts/callSpread/pricedCallSpread.js | 1 + packages/zoe/src/contracts/oracle.js | 1 + packages/zoe/src/contracts/priceAggregator.js | 1 + packages/zoe/src/contracts/sellItems.js | 1 + packages/zoe/src/zoeService/instanceAdminStorage.js | 1 + packages/zoe/src/zoeService/startInstance.js | 1 + packages/zoe/src/zoeService/zoe.js | 1 + packages/zoe/src/zoeService/zoeSeat.js | 1 + packages/zoe/test/swingsetTests/brokenContracts/vat-alice.js | 1 + packages/zoe/test/types.test-d.ts | 1 + packages/zoe/test/unitTests/contracts/loan/helpers.js | 1 + packages/zoe/test/unitTests/contracts/loan/test-borrow.js | 1 + packages/zoe/test/unitTests/contracts/test-atomicSwap.js | 1 + packages/zoe/test/unitTests/contracts/test-coveredCall.js | 1 + packages/zoe/test/unitTests/contracts/test-priceAggregator.js | 1 + packages/zoe/test/unitTests/test-fakePriceAuthority.js | 1 + packages/zoe/test/unitTests/test-manualTimer.js | 1 + packages/zoe/test/unitTests/zcf/test-zcf.js | 1 + packages/zoe/test/unitTests/zoe/test-escrowStorage.js | 1 + packages/zoe/test/unitTests/zoe/test-instanceAdminStorage.js | 1 + packages/zoe/tools/manualPriceAuthority.js | 1 + packages/zoe/tools/scriptedPriceAuthority.js | 1 + 63 files changed, 63 insertions(+) diff --git a/packages/SwingSet/misc-tools/extract-xs-snapshot.js b/packages/SwingSet/misc-tools/extract-xs-snapshot.js index d9a429ef008..75fde252762 100644 --- a/packages/SwingSet/misc-tools/extract-xs-snapshot.js +++ b/packages/SwingSet/misc-tools/extract-xs-snapshot.js @@ -1,4 +1,5 @@ // @ts-nocheck +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import '@endo/init'; import process from 'process'; diff --git a/packages/SwingSet/test/test-vat-timer.js b/packages/SwingSet/test/test-vat-timer.js index d6cec15ca1c..d5d6d2f37f1 100644 --- a/packages/SwingSet/test/test-vat-timer.js +++ b/packages/SwingSet/test/test-vat-timer.js @@ -1,4 +1,5 @@ // @ts-nocheck +/* eslint @typescript-eslint/no-floating-promises: "warn" */ // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/transcript/test-state-sync-reload.js b/packages/SwingSet/test/transcript/test-state-sync-reload.js index bda9a9b233b..f42336e591e 100644 --- a/packages/SwingSet/test/transcript/test-state-sync-reload.js +++ b/packages/SwingSet/test/transcript/test-state-sync-reload.js @@ -1,4 +1,5 @@ // @ts-nocheck +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import test from 'ava'; import '@endo/init/debug.js'; import tmp from 'tmp'; diff --git a/packages/SwingSet/test/transcript/test-transcript-entries.js b/packages/SwingSet/test/transcript/test-transcript-entries.js index e06ccf141ce..42d15c5a43c 100644 --- a/packages/SwingSet/test/transcript/test-transcript-entries.js +++ b/packages/SwingSet/test/transcript/test-transcript-entries.js @@ -1,4 +1,5 @@ // @ts-nocheck +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import test from 'ava'; import '@endo/init/debug.js'; import { initSwingStore } from '@agoric/swing-store'; diff --git a/packages/agoric-cli/src/bin-agops.js b/packages/agoric-cli/src/bin-agops.js index ef432d7a3b0..daeaf9c0e6f 100755 --- a/packages/agoric-cli/src/bin-agops.js +++ b/packages/agoric-cli/src/bin-agops.js @@ -1,6 +1,7 @@ #!/usr/bin/env node // @ts-check // @jessie-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /* global fetch, setTimeout */ diff --git a/packages/agoric-cli/src/start.js b/packages/agoric-cli/src/start.js index d7062852481..c886ea8730e 100644 --- a/packages/agoric-cli/src/start.js +++ b/packages/agoric-cli/src/start.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /* global process setTimeout */ import chalk from 'chalk'; import { createHash } from 'crypto'; diff --git a/packages/boot/test/bootstrapTests/test-vaults-integration.js b/packages/boot/test/bootstrapTests/test-vaults-integration.js index 2fbc89aa893..3263f6a1f97 100644 --- a/packages/boot/test/bootstrapTests/test-vaults-integration.js +++ b/packages/boot/test/bootstrapTests/test-vaults-integration.js @@ -1,4 +1,5 @@ // @ts-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /** @file Bootstrap test integration vaults with smart-wallet */ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; diff --git a/packages/boot/test/bootstrapTests/test-zcf-upgrade.js b/packages/boot/test/bootstrapTests/test-zcf-upgrade.js index 2743033039c..669e8a0d5c2 100644 --- a/packages/boot/test/bootstrapTests/test-zcf-upgrade.js +++ b/packages/boot/test/bootstrapTests/test-zcf-upgrade.js @@ -1,4 +1,5 @@ // @ts-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import bundleSource from '@endo/bundle-source'; diff --git a/packages/cosmic-swingset/scripts/clean-core-eval.js b/packages/cosmic-swingset/scripts/clean-core-eval.js index 9e143bcc631..5cd036e3cf3 100755 --- a/packages/cosmic-swingset/scripts/clean-core-eval.js +++ b/packages/cosmic-swingset/scripts/clean-core-eval.js @@ -1,4 +1,5 @@ #! /usr/bin/env node +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import '@endo/init/debug.js'; import * as farExports from '@endo/far'; import { isEntrypoint } from '../src/helpers/is-entrypoint.js'; diff --git a/packages/governance/src/binaryVoteCounter.js b/packages/governance/src/binaryVoteCounter.js index eabba95e4e3..ad0452907db 100644 --- a/packages/governance/src/binaryVoteCounter.js +++ b/packages/governance/src/binaryVoteCounter.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { makePromiseKit } from '@endo/promise-kit'; import { makeExo, keyEQ, makeScalarMapStore } from '@agoric/store'; import { E } from '@endo/eventual-send'; diff --git a/packages/governance/src/contractGovernance/paramManager.js b/packages/governance/src/contractGovernance/paramManager.js index 7fed436057e..feb03aca466 100644 --- a/packages/governance/src/contractGovernance/paramManager.js +++ b/packages/governance/src/contractGovernance/paramManager.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { Far, passStyleOf } from '@endo/marshal'; import { AmountMath } from '@agoric/ertp'; import { assertKeywordName } from '@agoric/zoe/src/cleanProposal.js'; diff --git a/packages/governance/src/multiCandidateVoteCounter.js b/packages/governance/src/multiCandidateVoteCounter.js index d4fd213bcf7..d7615e41f4e 100644 --- a/packages/governance/src/multiCandidateVoteCounter.js +++ b/packages/governance/src/multiCandidateVoteCounter.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { keyEQ, makeExo, makeScalarMapStore } from '@agoric/store'; import { E } from '@endo/eventual-send'; import { makePromiseKit } from '@endo/promise-kit'; diff --git a/packages/governance/test/unitTests/test-binaryballotCount.js b/packages/governance/test/unitTests/test-binaryballotCount.js index e8923461121..7e8197e1721 100644 --- a/packages/governance/test/unitTests/test-binaryballotCount.js +++ b/packages/governance/test/unitTests/test-binaryballotCount.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import '@agoric/zoe/exported.js'; import { E } from '@endo/eventual-send'; diff --git a/packages/governance/test/unitTests/test-multiCandidateBallotCount.js b/packages/governance/test/unitTests/test-multiCandidateBallotCount.js index af9ef64aef2..b63f514aaff 100644 --- a/packages/governance/test/unitTests/test-multiCandidateBallotCount.js +++ b/packages/governance/test/unitTests/test-multiCandidateBallotCount.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { makeStoredPublishKit } from '@agoric/notifier'; import { diff --git a/packages/governance/test/unitTests/test-puppetContractGovernor.js b/packages/governance/test/unitTests/test-puppetContractGovernor.js index 173523739f3..64d1faea5ff 100644 --- a/packages/governance/test/unitTests/test-puppetContractGovernor.js +++ b/packages/governance/test/unitTests/test-puppetContractGovernor.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { makeNotifierFromAsyncIterable } from '@agoric/notifier'; diff --git a/packages/internal/src/queue.js b/packages/internal/src/queue.js index a522ae68d86..fbff279c890 100644 --- a/packages/internal/src/queue.js +++ b/packages/internal/src/queue.js @@ -1,4 +1,5 @@ // @jessie-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { makePromiseKit } from '@endo/promise-kit'; diff --git a/packages/pegasus/src/proposals/core-proposal.js b/packages/pegasus/src/proposals/core-proposal.js index e0d07d69b72..d1f97aa69fa 100644 --- a/packages/pegasus/src/proposals/core-proposal.js +++ b/packages/pegasus/src/proposals/core-proposal.js @@ -1,4 +1,5 @@ // @ts-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { E, Far } from '@endo/far'; import { makeNameHubKit } from '@agoric/vats/src/nameHub.js'; import { observeIteration, subscribeEach } from '@agoric/notifier'; diff --git a/packages/pegasus/test/test-peg.js b/packages/pegasus/test/test-peg.js index a52971c670e..fed60c34708 100644 --- a/packages/pegasus/test/test-peg.js +++ b/packages/pegasus/test/test-peg.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; import path from 'path'; diff --git a/packages/smart-wallet/test/gameAssetContract.js b/packages/smart-wallet/test/gameAssetContract.js index 280a4104d09..a8a21d7394f 100644 --- a/packages/smart-wallet/test/gameAssetContract.js +++ b/packages/smart-wallet/test/gameAssetContract.js @@ -1,4 +1,5 @@ /** @file illustrates using non-vbank assets */ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ // deep import to avoid dependency on all of ERTP, vat-data import { AmountShape } from '@agoric/ertp'; diff --git a/packages/smart-wallet/test/test-addAsset.js b/packages/smart-wallet/test/test-addAsset.js index 972fd094939..382ebb86348 100644 --- a/packages/smart-wallet/test/test-addAsset.js +++ b/packages/smart-wallet/test/test-addAsset.js @@ -1,4 +1,5 @@ // @ts-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { E, Far } from '@endo/far'; import { buildRootObject as buildBankVatRoot } from '@agoric/vats/src/vat-bank.js'; diff --git a/packages/solo/public/main.js b/packages/solo/public/main.js index 406918fb27d..291740ffb3b 100644 --- a/packages/solo/public/main.js +++ b/packages/solo/public/main.js @@ -1,4 +1,5 @@ /* global setTimeout */ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ // NOTE: Runs outside SES /* global WebSocket fetch document window walletFrame localStorage */ diff --git a/packages/solo/src/captp.js b/packages/solo/src/captp.js index bc8dbc078ed..d949a327331 100644 --- a/packages/solo/src/captp.js +++ b/packages/solo/src/captp.js @@ -1,4 +1,5 @@ // @ts-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { E, makeCapTP } from '@endo/captp'; import { Far } from '@endo/marshal'; diff --git a/packages/solo/src/chain-cosmos-sdk.js b/packages/solo/src/chain-cosmos-sdk.js index db2c4bda5b9..c6b287aa360 100644 --- a/packages/solo/src/chain-cosmos-sdk.js +++ b/packages/solo/src/chain-cosmos-sdk.js @@ -1,4 +1,5 @@ /* global clearTimeout setTimeout Buffer */ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import path from 'path'; import fs from 'fs'; import url from 'url'; diff --git a/packages/solo/src/vat-http.js b/packages/solo/src/vat-http.js index c78787f9b40..58fb4d29fa4 100644 --- a/packages/solo/src/vat-http.js +++ b/packages/solo/src/vat-http.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { makeNotifierKit } from '@agoric/notifier'; import { makeCache } from '@agoric/cache'; import { E } from '@endo/eventual-send'; diff --git a/packages/solo/test/captp-fixture.js b/packages/solo/test/captp-fixture.js index dcef91102b0..999d87081b4 100644 --- a/packages/solo/test/captp-fixture.js +++ b/packages/solo/test/captp-fixture.js @@ -1,4 +1,5 @@ /* global process setTimeout */ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { spawn } from 'child_process'; import WebSocket from 'ws'; import { makeCapTP, E } from '@endo/captp'; diff --git a/packages/swingset-liveslots/src/liveslots.js b/packages/swingset-liveslots/src/liveslots.js index 9caea6515b7..a6d6a7fe849 100644 --- a/packages/swingset-liveslots/src/liveslots.js +++ b/packages/swingset-liveslots/src/liveslots.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { Remotable, passStyleOf, diff --git a/packages/wallet/api/src/lib-wallet.js b/packages/wallet/api/src/lib-wallet.js index 9b95d06a5a3..e25970675b5 100644 --- a/packages/wallet/api/src/lib-wallet.js +++ b/packages/wallet/api/src/lib-wallet.js @@ -1,4 +1,5 @@ // @ts-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /** * This file defines the wallet internals without dependency on the ag-solo on diff --git a/packages/wallet/api/src/wallet.js b/packages/wallet/api/src/wallet.js index 46fa264ef87..bd2c8e64e7a 100644 --- a/packages/wallet/api/src/wallet.js +++ b/packages/wallet/api/src/wallet.js @@ -1,4 +1,5 @@ // @ts-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /** * This file defines the vat launched by the spawner in the ../deploy.js script. diff --git a/packages/wallet/api/test/test-lib-wallet.js b/packages/wallet/api/test/test-lib-wallet.js index 7bf3569a0ce..075e8be01a1 100644 --- a/packages/wallet/api/test/test-lib-wallet.js +++ b/packages/wallet/api/test/test-lib-wallet.js @@ -1,4 +1,5 @@ // @ts-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import bundleSource from '@endo/bundle-source'; diff --git a/packages/xsnap/src/avaXS.js b/packages/xsnap/src/avaXS.js index fd3986bf6ef..90fe10143f5 100644 --- a/packages/xsnap/src/avaXS.js +++ b/packages/xsnap/src/avaXS.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /* avaXS - ava style test runner for XS Usage: diff --git a/packages/xsnap/src/xsnap.js b/packages/xsnap/src/xsnap.js index 89427858c45..5d605d581f2 100644 --- a/packages/xsnap/src/xsnap.js +++ b/packages/xsnap/src/xsnap.js @@ -1,4 +1,5 @@ /* global process */ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /* eslint no-await-in-loop: ["off"] */ /** diff --git a/packages/xsnap/src/xsrepl.js b/packages/xsnap/src/xsrepl.js index 399401e334a..0f2e5b6f7b7 100755 --- a/packages/xsnap/src/xsrepl.js +++ b/packages/xsnap/src/xsrepl.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /* global process */ /* We make exceptions for test code. This is a test utility. */ /* eslint no-await-in-loop: ["off"] */ diff --git a/packages/xsnap/test/fixture-xsnap-script.js b/packages/xsnap/test/fixture-xsnap-script.js index d2e811f8e92..170883f397e 100644 --- a/packages/xsnap/test/fixture-xsnap-script.js +++ b/packages/xsnap/test/fixture-xsnap-script.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /* global issueCommand */ (async () => { issueCommand(new TextEncoder().encode('Hello, World!').buffer); diff --git a/packages/zoe/src/contractFacet/zcfMint.js b/packages/zoe/src/contractFacet/zcfMint.js index 2d9155a28eb..1a3a71e0305 100644 --- a/packages/zoe/src/contractFacet/zcfMint.js +++ b/packages/zoe/src/contractFacet/zcfMint.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { AmountMath } from '@agoric/ertp'; import { prepareExoClass } from '@agoric/vat-data'; import { E } from '@endo/eventual-send'; diff --git a/packages/zoe/src/contractFacet/zcfSeat.js b/packages/zoe/src/contractFacet/zcfSeat.js index 006ea2840cb..2ba5f7e4796 100644 --- a/packages/zoe/src/contractFacet/zcfSeat.js +++ b/packages/zoe/src/contractFacet/zcfSeat.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { makeScalarBigWeakMapStore, prepareExoClass, diff --git a/packages/zoe/src/contractFacet/zcfZygote.js b/packages/zoe/src/contractFacet/zcfZygote.js index b54b3bf51fd..c643596a0e9 100644 --- a/packages/zoe/src/contractFacet/zcfZygote.js +++ b/packages/zoe/src/contractFacet/zcfZygote.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { AssetKind } from '@agoric/ertp'; import { assertPattern, mustMatch } from '@agoric/store'; import { diff --git a/packages/zoe/src/contractSupport/priceAuthority.js b/packages/zoe/src/contractSupport/priceAuthority.js index ce752811081..c1e8fd58050 100644 --- a/packages/zoe/src/contractSupport/priceAuthority.js +++ b/packages/zoe/src/contractSupport/priceAuthority.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /// import { E } from '@endo/eventual-send'; diff --git a/packages/zoe/src/contractSupport/priceAuthorityInitial.js b/packages/zoe/src/contractSupport/priceAuthorityInitial.js index e41734877f8..9c1178f61c3 100644 --- a/packages/zoe/src/contractSupport/priceAuthorityInitial.js +++ b/packages/zoe/src/contractSupport/priceAuthorityInitial.js @@ -1,5 +1,6 @@ // @ts-check // @jessie-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { E } from '@endo/far'; import { Far } from '@endo/marshal'; diff --git a/packages/zoe/src/contractSupport/zoeHelpers.js b/packages/zoe/src/contractSupport/zoeHelpers.js index 2287395c33f..01c38791321 100644 --- a/packages/zoe/src/contractSupport/zoeHelpers.js +++ b/packages/zoe/src/contractSupport/zoeHelpers.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { mustMatch, keyEQ } from '@agoric/store'; import { E } from '@endo/eventual-send'; import { makePromiseKit } from '@endo/promise-kit'; diff --git a/packages/zoe/src/contracts/auction/index.js b/packages/zoe/src/contracts/auction/index.js index 1b0f2865a7c..0f7d89ef4b4 100644 --- a/packages/zoe/src/contracts/auction/index.js +++ b/packages/zoe/src/contracts/auction/index.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { E } from '@endo/eventual-send'; import { mustMatch } from '@endo/patterns'; import { Far } from '@endo/marshal'; diff --git a/packages/zoe/src/contracts/callSpread/payoffHandler.js b/packages/zoe/src/contracts/callSpread/payoffHandler.js index 6b1f755ed50..0dafefd668b 100644 --- a/packages/zoe/src/contracts/callSpread/payoffHandler.js +++ b/packages/zoe/src/contracts/callSpread/payoffHandler.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import './types.js'; import { E } from '@endo/eventual-send'; diff --git a/packages/zoe/src/contracts/callSpread/pricedCallSpread.js b/packages/zoe/src/contracts/callSpread/pricedCallSpread.js index 9b06e16fd25..48c874a6f63 100644 --- a/packages/zoe/src/contracts/callSpread/pricedCallSpread.js +++ b/packages/zoe/src/contracts/callSpread/pricedCallSpread.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import './types.js'; import { makePromiseKit } from '@endo/promise-kit'; diff --git a/packages/zoe/src/contracts/oracle.js b/packages/zoe/src/contracts/oracle.js index c540b348a3f..e7efd817506 100644 --- a/packages/zoe/src/contracts/oracle.js +++ b/packages/zoe/src/contracts/oracle.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { assert, Fail } from '@agoric/assert'; import { Far } from '@endo/marshal'; import { AmountMath } from '@agoric/ertp'; diff --git a/packages/zoe/src/contracts/priceAggregator.js b/packages/zoe/src/contracts/priceAggregator.js index 9357d24fe2b..6b58fc1dc85 100644 --- a/packages/zoe/src/contracts/priceAggregator.js +++ b/packages/zoe/src/contracts/priceAggregator.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /// import { Fail, q } from '@agoric/assert'; diff --git a/packages/zoe/src/contracts/sellItems.js b/packages/zoe/src/contracts/sellItems.js index 7ec99d2da9b..5aa7a757409 100644 --- a/packages/zoe/src/contracts/sellItems.js +++ b/packages/zoe/src/contracts/sellItems.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { Far } from '@endo/marshal'; import { Nat } from '@endo/nat'; import { AmountMath } from '@agoric/ertp'; diff --git a/packages/zoe/src/zoeService/instanceAdminStorage.js b/packages/zoe/src/zoeService/instanceAdminStorage.js index 961cf05f97f..ab6b9da38e4 100644 --- a/packages/zoe/src/zoeService/instanceAdminStorage.js +++ b/packages/zoe/src/zoeService/instanceAdminStorage.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { canBeDurable, makeScalarBigSetStore, diff --git a/packages/zoe/src/zoeService/startInstance.js b/packages/zoe/src/zoeService/startInstance.js index fb1eb213413..7f977fcd214 100644 --- a/packages/zoe/src/zoeService/startInstance.js +++ b/packages/zoe/src/zoeService/startInstance.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { E } from '@endo/eventual-send'; import { passStyleOf } from '@endo/marshal'; import { diff --git a/packages/zoe/src/zoeService/zoe.js b/packages/zoe/src/zoeService/zoe.js index d28dc9192de..19ea2125993 100644 --- a/packages/zoe/src/zoeService/zoe.js +++ b/packages/zoe/src/zoeService/zoe.js @@ -1,4 +1,5 @@ // @jessie-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /** * Zoe uses ERTP, the Electronic Rights Transfer Protocol diff --git a/packages/zoe/src/zoeService/zoeSeat.js b/packages/zoe/src/zoeService/zoeSeat.js index 2462440d97e..f58200e164e 100644 --- a/packages/zoe/src/zoeService/zoeSeat.js +++ b/packages/zoe/src/zoeService/zoeSeat.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { prepareDurablePublishKit, SubscriberShape } from '@agoric/notifier'; import { E } from '@endo/eventual-send'; import { M, prepareExoClassKit } from '@agoric/vat-data'; diff --git a/packages/zoe/test/swingsetTests/brokenContracts/vat-alice.js b/packages/zoe/test/swingsetTests/brokenContracts/vat-alice.js index 309cfa87f52..da1a5ee3737 100644 --- a/packages/zoe/test/swingsetTests/brokenContracts/vat-alice.js +++ b/packages/zoe/test/swingsetTests/brokenContracts/vat-alice.js @@ -1,4 +1,5 @@ // @ts-nocheck +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { E } from '@endo/eventual-send'; import { Far } from '@endo/marshal'; diff --git a/packages/zoe/test/types.test-d.ts b/packages/zoe/test/types.test-d.ts index ead6e3ce3ae..348277ad2bb 100644 --- a/packages/zoe/test/types.test-d.ts +++ b/packages/zoe/test/types.test-d.ts @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ /** * @file uses .ts syntax to be able to declare types (e.g. of kit.creatorFacet as {}) * because "there is no JavaScript syntax for passing a a type argument" diff --git a/packages/zoe/test/unitTests/contracts/loan/helpers.js b/packages/zoe/test/unitTests/contracts/loan/helpers.js index a60f07b9254..44ee27ff284 100644 --- a/packages/zoe/test/unitTests/contracts/loan/helpers.js +++ b/packages/zoe/test/unitTests/contracts/loan/helpers.js @@ -1,4 +1,5 @@ // @ts-nocheck +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import '@agoric/swingset-liveslots/tools/prepare-test-env.js'; import path from 'path'; diff --git a/packages/zoe/test/unitTests/contracts/loan/test-borrow.js b/packages/zoe/test/unitTests/contracts/loan/test-borrow.js index f00f472beac..8b08bc9db38 100644 --- a/packages/zoe/test/unitTests/contracts/loan/test-borrow.js +++ b/packages/zoe/test/unitTests/contracts/loan/test-borrow.js @@ -1,4 +1,5 @@ // @ts-nocheck +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; import '../../../../exported.js'; diff --git a/packages/zoe/test/unitTests/contracts/test-atomicSwap.js b/packages/zoe/test/unitTests/contracts/test-atomicSwap.js index 6d182638898..dd72fb4750c 100644 --- a/packages/zoe/test/unitTests/contracts/test-atomicSwap.js +++ b/packages/zoe/test/unitTests/contracts/test-atomicSwap.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; import path from 'path'; diff --git a/packages/zoe/test/unitTests/contracts/test-coveredCall.js b/packages/zoe/test/unitTests/contracts/test-coveredCall.js index e650a27c83a..7d72d1d4b4d 100644 --- a/packages/zoe/test/unitTests/contracts/test-coveredCall.js +++ b/packages/zoe/test/unitTests/contracts/test-coveredCall.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; import path from 'path'; diff --git a/packages/zoe/test/unitTests/contracts/test-priceAggregator.js b/packages/zoe/test/unitTests/contracts/test-priceAggregator.js index 63900683221..540c9b4c7c0 100644 --- a/packages/zoe/test/unitTests/contracts/test-priceAggregator.js +++ b/packages/zoe/test/unitTests/contracts/test-priceAggregator.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test as unknownTest } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; import path from 'path'; diff --git a/packages/zoe/test/unitTests/test-fakePriceAuthority.js b/packages/zoe/test/unitTests/test-fakePriceAuthority.js index c84ccf80e8a..1f24594e29b 100644 --- a/packages/zoe/test/unitTests/test-fakePriceAuthority.js +++ b/packages/zoe/test/unitTests/test-fakePriceAuthority.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; import { E } from '@endo/eventual-send'; diff --git a/packages/zoe/test/unitTests/test-manualTimer.js b/packages/zoe/test/unitTests/test-manualTimer.js index 486c6d6ac28..9ed76e880df 100644 --- a/packages/zoe/test/unitTests/test-manualTimer.js +++ b/packages/zoe/test/unitTests/test-manualTimer.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; import { E } from '@endo/eventual-send'; diff --git a/packages/zoe/test/unitTests/zcf/test-zcf.js b/packages/zoe/test/unitTests/zcf/test-zcf.js index e4f77c55946..89b32677911 100644 --- a/packages/zoe/test/unitTests/zcf/test-zcf.js +++ b/packages/zoe/test/unitTests/zcf/test-zcf.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; import { Far } from '@endo/marshal'; diff --git a/packages/zoe/test/unitTests/zoe/test-escrowStorage.js b/packages/zoe/test/unitTests/zoe/test-escrowStorage.js index e412a2513a6..46c36d2147c 100644 --- a/packages/zoe/test/unitTests/zoe/test-escrowStorage.js +++ b/packages/zoe/test/unitTests/zoe/test-escrowStorage.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; import { AmountMath, makeIssuerKit, AssetKind } from '@agoric/ertp'; diff --git a/packages/zoe/test/unitTests/zoe/test-instanceAdminStorage.js b/packages/zoe/test/unitTests/zoe/test-instanceAdminStorage.js index 1d421cd7488..33cbfacab01 100644 --- a/packages/zoe/test/unitTests/zoe/test-instanceAdminStorage.js +++ b/packages/zoe/test/unitTests/zoe/test-instanceAdminStorage.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; import { Far } from '@endo/marshal'; diff --git a/packages/zoe/tools/manualPriceAuthority.js b/packages/zoe/tools/manualPriceAuthority.js index 1ec0b3e9085..b0dbcd6d08f 100644 --- a/packages/zoe/tools/manualPriceAuthority.js +++ b/packages/zoe/tools/manualPriceAuthority.js @@ -1,4 +1,5 @@ // @jessie-check +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { AmountMath, makeIssuerKit, AssetKind } from '@agoric/ertp'; import { E } from '@endo/eventual-send'; diff --git a/packages/zoe/tools/scriptedPriceAuthority.js b/packages/zoe/tools/scriptedPriceAuthority.js index 5edbf3d85b3..98204075cde 100644 --- a/packages/zoe/tools/scriptedPriceAuthority.js +++ b/packages/zoe/tools/scriptedPriceAuthority.js @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/no-floating-promises: "warn" */ import { AmountMath, makeIssuerKit, AssetKind } from '@agoric/ertp'; import { E } from '@endo/eventual-send'; import { Far } from '@endo/marshal';