Skip to content

Commit aef6465

Browse files
committed
added whitespace linting rule
1 parent a09cfdf commit aef6465

File tree

12 files changed

+42
-44
lines changed

12 files changed

+42
-44
lines changed

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ export default defineConfig([
5151
'no-undef': 'error',
5252
'no-async-promise-executor': 'off',
5353
'semi': ['error', 'always'],
54-
'indent': ['error', 2, { SwitchCase: 1 }],
5554
'no-case-declarations': 'off',
5655
'no-bitwise': 'error',
5756
'spaced-comment': ['error', 'always', { exceptions: ['-', '+'] }],
5857
'@stylistic/object-curly-spacing': ['error', 'always'],
58+
'@stylistic/indent': ['error', 2, { SwitchCase: 1 }],
5959
'object-curly-spacing': ['error', 'always'],
6060
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
6161
'comma-spacing': ['error', { before: false, after: true }],

packages/bitcore-node/src/models/coin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ export class CoinModel extends BaseModel<ICoin> {
131131

132132
resolveAuthhead(mintTxid: string, chain?: string, network?: string) {
133133
return this.collection
134-
.aggregate<{
134+
.aggregate<
135+
{
135136
chain: string;
136137
network: string;
137138
authbase: string;

packages/bitcore-node/src/providers/chain-state/evm/api/gnosis.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ import { EventLog } from '../types';
1616
import { BaseEVMStateProvider } from './csp';
1717

1818
type MULTISIGInstantiation = EventLog<{
19-
[key: string]: string;
20-
}>
19+
[key: string]: string;
20+
}>
2121

2222
type MULTISIGTxInfo = EventLog<{
23-
[key: string]: string;
24-
}>
23+
[key: string]: string;
24+
}>
2525

2626
function getCSP(chain: string, network: string) {
2727
return ChainStateProvider.get({ chain, network }) as BaseEVMStateProvider;

packages/bitcore-node/src/providers/chain-state/evm/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,10 @@ export interface EventLog<T> {
263263
raw?: { data: string; topics: any[] };
264264
}
265265
export type ERC20Transfer = EventLog<{
266-
[key: string]: string;
267-
}>
266+
[key: string]: string;
267+
}>
268268

269269
export interface IEVMCachedAddress {
270-
address: string;
271-
tokenAddress?: string;
272-
}
270+
address: string;
271+
tokenAddress?: string;
272+
}

packages/bitcore-node/src/providers/chain-state/external/streams/apiStream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class ExternalApiStream extends ReadableWithEventPipe {
7575

7676
// handles events emitted by the streamed response, request from client, and response to client
7777
static onStream(stream: Readable, req: Request, res: Response, opts: StreamOpts = {}):
78-
Promise<{ success: boolean, error?: any }> {
78+
Promise<{ success: boolean, error?: any }> {
7979
return new Promise<{ success: boolean, error?: any }>((resolve, reject) => {
8080
let closed = false;
8181
let isFirst = true;

packages/bitcore-node/src/providers/chain-state/external/streams/nodeStream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class NodeQueryStream extends Readable {
3838
}
3939

4040
static onStream(stream: Readable, req: Request, res: Response):
41-
Promise<{ success: boolean, error?: any }> {
41+
Promise<{ success: boolean, error?: any }> {
4242
return ExternalApiStream.onStream(stream, req, res);
4343
}
4444

packages/bitcore-node/src/providers/chain-state/internal/internal.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -543,10 +543,7 @@ export class InternalStateProvider implements IChainStateService {
543543
const start = startDate && isValidDate(startDate) ? new Date(startDate) : oneMonth;
544544
const end = endDate && isValidDate(endDate) ? formatDate(new Date(endDate)) : todayTruncatedUTC;
545545
const results = await BitcoinBlockStorage.collection
546-
.aggregate<{
547-
date: string;
548-
transactionCount: number;
549-
}>([
546+
.aggregate<{ date: string, transactionCount: number }>([
550547
{
551548
$match: {
552549
chain,

packages/bitcore-node/src/providers/fee/blockcypher.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ export class BlockCypherClass implements IFeeProvider {
1414
mainnet: FeeCacheType;
1515
testnet3: FeeCacheType;
1616
} = {
17-
mainnet: {
18-
timestamp: 0,
19-
response: null
20-
},
21-
testnet3: {
22-
timestamp: 0,
23-
response: null
24-
}
25-
};
17+
mainnet: {
18+
timestamp: 0,
19+
response: null
20+
},
21+
testnet3: {
22+
timestamp: 0,
23+
response: null
24+
}
25+
};
2626

2727
public async getFee(network: NetworkType, nblocks: number): Promise<number> {
2828
try {

packages/bitcore-node/src/providers/fee/mempoolspace.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ export class MempoolSpaceClass implements IFeeProvider {
1818
testnet3: FeeCacheType;
1919
testnet4: FeeCacheType;
2020
} = {
21-
mainnet: {
22-
timestamp: 0,
23-
response: null
24-
},
25-
testnet3: {
26-
timestamp: 0,
27-
response: null
28-
},
29-
testnet4: {
30-
timestamp: 0,
31-
response: null
32-
}
33-
};
21+
mainnet: {
22+
timestamp: 0,
23+
response: null
24+
},
25+
testnet3: {
26+
timestamp: 0,
27+
response: null
28+
},
29+
testnet4: {
30+
timestamp: 0,
31+
response: null
32+
}
33+
};
3434

3535
private cacheTime = 1000 * 90; // 90 seconds
3636

packages/bitcore-node/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Node >= 17 started attempting to resolve all dns listings by ipv6 first, these lines are required to make it check ipv4 first
2-
// eslint-disable-next-line import/order, import/newline-after-import
2+
// eslint-disable-next-line import/newline-after-import
33
import { setDefaultResultOrder } from 'dns';
44
setDefaultResultOrder('ipv4first');
55
import './utils/polyfills';

0 commit comments

Comments
 (0)