From 4b65032b899e29c8431278f1b1cecd0653012ba2 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 28 Jan 2023 07:37:00 -0800 Subject: [PATCH 1/2] style(lint): remove no-continue suppressions --- .../SwingSet/misc-tools/extract-contract-from-transcript.js | 1 - .../SwingSet/misc-tools/extract-transcript-from-slogfile.js | 1 - packages/SwingSet/misc-tools/extract-vat-from-transcript.js | 1 - packages/SwingSet/src/liveslots/collectionManager.js | 1 - packages/casting/src/follower-cosmjs.js | 2 +- packages/cosmic-swingset/src/kernel-stats.js | 1 - packages/deployment/scripts/crunch.mjs | 1 - packages/deployment/src/init.js | 4 +--- packages/deployment/src/main.js | 2 -- packages/solo/src/outbound.js | 2 +- packages/swingset-runner/src/push-metrics.js | 1 - packages/telemetry/src/frcat-entrypoint.js | 1 - packages/vats/src/authorityViz.js | 1 - packages/xsnap/src/avaXS.js | 3 +-- packages/xsnap/src/object-inspect.js | 2 -- 15 files changed, 4 insertions(+), 20 deletions(-) diff --git a/packages/SwingSet/misc-tools/extract-contract-from-transcript.js b/packages/SwingSet/misc-tools/extract-contract-from-transcript.js index 85bd3cb0f1f..944800672cd 100644 --- a/packages/SwingSet/misc-tools/extract-contract-from-transcript.js +++ b/packages/SwingSet/misc-tools/extract-contract-from-transcript.js @@ -1,4 +1,3 @@ -/* eslint-disable no-continue */ import fs from 'fs'; import zlib from 'zlib'; import readline from 'readline'; diff --git a/packages/SwingSet/misc-tools/extract-transcript-from-slogfile.js b/packages/SwingSet/misc-tools/extract-transcript-from-slogfile.js index abdae8ad907..b3441174d6c 100644 --- a/packages/SwingSet/misc-tools/extract-transcript-from-slogfile.js +++ b/packages/SwingSet/misc-tools/extract-transcript-from-slogfile.js @@ -26,7 +26,6 @@ async function run() { // lineNumber += 1; const e = JSON.parse(line); if (e.vatID !== vatID) { - // eslint-disable-next-line no-continue continue; // wrong vat, or not associated with any vat } console.log(`e:`, e.type); diff --git a/packages/SwingSet/misc-tools/extract-vat-from-transcript.js b/packages/SwingSet/misc-tools/extract-vat-from-transcript.js index 23c72f5ff7f..3ac48703f5d 100644 --- a/packages/SwingSet/misc-tools/extract-vat-from-transcript.js +++ b/packages/SwingSet/misc-tools/extract-vat-from-transcript.js @@ -1,4 +1,3 @@ -/* eslint-disable no-continue */ import fs from 'fs'; import zlib from 'zlib'; import readline from 'readline'; diff --git a/packages/SwingSet/src/liveslots/collectionManager.js b/packages/SwingSet/src/liveslots/collectionManager.js index 486bbfb9e72..c6e32b81e42 100644 --- a/packages/SwingSet/src/liveslots/collectionManager.js +++ b/packages/SwingSet/src/liveslots/collectionManager.js @@ -1,4 +1,3 @@ -/* eslint-disable no-continue */ import { assert, details as X, q, Fail } from '@agoric/assert'; import { zeroPad, diff --git a/packages/casting/src/follower-cosmjs.js b/packages/casting/src/follower-cosmjs.js index 46d0e094f34..692741f66b3 100644 --- a/packages/casting/src/follower-cosmjs.js +++ b/packages/casting/src/follower-cosmjs.js @@ -1,5 +1,5 @@ /// -/* eslint-disable no-await-in-loop, no-continue, @jessie.js/no-nested-await */ +/* eslint-disable no-await-in-loop, @jessie.js/no-nested-await */ import { E, Far } from '@endo/far'; import * as tendermint34 from '@cosmjs/tendermint-rpc'; diff --git a/packages/cosmic-swingset/src/kernel-stats.js b/packages/cosmic-swingset/src/kernel-stats.js index 4f88ed62675..0aa688fbe35 100644 --- a/packages/cosmic-swingset/src/kernel-stats.js +++ b/packages/cosmic-swingset/src/kernel-stats.js @@ -177,7 +177,6 @@ export function makeSlogCallbacks({ metricMeter, attributes = {} }) { // Add to aggregated metering stats. for (const [key, value] of Object.entries(meterUsage)) { if (key === 'meterType') { - // eslint-disable-next-line no-continue continue; } getGroupedRecorder(`swingset_meter_usage`, group, { diff --git a/packages/deployment/scripts/crunch.mjs b/packages/deployment/scripts/crunch.mjs index 75eacd33a83..b84664e79c0 100755 --- a/packages/deployment/scripts/crunch.mjs +++ b/packages/deployment/scripts/crunch.mjs @@ -1,7 +1,6 @@ #! /usr/bin/env node // crunch.mjs - crunch a kvstore trace file's writes into TSV -/* eslint-disable no-continue */ /* global process,Buffer */ import fs from 'fs'; diff --git a/packages/deployment/src/init.js b/packages/deployment/src/init.js index 02a11ef15f6..12adfc9b9b1 100644 --- a/packages/deployment/src/init.js +++ b/packages/deployment/src/init.js @@ -372,7 +372,6 @@ const doInit = // eslint-disable-next-line no-await-in-loop const { PROVIDER } = await askProvider({ inquirer })(PROVIDERS); if (!PROVIDER) { - // eslint-disable-next-line no-continue continue; } provider = PROVIDERS[PROVIDER]; @@ -400,7 +399,6 @@ const doInit = myDetails, ); if (CANCEL) { - // eslint-disable-next-line no-continue continue; } // Out with the old, in with the new. @@ -504,7 +502,7 @@ const doInit = if (instance === offset) { // No nodes added. - // eslint-disable-next-line no-continue + continue; } diff --git a/packages/deployment/src/main.js b/packages/deployment/src/main.js index 00dc536bb7e..c99ccade2a2 100644 --- a/packages/deployment/src/main.js +++ b/packages/deployment/src/main.js @@ -736,7 +736,6 @@ ${chalk.yellow.bold(`ag-setup-solo --netconfig='${dwebHost}/network-config'`)} let sep = ''; for (const CLUSTER of Object.keys(prov.public_ips.value)) { if (!isPublicRpc(prov.roles.value, CLUSTER)) { - // eslint-disable-next-line no-continue continue; } const ips = prov.public_ips.value[CLUSTER]; @@ -781,7 +780,6 @@ ${chalk.yellow.bold(`ag-setup-solo --netconfig='${dwebHost}/network-config'`)} for (const CLUSTER of Object.keys(prov.public_ips.value)) { if (!selector(CLUSTER)) { - // eslint-disable-next-line no-continue continue; } const ips = prov.public_ips.value[CLUSTER]; diff --git a/packages/solo/src/outbound.js b/packages/solo/src/outbound.js index 9dc70c6ca73..b504965ef7d 100644 --- a/packages/solo/src/outbound.js +++ b/packages/solo/src/outbound.js @@ -28,7 +28,7 @@ export function deliver(mbs) { for (const target of Object.getOwnPropertyNames(data)) { if (!knownTargets.has(target)) { log.error(`eek, no delivery method for target`, target); - // eslint-disable-next-line no-continue + continue; } const t = knownTargets.get(target); diff --git a/packages/swingset-runner/src/push-metrics.js b/packages/swingset-runner/src/push-metrics.js index 69f09188b14..9d33860ba45 100644 --- a/packages/swingset-runner/src/push-metrics.js +++ b/packages/swingset-runner/src/push-metrics.js @@ -92,7 +92,6 @@ function gatherMetrics(kind, data, labels, specs) { const todo = new Set(Object.keys(data)); for (const { key, name } of KERNEL_STATS_METRICS) { if (!(key in data)) { - // eslint-disable-next-line no-continue continue; } todo.delete(key); diff --git a/packages/telemetry/src/frcat-entrypoint.js b/packages/telemetry/src/frcat-entrypoint.js index fe51267bec2..f1ff760444c 100755 --- a/packages/telemetry/src/frcat-entrypoint.js +++ b/packages/telemetry/src/frcat-entrypoint.js @@ -46,7 +46,6 @@ const main = async () => { process.stdout.write(bufStr); } if (process.stdout.write('\n')) { - // eslint-disable-next-line no-continue continue; } diff --git a/packages/vats/src/authorityViz.js b/packages/vats/src/authorityViz.js index a6f98d463a5..36c6b4115a0 100644 --- a/packages/vats/src/authorityViz.js +++ b/packages/vats/src/authorityViz.js @@ -1,4 +1,3 @@ -/* eslint-disable no-continue */ // @ts-check import '@endo/init'; import process from 'process'; diff --git a/packages/xsnap/src/avaXS.js b/packages/xsnap/src/avaXS.js index 52605111ef5..95afbac039e 100644 --- a/packages/xsnap/src/avaXS.js +++ b/packages/xsnap/src/avaXS.js @@ -173,7 +173,6 @@ async function runTestScript( for (const name of testNames) { if (titleMatch && !isMatch(name, titleMatch)) { - // eslint-disable-next-line no-continue continue; } assertionStatus = { ok: 0, 'not ok': 0, SKIP: 0 }; @@ -357,7 +356,7 @@ export async function main( for (const filename of files) { if (exclude && exclude.filter(s => filename.match(s)).length > 0) { console.warn('# SKIP test excluded on XS', filename); - // eslint-disable-next-line no-continue + continue; } else if (verbose) { console.log('# test script:', filename); diff --git a/packages/xsnap/src/object-inspect.js b/packages/xsnap/src/object-inspect.js index bf5ce11b24c..047950f9b93 100644 --- a/packages/xsnap/src/object-inspect.js +++ b/packages/xsnap/src/object-inspect.js @@ -497,11 +497,9 @@ function arrObjKeys(obj, inspect) { const syms = getOwnPropertySymbols(obj); for (const key of getOwnPropertyNames(obj)) { if (!isEnumerable.call(obj, key)) { - // eslint-disable-next-line no-continue continue; } if (isArr && String(Number(key)) === key && key < obj.length) { - // eslint-disable-next-line no-continue continue; } if ($test.call(/[^\w$]/, key)) { From fb5571044a5b3536113946bb6e77fcbd40af5f16 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 28 Jan 2023 07:39:37 -0800 Subject: [PATCH 2/2] ci(lint): extend @agoric style --- packages/web-components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-components/package.json b/packages/web-components/package.json index 40b728f8725..11f9a6b0780 100644 --- a/packages/web-components/package.json +++ b/packages/web-components/package.json @@ -56,7 +56,7 @@ "eslintConfig": { "extends": [ "@open-wc", - "@endo" + "@agoric" ], "rules": { "import/no-extraneous-dependencies": "off",