Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve lint warnings in inter-protocol #6803

Merged
merged 2 commits into from
Jan 16, 2023
Merged

Conversation

turadg
Copy link
Member

@turadg turadg commented Jan 16, 2023

refs: #6000

Description

Part of #6000 though we'll need to do this again before release.

Output of NODE_OPTIONS='--max-old-space-size=8192' AGORIC_ESLINT_TYPES=true yarn lint before:

/opt/agoric/agoric-sdk/packages/inter-protocol/scripts/add-initial-liquidity.js
  168:5  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/opt/agoric/agoric-sdk/packages/inter-protocol/src/price/priceAggregatorChainlink.js
  186:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/opt/agoric/agoric-sdk/packages/inter-protocol/src/proposals/demoIssuers.js
  289:47  warning  Unexpected `await` expression (not top of async function or `for-await-of` body)  @jessie.js/no-nested-await
  307:11  warning  Unexpected `await` expression (not top of async function or `for-await-of` body)  @jessie.js/no-nested-await
  494:37  warning  Unexpected `await` expression (not top of async function or `for-await-of` body)  @jessie.js/no-nested-await
  629:39  warning  Unexpected `await` expression (not top of async function or `for-await-of` body)  @jessie.js/no-nested-await

/opt/agoric/agoric-sdk/packages/inter-protocol/src/proposals/price-feed-proposal.js
  125:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  171:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  180:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/opt/agoric/agoric-sdk/packages/inter-protocol/src/vaultFactory/liquidation.js
  47:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/opt/agoric/agoric-sdk/packages/inter-protocol/test/psm/test-psm.js
  345:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  357:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  485:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  500:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/opt/agoric/agoric-sdk/packages/inter-protocol/test/smartWallet/test-oracle-integration.js
   44:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  240:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/opt/agoric/agoric-sdk/packages/inter-protocol/test/smartWallet/test-psm-integration.js
  43:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

✖ 17 problems (0 errors, 17 warnings)

And empty after.

Security Considerations

--

Documentation Considerations

--

Testing Considerations

--

@turadg turadg requested review from dckc and samsiegart January 16, 2023 19:01
Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for tidying up around the shop

@@ -165,7 +165,7 @@ const addInitialLiquidity = async (homeP, { now = () => Date.now() }) => {

const payouts = await E(seat).getPayouts();
console.log('initialLiquidityPayouts', keys(payouts));
E(scratch).set('initialLiquidityPayouts', payouts);
await E(scratch).set('initialLiquidityPayouts', payouts);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this script is somewhat obsolete. hm.

anyway... this fix looks right.

@turadg turadg added the automerge:no-update (expert!) Automatically merge without updates label Jan 16, 2023
@mergify mergify bot merged commit bfbb808 into master Jan 16, 2023
@mergify mergify bot deleted the ta/inter-floating-promises branch January 16, 2023 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:no-update (expert!) Automatically merge without updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants