diff --git a/typescript/base/.eslintrc.cjs b/typescript/base/.eslintrc.cjs index 896c99a..cb1e833 100644 --- a/typescript/base/.eslintrc.cjs +++ b/typescript/base/.eslintrc.cjs @@ -36,6 +36,17 @@ module.exports = { "padded-blocks": [ "error", "never" + ], + "function-paren-newline": [ + "error", + "multiline-arguments" + ], + "no-extra-parens": [ + "error", + "all", + { + "nestedBinaryExpressions": false + } ] } }; diff --git a/typescript/base/src/project.ts b/typescript/base/src/project.ts index 31ef703..c67f41b 100644 --- a/typescript/base/src/project.ts +++ b/typescript/base/src/project.ts @@ -49,9 +49,13 @@ export abstract class Project { } 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); } @@ -101,7 +105,9 @@ export abstract class Project { // Private - private getInstanceByAddress (address: MainContractAddress | ContractAddressMap) { + private getInstanceByAddress ( + address: MainContractAddress | ContractAddressMap + ) { return this.createInstance(address); } diff --git a/typescript/base/src/projects/ima/mainnet/MainnetImaInstance.ts b/typescript/base/src/projects/ima/mainnet/MainnetImaInstance.ts index 1c5bffd..f6c9e35 100644 --- a/typescript/base/src/projects/ima/mainnet/MainnetImaInstance.ts +++ b/typescript/base/src/projects/ima/mainnet/MainnetImaInstance.ts @@ -1,5 +1,5 @@ -import { ContractData } from "../../../adapter"; import { ContractAddress } from "../../../domain/types"; +import { ContractData } from "../../../adapter"; import { ImaInstance } from "../ImaInstance";