Skip to content

Commit

Permalink
chore: lint-fix sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Sep 17, 2024
1 parent fd20cda commit 6d1adbd
Show file tree
Hide file tree
Showing 1,183 changed files with 3,455 additions and 3,215 deletions.
10 changes: 5 additions & 5 deletions packages/ERTP/src/amountMath.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { q, Fail } from '@endo/errors';
import { passStyleOf, assertRemotable, assertRecord } from '@endo/marshal';

import { M, matches } from '@agoric/store';
import { Fail, q } from '@endo/errors';
import { assertRecord, assertRemotable, passStyleOf } from '@endo/marshal';

import { copyBagMathHelpers } from './mathHelpers/copyBagMathHelpers.js';
import { copySetMathHelpers } from './mathHelpers/copySetMathHelpers.js';
import { natMathHelpers } from './mathHelpers/natMathHelpers.js';
import { setMathHelpers } from './mathHelpers/setMathHelpers.js';
import { copySetMathHelpers } from './mathHelpers/copySetMathHelpers.js';
import { copyBagMathHelpers } from './mathHelpers/copyBagMathHelpers.js';

/**
* @import {CopyBag, CopySet} from '@endo/patterns';
Expand Down
2 changes: 1 addition & 1 deletion packages/ERTP/src/displayInfo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @jessie-check

import { Fail } from '@endo/errors';
import { mustMatch } from '@agoric/store';
import { Fail } from '@endo/errors';

import { DisplayInfoShape } from './typeGuards.js';

Expand Down
4 changes: 2 additions & 2 deletions packages/ERTP/src/issuerKit.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @jessie-check

import { assert, Fail } from '@endo/errors';
import { assertPattern } from '@agoric/store';
import { makeScalarBigMapStore } from '@agoric/vat-data';
import { makeDurableZone } from '@agoric/zone/durable.js';
import { assert, Fail } from '@endo/errors';

import { AssetKind, assertAssetKind } from './amountMath.js';
import { assertAssetKind, AssetKind } from './amountMath.js';
import { coerceDisplayInfo } from './displayInfo.js';
import { preparePaymentLedger } from './paymentLedger.js';

Expand Down
3 changes: 2 additions & 1 deletion packages/ERTP/src/legacy-payment-helpers.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// @jessie-check

import { mustMatch } from '@agoric/store';
import { Fail } from '@endo/errors';
import { E } from '@endo/far';
import { mustMatch } from '@agoric/store';

import { AmountMath } from './amountMath.js';

/**
Expand Down
10 changes: 5 additions & 5 deletions packages/ERTP/src/mathHelpers/copyBagMathHelpers.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// @jessie-check

import {
bagDisjointSubtract,
bagIsSuperbag,
bagUnion,
getCopyBagEntries,
keyEQ,
M,
makeCopyBag,
mustMatch,
M,
getCopyBagEntries,
bagIsSuperbag,
bagUnion,
bagDisjointSubtract,
} from '@agoric/store';

/** @import {MathHelpers} from '../types.js' */
Expand Down
8 changes: 4 additions & 4 deletions packages/ERTP/src/mathHelpers/copySetMathHelpers.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// @jessie-check

import {
getCopySetKeys,
keyEQ,
M,
makeCopySet,
mustMatch,
M,
getCopySetKeys,
setIsSuperset,
setDisjointUnion,
setDisjointSubtract,
setDisjointUnion,
setIsSuperset,
} from '@agoric/store';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/ERTP/src/mathHelpers/natMathHelpers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @jessie-check

import { Fail } from '@endo/errors';
import { Nat, isNat } from '@endo/nat';
import { isNat, Nat } from '@endo/nat';

/** @import {MathHelpers, NatValue} from '../types.js' */

Expand Down
8 changes: 4 additions & 4 deletions packages/ERTP/src/mathHelpers/setMathHelpers.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// @jessie-check

import { passStyleOf } from '@endo/marshal';
import {
assertKey,
elementsIsSuperset,
elementsDisjointUnion,
elementsDisjointSubtract,
coerceToElements,
elementsCompare,
elementsDisjointSubtract,
elementsDisjointUnion,
elementsIsSuperset,
} from '@agoric/store';
import { passStyleOf } from '@endo/marshal';

/** @import {MathHelpers, SetValue} from '../types.js' */

Expand Down
6 changes: 3 additions & 3 deletions packages/ERTP/src/paymentLedger.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
/// <reference types="@agoric/store/exported.js" />

/* eslint-disable no-use-before-define */
import { X, q, Fail, annotateError } from '@endo/errors';
import { keyEQ, M, mustMatch } from '@agoric/store';
import { annotateError, Fail, q, X } from '@endo/errors';
import { isPromise } from '@endo/promise-kit';
import { mustMatch, M, keyEQ } from '@agoric/store';

