Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
yavrsky committed Jan 8, 2025
1 parent 248069f commit b4c4a65
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
11 changes: 11 additions & 0 deletions typescript/base/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ module.exports = {
"padded-blocks": [
"error",
"never"
],
"function-paren-newline": [
"error",
"multiline-arguments"
],
"no-extra-parens": [
"error",
"all",
{
"nestedBinaryExpressions": false
}
]
}
};
12 changes: 9 additions & 3 deletions typescript/base/src/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ export abstract class Project<ContractType> {
}

getInstance (target: string | MainContractAddress | ContractAddressMap) {
if (typeof target === "string" && this.network.adapter.isAddress(target) || typeof target === "object") {
const isStringAndAddress =
typeof target === "string" &&
this.network.adapter.isAddress(target);
if (isStringAndAddress || typeof target === "object") {
return this.getInstanceByAddress(
target as MainContractAddress | ContractAddressMap);
target as MainContractAddress | ContractAddressMap
);
}
return this.getInstanceByAlias(target);
}
Expand Down Expand Up @@ -101,7 +105,9 @@ export abstract class Project<ContractType> {

// Private

private getInstanceByAddress (address: MainContractAddress | ContractAddressMap) {
private getInstanceByAddress (
address: MainContractAddress | ContractAddressMap
) {
return this.createInstance(address);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ContractData } from "../../../adapter";
import { ContractAddress } from "../../../domain/types";
import { ContractData } from "../../../adapter";
import { ImaInstance } from "../ImaInstance";


Expand Down

0 comments on commit b4c4a65

Please sign in to comment.