Skip to content

Commit

Permalink
Merge pull request #8333 from Agoric/ta/fix-prettier
Browse files Browse the repository at this point in the history
bump lint deps
  • Loading branch information
mergify[bot] authored Sep 14, 2023
2 parents 7cead9c + 8877459 commit 386dc7c
Show file tree
Hide file tree
Showing 57 changed files with 342 additions and 693 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@
"@jessie.js/eslint-plugin": "^0.4.0",
"@types/express": "^4.17.17",
"@types/node": "^16.13.0",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"ava": "^5.3.0",
"c8": "^7.13.0",
"conventional-changelog-conventionalcommits": "^4.6.0",
"eslint": "^8.47.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-jessie": "^0.0.6",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-ava": "^14.0.0",
"eslint-plugin-github": "^4.8.0",
"eslint-plugin-github": "^4.10.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsdoc": "^46.4.3",
"eslint-plugin-prettier": "^5.0.0",
"lerna": "^5.6.2",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.0",
"prettier": "^3.0.3",
"prettier-plugin-jsdoc": "^1.0.0",
"typescript": "~5.2.2"
},
Expand Down
10 changes: 4 additions & 6 deletions packages/ERTP/test/swingsetTests/basicFunctionality/vat-alice.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,14 @@ function makeAliceMaker(log) {
E(issuer).makeEmptyPurse(),
paymentToClaim,
);
const claimedPaymentAmount = await E(issuer).getAmountOf(
claimedPayment,
);
const claimedPaymentAmount =
await E(issuer).getAmountOf(claimedPayment);
log('claimedPayment amount: ', claimedPaymentAmount);