import { AmountMath } from './amountMath.js';
import { preparePaymentKind } from './payment.js';
import { preparePurseKind } from './purse.js';

import { BrandI, makeIssuerInterfaces } from './typeGuards.js';

/**
Expand Down
5 changes: 3 additions & 2 deletions packages/ERTP/src/purse.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Fail } from '@endo/errors';
import { M, makeCopySet } from '@agoric/store';
import { Fail } from '@endo/errors';

import { AmountMath } from './amountMath.js';
import { makeTransientNotifierKit } from './transientNotifier.js';
import { makeAmountStore } from './amountStore.js';
import { makeTransientNotifierKit } from './transientNotifier.js';

/** @import {Amount, AssetKind, AmountValue, AssetKindForValue, RecoverySetsOption, Brand, Payment} from './types.js' */

Expand Down
4 changes: 2 additions & 2 deletions packages/ERTP/src/transientNotifier.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @jessie-check

import { makeScalarBigWeakMapStore } from '@agoric/vat-data';
import { provideLazy } from '@agoric/store';
import { makeNotifierKit } from '@agoric/notifier';
import { provideLazy } from '@agoric/store';
import { makeScalarBigWeakMapStore } from '@agoric/vat-data';

/**
* @import {Purse} from './types.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/ERTP/src/typeGuards.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @jessie-check

import { M, matches, getInterfaceGuardPayload } from '@endo/patterns';
import { getInterfaceGuardPayload, M, matches } from '@endo/patterns';
/** @import {AmountValue, AssetKindForValue, AssetValueForKind, Brand, MathHelpers} from './types.js' */

export const BrandShape = M.remotable('Brand');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { loadBasedir, buildVatController } from '@agoric/swingset-vat';
import { buildVatController, loadBasedir } from '@agoric/swingset-vat';

async function main(basedir, argv) {
const dir = new URL(`../${basedir}`, import.meta.url).pathname;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { E } from '@endo/eventual-send';
import { assert, X } from '@endo/errors';
import { E } from '@endo/eventual-send';
import { Far } from '@endo/marshal';
import { makeIssuerKit, AmountMath } from '../../../src/index.js';

import { AmountMath, makeIssuerKit } from '../../../src/index.js';

export function buildRootObject(vatPowers, vatParameters) {
const arg0 = vatParameters.argv[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { E } from '@endo/eventual-send';
import { Far } from '@endo/marshal';

import { AmountMath } from '../../../src/index.js';
import {
claim,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { E } from '@endo/eventual-send';
import { Far } from '@endo/marshal';

import { AmountMath } from '../../../src/index.js';

const mintInto = (kit, purse, value) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { assert } from '@endo/errors';
import { buildVatController } from '@agoric/swingset-vat';
import { assert } from '@endo/errors';

const bfile = name => new URL(name, import.meta.url).pathname;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Far } from '@endo/marshal';
import {
makeScalarBigMapStore,
prepareSingleton,
provideDurableSetStore,
} from '@agoric/vat-data';
import { Far } from '@endo/marshal';

import {
AssetKind,
Expand Down
5 changes: 3 additions & 2 deletions packages/ERTP/test/swingsetTests/splitPayments/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { E } from '@endo/eventual-send';
import { assert, X } from '@endo/errors';
import { E } from '@endo/eventual-send';
import { Far } from '@endo/marshal';
import { makeIssuerKit, AmountMath } from '../../../src/index.js';

import { AmountMath, makeIssuerKit } from '../../../src/index.js';

export function buildRootObject(vatPowers, vatParameters) {
const arg0 = vatParameters.argv[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { loadBasedir, buildVatController } from '@agoric/swingset-vat';
import { buildVatController, loadBasedir } from '@agoric/swingset-vat';

async function main(basedir, argv) {
const dir = new URL(`../${basedir}/`, import.meta.url).pathname;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { E } from '@endo/eventual-send';
import { Far } from '@endo/marshal';

import { AmountMath } from '../../../src/index.js';
import { split } from '../../../src/legacy-payment-helpers.js';

Expand Down
1 change: 1 addition & 0 deletions packages/ERTP/test/types.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Far } from '@endo/marshal';
import type { Key } from '@endo/patterns';
import { expectType } from 'tsd';

import { AmountMath, AssetKind } from '../src/index.js';
import type {
Amount,
Expand Down
1 change: 1 addition & 0 deletions packages/ERTP/test/unitTests/amountProperties.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { makeCopyBag } from '@agoric/store';
import { fc } from '@fast-check/ava';

Expand Down
3 changes: 2 additions & 1 deletion packages/ERTP/test/unitTests/inputValidation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { E } from '@endo/eventual-send';
import { Far } from '@endo/marshal';
import { AssetKind, makeIssuerKit, AmountMath } from '../../src/index.js';

import { AmountMath, AssetKind, makeIssuerKit } from '../../src/index.js';
import { claim, combine } from '../../src/legacy-payment-helpers.js';

/** @import {Amount, Issuer} from '../../src/types.js' */
Expand Down
3 changes: 2 additions & 1 deletion packages/ERTP/test/unitTests/interfaces.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { getInterfaceOf } from '@endo/marshal';
import { makeIssuerKit, AmountMath } from '../../src/index.js';

import { AmountMath, makeIssuerKit } from '../../src/index.js';

test('interfaces - particular implementation', t => {
const allegedName = 'bucks';
Expand Down
3 changes: 2 additions & 1 deletion packages/ERTP/test/unitTests/issuerObj.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { E } from '@endo/eventual-send';
import { AssetKind, makeIssuerKit, AmountMath } from '../../src/index.js';

import { AmountMath, AssetKind, makeIssuerKit } from '../../src/index.js';
import {
claim,
combine,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { makeIssuerKit, AmountMath } from '../../src/index.js';
import { AmountMath, makeIssuerKit } from '../../src/index.js';
import { combine, split } from '../../src/legacy-payment-helpers.js';

const { isEqual } = AmountMath;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';
import { makeTagged } from '@endo/marshal';

import {
getCopyBagEntries,
makeCopyBagFromElements as makeBag,
} from '@agoric/store';
import { makeTagged } from '@endo/marshal';

import { AmountMath as m, AssetKind } from '../../../src/index.js';
import { mockCopyBagBrand as mockBrand } from './mockBrand.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { getCopySetKeys, makeCopySet } from '@agoric/store';

import { AmountMath as m, AssetKind } from '../../../src/index.js';
Expand Down
1 change: 1 addition & 0 deletions packages/ERTP/test/unitTests/mathHelpers/mockBrand.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Far } from '@endo/marshal';

import { AssetKind } from '../../../src/index.js';

/** @import {Brand} from '@agoric/ertp/src/types.js'; */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';
import { M } from '@agoric/store';

import { M } from '@agoric/store';
import { Far } from '@endo/marshal';

import { AmountMath as m, AssetKind } from '../../../src/index.js';
import { mockNatBrand as mockBrand } from './mockBrand.js';

Expand Down
6 changes: 3 additions & 3 deletions packages/ERTP/test/unitTests/mintObj.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { assert } from '@endo/errors';
import { initEmpty, M } from '@agoric/store';

import { defineDurableKind, makeKindHandle } from '@agoric/vat-data';
import { makeIssuerKit, AssetKind, AmountMath } from '../../src/index.js';
import { assert } from '@endo/errors';

import { AmountMath, AssetKind, makeIssuerKit } from '../../src/index.js';
import { claim, combine } from '../../src/legacy-payment-helpers.js';

test('mint.getIssuer', t => {
Expand Down
3 changes: 2 additions & 1 deletion packages/ERTP/test/unitTests/recovery.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { getCopySetKeys, keyEQ, makeCopySet } from '@agoric/store';

import { makeIssuerKit, AmountMath } from '../../src/index.js';
import { AmountMath, makeIssuerKit } from '../../src/index.js';

const { isEmpty, isEqual } = AmountMath;
const emptySet = makeCopySet([]);
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/demo/encouragementBot/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Far, E } from '@endo/far';
import { E, Far } from '@endo/far';

console.log(`=> loading bootstrap.js`);

Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/demo/encouragementBot/vat-user.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Far, E } from '@endo/far';
import { E, Far } from '@endo/far';

export function buildRootObject(vatPowers) {
const log = vatPowers.testLog;
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/demo/encouragementBotComms/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Far, E } from '@endo/far';
import { E, Far } from '@endo/far';

console.log(`=> loading bootstrap.js`);

Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/demo/encouragementBotComms/vat-user.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Far, E } from '@endo/far';
import { E, Far } from '@endo/far';

export function buildRootObject(vatPowers) {
const log = vatPowers.testLog;
Expand Down
6 changes: 4 additions & 2 deletions packages/SwingSet/misc-tools/baggage-check-tool.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import process from 'process';
import sqlite3 from 'better-sqlite3';
import '@endo/init/debug.js';

import sqlite3 from 'better-sqlite3';
import process from 'process';

import { checkBaggage } from '../tools/baggage-check.js';

function main() {
Expand Down
Loading

0 comments on commit 6d1adbd

Please sign in to comment.