Skip to content

Commit

Permalink
Enable for-in lint rule (#3013)
Browse files Browse the repository at this point in the history
### Description

https://eslint.org/docs/latest/rules/guard-for-in

### Drive-by changes

Fix lint error in SDK Sealevel adapter

### Backward compatibility

Yes
  • Loading branch information
jmrossy authored Dec 4, 2023
1 parent 7e620c9 commit eb83cf8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"no-extra-boolean-cast": ["error"],
"no-ex-assign": ["error"],
"no-constant-condition": ["off"],
"guard-for-in": ["error"],
"@typescript-eslint/ban-ts-comment": ["off"],
"@typescript-eslint/explicit-module-boundary-types": ["off"],
"@typescript-eslint/no-explicit-any": ["off"],
Expand Down
2 changes: 1 addition & 1 deletion typescript/sdk/src/ism/HyperlaneIsmFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export class HyperlaneIsmFactory extends HyperlaneApp<ProxyFactoryFactories> {
// ? this.getContracts(chain).defaultFallbackRoutingIsmFactory
// : this.getContracts(chain).routingIsmFactory;
const isms: ChainMap<Address> = {};
for (const origin in config.domains) {
for (const origin of Object.keys(config.domains)) {
const ism = await this.deploy(chain, config.domains[origin], origin);
isms[origin] = ism.address;
}
Expand Down
2 changes: 1 addition & 1 deletion typescript/sdk/src/token/adapters/SealevelTokenAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export abstract class SealevelHypTokenAdapter
return tx;
}

async getIgpKeys() {
async getIgpKeys(): Promise<KeyListParams['igp']> {
const tokenData = await this.getTokenAccountData();
if (!tokenData.interchain_gas_paymaster) return undefined;
const igpConfig = tokenData.interchain_gas_paymaster;
Expand Down

0 comments on commit eb83cf8

Please sign in to comment.