diff --git a/.vscode/settings.json b/.vscode/settings.json index 6deace9..f0f2ef7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,22 @@ { + "biome.lspBin": "./node_modules/.bin/biome", + "[javascript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[typescript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[json]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[jsonc]": { + "editor.defaultFormatter": "biomejs.biome" + }, "cSpell.words": ["delvtech"] } diff --git a/biome.jsonc b/biome.jsonc index 9e370ac..226325d 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -22,7 +22,10 @@ "rules": { "style": { - "noNonNullAssertion": "info" + "noNonNullAssertion": { + "level": "info", + "fix": "none" + } }, "suspicious": { "noExplicitAny": "info" diff --git a/packages/evm-client/src/contract/utils/arrayToFriendly.test.ts b/packages/evm-client/src/contract/utils/arrayToFriendly.test.ts index b1a5228..1b00fbe 100644 --- a/packages/evm-client/src/contract/utils/arrayToFriendly.test.ts +++ b/packages/evm-client/src/contract/utils/arrayToFriendly.test.ts @@ -53,7 +53,7 @@ describe("arrayToFriendly", () => { }); }); -export const exampleAbi = [ +const exampleAbi = [ { inputs: [ { name: "", type: "address" }, diff --git a/packages/evm-client/src/contract/utils/arrayToObject.test.ts b/packages/evm-client/src/contract/utils/arrayToObject.test.ts index 42c8fa8..732a811 100644 --- a/packages/evm-client/src/contract/utils/arrayToObject.test.ts +++ b/packages/evm-client/src/contract/utils/arrayToObject.test.ts @@ -40,7 +40,7 @@ describe("arrayToObject", () => { }); }); -export const exampleAbi = [ +const exampleAbi = [ { inputs: [ { name: "", type: "address" }, diff --git a/packages/evm-client/src/contract/utils/objectToArray.test.ts b/packages/evm-client/src/contract/utils/objectToArray.test.ts index fcedf5b..bcaaa8b 100644 --- a/packages/evm-client/src/contract/utils/objectToArray.test.ts +++ b/packages/evm-client/src/contract/utils/objectToArray.test.ts @@ -48,7 +48,7 @@ describe("objectToArray", () => { expect(emptyArrayFromUndefined).toEqual([]); }); -export const exampleAbi = [ +const exampleAbi = [ { inputs: [ { name: "", type: "address" }, diff --git a/packages/evm-client/src/network/stubs/NetworkStub.ts b/packages/evm-client/src/network/stubs/NetworkStub.ts index 645af39..0b09112 100644 --- a/packages/evm-client/src/network/stubs/NetworkStub.ts +++ b/packages/evm-client/src/network/stubs/NetworkStub.ts @@ -96,7 +96,7 @@ export class NetworkStub implements Network { getBalance(...args: NetworkGetBalanceArgs): Promise { if (!this.getBalanceStub) { throw new Error( - `The getBalance function must be stubbed first:\n\tcontract.stubGetBalance()`, + "The getBalance function must be stubbed first:\n\tcontract.stubGetBalance()", ); } return this.getBalanceStub(args); @@ -105,7 +105,7 @@ export class NetworkStub implements Network { getBlock(...args: NetworkGetBlockArgs): Promise { if (!this.getBlockStub) { throw new Error( - `The getBlock function must be stubbed first:\n\tcontract.stubGetBlock()`, + "The getBlock function must be stubbed first:\n\tcontract.stubGetBlock()", ); } return this.getBlockStub(args); @@ -114,7 +114,7 @@ export class NetworkStub implements Network { getChainId(): Promise { if (!this.getChainIdStub) { throw new Error( - `The getChainId function must be stubbed first:\n\tcontract.stubGetChainId()`, + "The getChainId function must be stubbed first:\n\tcontract.stubGetChainId()", ); } return this.getChainIdStub(); @@ -125,7 +125,7 @@ export class NetworkStub implements Network { ): Promise { if (!this.getTransactionStub) { throw new Error( - `The getTransaction function must be stubbed first:\n\tcontract.stubGetTransaction()`, + "The getTransaction function must be stubbed first:\n\tcontract.stubGetTransaction()", ); } return this.getTransactionStub(args); @@ -134,6 +134,7 @@ export class NetworkStub implements Network { async waitForTransaction( ...[hash, { timeout = 60_000 } = {}]: NetworkWaitForTransactionArgs ): Promise { + // biome-ignore lint/suspicious/noAsyncPromiseExecutor: special case for testing return new Promise(async (resolve) => { let transaction: Transaction | undefined;