Skip to content

Commit

Permalink
Manual lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangoree committed Sep 17, 2024
1 parent 4cd676b commit 3a72335
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 8 deletions.
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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"]
}
5 changes: 4 additions & 1 deletion biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@

"rules": {
"style": {
"noNonNullAssertion": "info"
"noNonNullAssertion": {
"level": "info",
"fix": "none"
}
},
"suspicious": {
"noExplicitAny": "info"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe("arrayToFriendly", () => {
});
});

export const exampleAbi = [
const exampleAbi = [
{
inputs: [
{ name: "", type: "address" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe("arrayToObject", () => {
});
});

export const exampleAbi = [
const exampleAbi = [
{
inputs: [
{ name: "", type: "address" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("objectToArray", () => {
expect(emptyArrayFromUndefined).toEqual([]);
});

export const exampleAbi = [
const exampleAbi = [
{
inputs: [
{ name: "", type: "address" },
Expand Down
9 changes: 5 additions & 4 deletions packages/evm-client/src/network/stubs/NetworkStub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class NetworkStub implements Network {
getBalance(...args: NetworkGetBalanceArgs): Promise<bigint> {
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);
Expand All @@ -105,7 +105,7 @@ export class NetworkStub implements Network {
getBlock(...args: NetworkGetBlockArgs): Promise<Block | undefined> {
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);
Expand All @@ -114,7 +114,7 @@ export class NetworkStub implements Network {
getChainId(): Promise<number> {
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();
Expand All @@ -125,7 +125,7 @@ export class NetworkStub implements Network {
): Promise<Transaction | undefined> {
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);
Expand All @@ -134,6 +134,7 @@ export class NetworkStub implements Network {
async waitForTransaction(
...[hash, { timeout = 60_000 } = {}]: NetworkWaitForTransactionArgs
): Promise<TransactionReceipt | undefined> {
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: special case for testing
return new Promise(async (resolve) => {
let transaction: Transaction | undefined;

Expand Down

0 comments on commit 3a72335

Please sign in to comment.