// combine
const combinedPayment = combine(E(issuer).makeEmptyPurse(), payments);
const combinedPaymentAmount = await E(issuer).getAmountOf(
combinedPayment,
);
const combinedPaymentAmount =
await E(issuer).getAmountOf(combinedPayment);
log('combinedPayment amount: ', combinedPaymentAmount);
},
});
Expand Down
10 changes: 4 additions & 6 deletions packages/ERTP/test/unitTests/test-mintObj.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,8 @@ test('non-fungible tokens example', async t => {
// the call to claim() hasn't thrown, so Alice knows myTicketPaymentAlice
// is a genuine 'Agoric Ballet Opera tickets' payment and she has exclusive
// access to its handle
const paymentAmountAlice = await balletTicketIssuer.getAmountOf(
myTicketPaymentAlice,
);
const paymentAmountAlice =
await balletTicketIssuer.getAmountOf(myTicketPaymentAlice);
assert(Array.isArray(paymentAmountAlice.value));
t.is(paymentAmountAlice.value.length, 1);
t.is(paymentAmountAlice.value[0].seat, 1);
Expand All @@ -170,9 +169,8 @@ test('non-fungible tokens example', async t => {
balletTicketIssuer.makeEmptyPurse(),
paymentForBob,
);
const paymentAmountBob = await balletTicketIssuer.getAmountOf(
bobTicketPayment,
);
const paymentAmountBob =
await balletTicketIssuer.getAmountOf(bobTicketPayment);
assert(Array.isArray(paymentAmountBob.value));
t.is(paymentAmountBob.value.length, 2);
t.is(paymentAmountBob.value[0].seat, 4);
Expand Down
5 changes: 2 additions & 3 deletions packages/SwingSet/test/device-plugin/test-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ async function setupVatController(t) {
}

test.serial('plugin first time', async t => {
const { bridge, cycle, dump, queueThunkForKernel } = await setupVatController(
t,
);
const { bridge, cycle, dump, queueThunkForKernel } =
await setupVatController(t);

void queueThunkForKernel(() => bridge.deliverInbound('pingpong'));
await cycle();
Expand Down
5 changes: 2 additions & 3 deletions packages/boot/test/bootstrapTests/drivers.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,8 @@ export const makeGovernanceDriver = async (
const committeeMembershipId = 'committeeMembership';

/** @type {ERef<import('@agoric/time/src/types.js').TimerService>} */
const chainTimerService = await EV.vat('bootstrap').consumeItem(
'chainTimerService',
);
const chainTimerService =
await EV.vat('bootstrap').consumeItem('chainTimerService');

let invitationsAccepted = false;

Expand Down
5 changes: 2 additions & 3 deletions packages/boot/test/bootstrapTests/test-vats-restart.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ test.serial('read metrics', async t => {
* import('@agoric/inter-protocol/src/proposals/econ-behaviors.js').EconomyBootstrapSpace['consume']['vaultFactoryKit']
* >}
*/
const vaultFactoryKit = await EV.vat('bootstrap').consumeItem(
'vaultFactoryKit',
);
const vaultFactoryKit =
await EV.vat('bootstrap').consumeItem('vaultFactoryKit');

const vfTopics = await EV(vaultFactoryKit.publicFacet).getPublicTopics();

Expand Down
5 changes: 2 additions & 3 deletions packages/boot/test/bootstrapTests/test-vaults-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ test.after.always(t => {
test('metrics path', async t => {
const { EV } = t.context.runUtils;
// example of awaitVatObject
const vaultFactoryKit = await EV.vat('bootstrap').consumeItem(
'vaultFactoryKit',
);
const vaultFactoryKit =
await EV.vat('bootstrap').consumeItem('vaultFactoryKit');
const vfTopics = await EV(vaultFactoryKit.publicFacet).getPublicTopics();
const vfMetricsPath = await EV.get(vfTopics.metrics).storagePath;
t.is(vfMetricsPath, 'published.vaultFactory.metrics');
Expand Down
30 changes: 12 additions & 18 deletions packages/boot/test/bootstrapTests/test-vaults-upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ test.serial('re-bootstrap', async t => {
const oldContext = { ...t.context.shared };
const { storage } = oldContext;
t.is(oldContext.incarnation, 1);
const wd1 = await oldContext.walletFactoryDriver.provideSmartWallet(
'agoric1a',
);
const wd1 =
await oldContext.walletFactoryDriver.provideSmartWallet('agoric1a');
t.true(wd1.isNew);
// eslint-disable-next-line no-unused-vars
const assertWalletCount = (walletsProvisioned, message) => {
Expand Down Expand Up @@ -146,15 +145,13 @@ test.serial('re-bootstrap', async t => {
}
// prettier-ignore
assertWalletCount(1n, 'provisionPool metrics must not be modified by re-bootstrap');
const wd2 = await newContext.walletFactoryDriver.provideSmartWallet(
'agoric1a',
);
const wd2 =
await newContext.walletFactoryDriver.provideSmartWallet('agoric1a');
t.false(wd2.isNew);
// prettier-ignore
assertWalletCount(1n, 'wallet restoration must not affect provisionPool metrics');
const wd3 = await newContext.walletFactoryDriver.provideSmartWallet(
'agoric1b',
);
const wd3 =
await newContext.walletFactoryDriver.provideSmartWallet('agoric1b');
t.true(wd3.isNew);
// prettier-ignore
assertWalletCount(2n, 'new wallet provisioning must update revived provisionPool metrics');
Expand Down Expand Up @@ -294,9 +291,8 @@ test.serial('restart vaultFactory', async t => {
* import('@agoric/inter-protocol/src/proposals/econ-behaviors.js').EconomyBootstrapSpace['consume']['vaultFactoryKit']
* >}
*/
const vaultFactoryKit = await EV.vat('bootstrap').consumeItem(
'vaultFactoryKit',
);
const vaultFactoryKit =
await EV.vat('bootstrap').consumeItem('vaultFactoryKit');

// @ts-expect-error cast XXX missing from type
const { privateArgs } = vaultFactoryKit;
Expand Down Expand Up @@ -325,9 +321,8 @@ test.serial('restart contractGovernor', async t => {
* import('@agoric/inter-protocol/src/proposals/econ-behaviors.js').EconomyBootstrapSpace['consume']['vaultFactoryKit']
* >}
*/
const vaultFactoryKit = await EV.vat('bootstrap').consumeItem(
'vaultFactoryKit',
);
const vaultFactoryKit =
await EV.vat('bootstrap').consumeItem('vaultFactoryKit');

const { governorAdminFacet } = vaultFactoryKit;
// has no privateArgs of its own. the privateArgs.governed is only for the
Expand All @@ -336,9 +331,8 @@ test.serial('restart contractGovernor', async t => {
const privateArgs = undefined;

t.log('awaiting CG restartContract');
const upgradeResult = await EV(governorAdminFacet).restartContract(
privateArgs,
);
const upgradeResult =
await EV(governorAdminFacet).restartContract(privateArgs);
t.deepEqual(upgradeResult, { incarnationNumber: 1 });
});

Expand Down
20 changes: 8 additions & 12 deletions packages/boot/test/upgrading/test-upgrade-vats.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ test('upgrade vat-board', async t => {
t.regex(thingId, /^board0[0-9]+$/);

t.log('now perform the null upgrade');
const { incarnationNumber } = await EV.vat('bootstrap').upgradeVat(
boardVatConfig,
);
const { incarnationNumber } =
await EV.vat('bootstrap').upgradeVat(boardVatConfig);
t.is(incarnationNumber, 1, 'Board vat must be upgraded');
const board2 = await EV.vat('board').getBoard();
t.is(board2, board, 'must get the same board reference');
Expand Down Expand Up @@ -114,9 +113,8 @@ test.failing('upgrade bootstrap vat', async t => {

t.log('now perform the null upgrade');

const { incarnationNumber } = await EV.vat('bootstrap').upgradeVat(
chainVatConfig,
);
const { incarnationNumber } =
await EV.vat('bootstrap').upgradeVat(chainVatConfig);
t.is(incarnationNumber, 1, 'vat must be upgraded');
});

Expand Down Expand Up @@ -204,9 +202,8 @@ test('upgrade vat-bridge', async t => {
);

t.log('now perform the null upgrade');
const { incarnationNumber } = await EV.vat('bootstrap').upgradeVat(
bridgeVatConfig,
);
const { incarnationNumber } =
await EV.vat('bootstrap').upgradeVat(bridgeVatConfig);

t.is(incarnationNumber, 1, 'Bridge vat must be upgraded');

Expand Down Expand Up @@ -357,9 +354,8 @@ test('upgrade vat-bank', async t => {
});

t.log('now perform the null upgrade');
const { incarnationNumber } = await EV.vat('bootstrap').upgradeVat(
bankVatConfig,
);
const { incarnationNumber } =
await EV.vat('bootstrap').upgradeVat(bankVatConfig);

t.is(incarnationNumber, 1, 'Bank vat must be upgraded');

Expand Down
10 changes: 4 additions & 6 deletions packages/casting/src/follower-cosmjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,8 @@ export const makeCosmjsFollower = (
// contain data.
await null;
for (;;) {
({ value: cursorData, height: cursorBlockHeight } = await getDataAtHeight(
cursorBlockHeight,
));
({ value: cursorData, height: cursorBlockHeight } =
await getDataAtHeight(cursorBlockHeight));
if (cursorData.length !== 0) {
const cursorStreamCell = streamCellForData(
cursorBlockHeight,
Expand Down Expand Up @@ -558,9 +557,8 @@ export const makeCosmjsFollower = (
let cursorData;
await null;
while (cursorBlockHeight === undefined || cursorBlockHeight > 0) {
({ value: cursorData, height: cursorBlockHeight } = await getDataAtHeight(
cursorBlockHeight,
));
({ value: cursorData, height: cursorBlockHeight } =
await getDataAtHeight(cursorBlockHeight));
if (cursorData.length === 0) {
// No data at the cursor height, so signal beginning of stream.
return;
Expand Down
5 changes: 2 additions & 3 deletions packages/deploy-script-support/src/offer.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,8 @@ export const makeOfferAndFindInvitationAmount = (
} = config;

const invitationToUse = getInvitation(invitation, partialInvitationDetails);
const invitationDetails = await E(zoe).getInvitationDetails(
invitationToUse,
);
const invitationDetails =
await E(zoe).getInvitationDetails(invitationToUse);
const payments = withdrawPayments(proposal, paymentsWithPursePetnames);

const seat = E(zoe).offer(invitationToUse, proposal, payments);
Expand Down
5 changes: 2 additions & 3 deletions packages/deploy-script-support/src/startInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ export const makeStartInstance = (
`creatorInvitation must be defined to be deposited`,
);
console.log(`-- Adding Invitation for: ${instancePetname}`);
const invitationAmount = await E(zoeInvitationPurse).deposit(
creatorInvitation,
);
const invitationAmount =
await E(zoeInvitationPurse).deposit(creatorInvitation);
console.log(`- Created Contract Instance: ${instancePetname}`);

const creatorInvitationDetails = invitationAmount.value[0];
Expand Down
10 changes: 5 additions & 5 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
"peerDependencies": {
"@endo/eslint-plugin": "^0.5.1",
"@jessie.js/eslint-plugin": "^0.4.0",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"eslint": "^8.47.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-github": "^4.8.0",
"eslint-plugin-github": "^4.10.0",
"eslint-config-jessie": "^0.0.6",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsdoc": "^40.1.0",
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.0"
"prettier": "^3.0.3"
}
}
5 changes: 2 additions & 3 deletions packages/governance/src/contractGovernorKit.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ export const prepareContractGovernorKit = (baggage, powers) => {
/** @type {() => Promise<Instance>} */
async getElectorateInstance() {
const { publicFacet } = this.state;
const invitationAmount = await E(publicFacet).getInvitationAmount(
CONTRACT_ELECTORATE,
);
const invitationAmount =
await E(publicFacet).getInvitationAmount(CONTRACT_ELECTORATE);
return invitationAmount.value[0].instance;
},
/** @type {() => Promise<PoserFacet>} */
Expand Down
5 changes: 2 additions & 3 deletions packages/governance/src/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ const assertContractGovernance = async (
'The alleged governed did not match the governed contract retrieved from the governor',
);

const governorInstallationFromGoverned = await E(
zoe,
).getInstallationForInstance(realGovernorInstance);
const governorInstallationFromGoverned =
await E(zoe).getInstallationForInstance(realGovernorInstance);

assert(
governorInstallationFromGoverned === contractGovernorInstallation,
Expand Down
5 changes: 2 additions & 3 deletions packages/inter-protocol/src/vaultFactory/vaultDirector.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,8 @@ const prepareVaultDirector = (
// zero-based index of the manager being made
const managerIndex = vaultManagers.length();
const managerId = `manager${managerIndex}`;
const managerStorageNode = await E(managersNode).makeChildNode(
managerId,
);
const managerStorageNode =
await E(managersNode).makeChildNode(managerId);

vaultParamManagers.addParamManager(
collateralBrand,
Expand Down
5 changes: 2 additions & 3 deletions packages/inter-protocol/test/auction/test-auctionContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,8 @@ const assertPayouts = async (
bidValue,
collateralValue,
) => {
const { Collateral: collateralPayout, Bid: bidPayout } = await E(
seat,
).getPayouts();
const { Collateral: collateralPayout, Bid: bidPayout } =
await E(seat).getPayouts();

if (!bidPayout) {
bidValue === 0n ||
Expand Down
10 changes: 4 additions & 6 deletions packages/inter-protocol/test/price/test-fluxAggregatorKit.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,8 @@ test('notifications', async t => {
});

test('storage keys', async t => {
const { public: publicFacet } = await t.context.makeTestFluxAggregator(
defaultConfig,
);
const { public: publicFacet } =
await t.context.makeTestFluxAggregator(defaultConfig);

t.is(
await topicPath(publicFacet, 'quotes'),
Expand All @@ -707,9 +706,8 @@ test('storage keys', async t => {
});

test('disabling', async t => {
const { creator, manualTimer } = await t.context.makeTestFluxAggregator(
defaultConfig,
);
const { creator, manualTimer } =
await t.context.makeTestFluxAggregator(defaultConfig);

const kitA = await creator.initOracle('agoric1priceOracleA');
const kitB = await creator.initOracle('agoric1priceOracleB');
Expand Down
Loading

0 comments on commit 386dc7c

Please sign in to comment.