Skip to content

Commit 0ad4c95

Browse files
authored
fix: lint import orders + code style for multichain (#1321)
1 parent 332d849 commit 0ad4c95

38 files changed

+799
-799
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"useIgnoreFile": false
77
},
88
"files": {
9-
"includes": ["**", "!**/node_modules/**", "!**/dist/**"],
9+
"includes": ["packages/sdk-multichain/src/**", "!**/node_modules/**", "!**/dist/**"],
1010
"ignoreUnknown": false
1111
},
1212
"formatter": {
@@ -22,7 +22,7 @@
2222
},
2323
"javascript": {
2424
"formatter": {
25-
"quoteStyle": "double"
25+
"quoteStyle": "single"
2626
}
2727
},
2828
"assist": {
@@ -33,4 +33,4 @@
3333
}
3434
}
3535
}
36-
}
36+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"@babel/core": "^7.23.5",
6060
"@babel/plugin-syntax-flow": "^7.21.4",
6161
"@babel/plugin-transform-react-jsx": "^7.21.5",
62+
"@biomejs/biome": "2.0.0",
6263
"@commitlint/cli": "^17.6.7",
6364
"@commitlint/config-conventional": "^17.6.7",
6465
"@lavamoat/allow-scripts": "^2.3.1",

packages/sdk-multichain/src/domain/errors/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ErrorCodes } from "./types";
1+
import type { ErrorCodes } from './types';
22

33
export abstract class BaseErr<C extends string, T extends ErrorCodes> extends Error {
44
constructor(
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from "./rpc";
2-
export * from "./types";
1+
export * from './rpc';
2+
export * from './types';

packages/sdk-multichain/src/domain/errors/rpc.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { BaseErr } from "./base";
2-
import type { RPCErrorCodes } from "./types";
1+
import { BaseErr } from './base';
2+
import type { RPCErrorCodes } from './types';
33

4-
export class RPCHttpErr extends BaseErr<"RPC", RPCErrorCodes> {
4+
export class RPCHttpErr extends BaseErr<'RPC', RPCErrorCodes> {
55
static readonly code = 50;
66
constructor(
77
readonly rpcEndpoint: string,
@@ -12,21 +12,21 @@ export class RPCHttpErr extends BaseErr<"RPC", RPCErrorCodes> {
1212
}
1313
}
1414

15-
export class RPCReadonlyResponseErr extends BaseErr<"RPC", RPCErrorCodes> {
15+
export class RPCReadonlyResponseErr extends BaseErr<'RPC', RPCErrorCodes> {
1616
static readonly code = 51;
1717
constructor(public readonly reason: string) {
1818
super(`RPCErr${RPCReadonlyResponseErr.code}: RPC Client response reason ${reason}`, RPCReadonlyResponseErr.code);
1919
}
2020
}
2121

22-
export class RPCReadonlyRequestErr extends BaseErr<"RPC", RPCErrorCodes> {
22+
export class RPCReadonlyRequestErr extends BaseErr<'RPC', RPCErrorCodes> {
2323
static readonly code = 52;
2424
constructor(public readonly reason: string) {
2525
super(`RPCErr${RPCReadonlyRequestErr.code}: RPC Client fetch reason ${reason}`, RPCReadonlyRequestErr.code);
2626
}
2727
}
2828

29-
export class RPCInvokeMethodErr extends BaseErr<"RPC", RPCErrorCodes> {
29+
export class RPCInvokeMethodErr extends BaseErr<'RPC', RPCErrorCodes> {
3030
static readonly code = 53;
3131
constructor(public readonly reason: string) {
3232
super(`RPCErr${RPCInvokeMethodErr.code}: RPC Client invoke method reason ${reason}`, RPCInvokeMethodErr.code);

packages/sdk-multichain/src/domain/errors/storage.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
import { BaseErr } from "./base";
2-
import type { StorageErrorCodes } from "./types";
1+
import { BaseErr } from './base';
2+
import type { StorageErrorCodes } from './types';
33

4-
export class StorageGetErr extends BaseErr<"Storage", StorageErrorCodes> {
4+
export class StorageGetErr extends BaseErr<'Storage', StorageErrorCodes> {
55
static readonly code = 60;
66
constructor(
7-
public readonly platform: "web" | "rn" | "node",
7+
public readonly platform: 'web' | 'rn' | 'node',
88
public readonly key: string,
99
public readonly reason: string,
1010
) {
1111
super(`StorageErr${StorageGetErr.code}: ${platform} storage get error in key: ${key} - ${reason}`, StorageGetErr.code);
1212
}
1313
}
1414

15-
export class StorageSetErr extends BaseErr<"Storage", StorageErrorCodes> {
15+
export class StorageSetErr extends BaseErr<'Storage', StorageErrorCodes> {
1616
static readonly code = 61;
1717
constructor(
18-
public readonly platform: "web" | "rn" | "node",
18+
public readonly platform: 'web' | 'rn' | 'node',
1919
public readonly key: string,
2020
public readonly reason: string,
2121
) {
2222
super(`StorageErr${StorageSetErr.code}: ${platform} storage set error in key: ${key} - ${reason}`, StorageSetErr.code);
2323
}
2424
}
2525

26-
export class StorageDeleteErr extends BaseErr<"Storage", StorageErrorCodes> {
26+
export class StorageDeleteErr extends BaseErr<'Storage', StorageErrorCodes> {
2727
static readonly code = 62;
2828
constructor(
29-
public readonly platform: "web" | "rn" | "node",
29+
public readonly platform: 'web' | 'rn' | 'node',
3030
public readonly key: string,
3131
public readonly reason: string,
3232
) {

packages/sdk-multichain/src/domain/errors/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export type Enumerate<N extends number, Acc extends number[] = []> = Acc["length"] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc["length"]]>;
1+
export type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc['length']]>;
22

33
export type ErrorCodeRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
44

packages/sdk-multichain/src/domain/events/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { EventEmitter2 } from "eventemitter2";
1+
import { EventEmitter2 } from 'eventemitter2';
22

3-
import type { EventTypes } from "./types";
3+
import type { EventTypes } from './types';
44

55
/**
66
* A type-safe event emitter that provides a strongly-typed wrapper around EventEmitter2.
@@ -61,4 +61,4 @@ export class EventEmitter<TEvents extends Record<string, unknown[]> = EventTypes
6161
}
6262
}
6363

64-
export type * from "./types";
64+
export type * from './types';
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { ExtensionEvents } from "./extension";
2-
import type { SDKEvents } from "./sdk";
1+
import type { ExtensionEvents } from './extension';
2+
import type { SDKEvents } from './sdk';
33

44
export type EventTypes = SDKEvents | ExtensionEvents;
55
export type { SDKEvents, ExtensionEvents };

0 commit comments

Comments
 (0)