Skip to content

Commit 2c4cb8f

Browse files
authored
Fix: all the biome errors and update biome (#86)
1 parent dc25914 commit 2c4cb8f

File tree

28 files changed

+265
-266
lines changed

28 files changed

+265
-266
lines changed

basics/account-data/native/tests/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { start } from 'solana-bankrun';
66

77
class Assignable {
88
constructor(properties) {
9-
Object.keys(properties).map((key) => {
10-
return (this[key] = properties[key]);
11-
});
9+
for (const [key, value] of Object.entries(properties)) {
10+
this[key] = value;
11+
}
1212
}
1313
}
1414

basics/counter/native/ts/instructions/createIncrementInstruction.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import { PROGRAM_ID } from '../';
44
export type IncrementInstructionAccounts = {
55
counter: PublicKey;
66
};
7-
export type IncrementInstructionArgs = {};
87

9-
export function createIncrementInstruction(accounts: IncrementInstructionAccounts, args: IncrementInstructionArgs): TransactionInstruction {
8+
export function createIncrementInstruction(accounts: IncrementInstructionAccounts): TransactionInstruction {
109
return new TransactionInstruction({
1110
programId: PROGRAM_ID,
1211
keys: [

basics/create-account/anchor/tests/test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ describe('Create a system account', () => {
2828

2929
// Check that the account was created
3030
const accountInfo = await connection.getAccountInfo(newKeypair.publicKey);
31-
assert((accountInfo.owner = SystemProgram.programId));
3231
assert(accountInfo.lamports === lamports);
3332
});
3433
});

basics/cross-program-invocation/native/tests/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ describe('CPI Example', () => {
1414

1515
class Assignable {
1616
constructor(properties) {
17-
Object.keys(properties).map((key) => {
18-
return (this[key] = properties[key]);
19-
});
17+
for (const [key, value] of Object.entries(properties)) {
18+
this[key] = value;
19+
}
2020
}
2121
}
2222

basics/pda-rent-payer/native/tests/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ describe('PDA Rent-Payer', async () => {
1212

1313
class Assignable {
1414
constructor(properties) {
15-
Object.keys(properties).map((key) => {
16-
return (this[key] = properties[key]);
17-
});
15+
for (const [key, value] of Object.entries(properties)) {
16+
this[key] = value;
17+
}
1818
}
1919
}
2020

basics/processing-instructions/native/tests/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ describe('custom-instruction-data', async () => {
1212

1313
class Assignable {
1414
constructor(properties) {
15-
Object.keys(properties).map((key) => {
16-
return (this[key] = properties[key]);
17-
});
15+
for (const [key, value] of Object.entries(properties)) {
16+
this[key] = value;
17+
}
1818
}
1919
}
2020

basics/program-derived-addresses/native/tests/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ describe('PDAs', async () => {
1313

1414
class Assignable {
1515
constructor(properties) {
16-
Object.keys(properties).map((key) => {
17-
return (this[key] = properties[key]);
18-
});
16+
for (const [key, value] of Object.entries(properties)) {
17+
this[key] = value;
18+
}
1919
}
2020
}
2121

basics/rent/native/tests/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ describe('Create a system account', async () => {
1212

1313
class Assignable {
1414
constructor(properties) {
15-
Object.keys(properties).map((key) => {
16-
return (this[key] = properties[key]);
17-
});
15+
for (const [key, value] of Object.entries(properties)) {
16+
this[key] = value;
17+
}
1818
}
1919
}
2020

basics/repository-layout/native/tests/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ describe('Carnival', async () => {
1212

1313
class Assignable {
1414
constructor(properties) {
15-
Object.keys(properties).map((key) => {
16-
return (this[key] = properties[key]);
17-
});
15+
for (const [key, value] of Object.entries(properties)) {
16+
this[key] = value;
17+
}
1818
}
1919
}
2020

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"formatter": {
3636
"jsxQuoteStyle": "double",
3737
"quoteProperties": "asNeeded",
38-
"trailingComma": "all",
38+
"trailingCommas": "all",
3939
"semicolons": "always",
4040
"arrowParentheses": "always",
4141
"bracketSpacing": true,

0 commit comments

Comments
 (0)