Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Typescript and ESLint #342

Merged
merged 1 commit into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.13.1-alpine3.14
FROM node:18.15.0-alpine3.16

WORKDIR /app

Expand Down
1 change: 1 addition & 0 deletions packages/address-watcher/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@typescript-eslint"
],
"rules": {
"indent": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [
"warn",
Expand Down
4 changes: 2 additions & 2 deletions packages/address-watcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.47.1",
"chai": "^4.3.4",
"eslint": "^7.27.0",
"eslint": "^8.35.0",
"eslint-config-semistandard": "^15.0.1",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.23.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/address-watcher/src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { BlockProgress } from './entity/BlockProgress';
import { Trace } from './entity/Trace';

export class Database {
_config: ConnectionOptions
_conn!: Connection
_config: ConnectionOptions;
_conn!: Connection;

constructor (config: ConnectionOptions) {
assert(config);
Expand Down
2 changes: 1 addition & 1 deletion packages/address-watcher/src/entity/BlockProgress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export class BlockProgress {
numTracedTx!: number;

@Column('boolean')
isComplete!: boolean
isComplete!: boolean;
}
2 changes: 1 addition & 1 deletion packages/address-watcher/src/entity/Trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ export class Trace {
trace!: string;

@ManyToMany(() => Account, account => account.appearances, { eager: true, cascade: ['insert'] })
accounts: Account[]
accounts: Account[];
}
8 changes: 4 additions & 4 deletions packages/address-watcher/src/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import { BlockProgress } from './entity/BlockProgress';
const log = debug('vulcanize:indexer');

export class Indexer {
_db: Database
_ethClient: EthClient
_getStorageAt: GetStorageAt
_tracingClient: TracingClient
_db: Database;
_ethClient: EthClient;
_getStorageAt: GetStorageAt;
_tracingClient: TracingClient;

constructor (db: Database, ethClient: EthClient, tracingClient: TracingClient) {
assert(db);
Expand Down
10 changes: 5 additions & 5 deletions packages/address-watcher/src/tx-watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export const BlockProgressEvent = 'block-progress-event';
export const QUEUE_TX_TRACING = 'tx-tracing';

export class TxWatcher {
_ethClient: EthClient
_indexer: Indexer
_pubsub: PubSub
_watchTxSubscription: ZenObservable.Subscription | undefined
_jobQueue: JobQueue
_ethClient: EthClient;
_indexer: Indexer;
_pubsub: PubSub;
_watchTxSubscription: ZenObservable.Subscription | undefined;
_jobQueue: JobQueue;

constructor (ethClient: EthClient, indexer: Indexer, pubsub: PubSub, jobQueue: JobQueue) {
this._ethClient = ethClient;
Expand Down
1 change: 1 addition & 0 deletions packages/cache/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@typescript-eslint"
],
"rules": {
"indent": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [
"error",
Expand Down
4 changes: 2 additions & 2 deletions packages/cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"@types/level": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.47.1",
"eslint": "^7.27.0",
"eslint": "^8.35.0",
"eslint-config-semistandard": "^15.0.1",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.23.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/cli/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@typescript-eslint"
],
"rules": {
"indent": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [
"warn",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
"@typescript-eslint/parser": "^5.47.1",
"eslint-config-semistandard": "^15.0.1",
"eslint-config-standard": "^5.0.0",
"eslint-plugin-import": "^2.23.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"typescript": "^4.9.4"
"typescript": "^5.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/cli/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class BaseCmd {
_config?: Config;
_clients?: Clients;
_ethProvider?: JsonRpcProvider;
_jobQueue?: JobQueue
_jobQueue?: JobQueue;
_database?: DatabaseInterface;
_indexer?: IndexerInterface;
_eventWatcher?: EventWatcher;
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/checkpoint/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ interface Arguments {
}

export class CreateCheckpointCmd {
_argv?: Arguments
_baseCmd: BaseCmd
_argv?: Arguments;
_baseCmd: BaseCmd;

constructor () {
this._baseCmd = new BaseCmd();
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/checkpoint/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ interface Arguments {
}

export class VerifyCheckpointCmd {
_argv?: Arguments
_baseCmd: BaseCmd
_argv?: Arguments;
_baseCmd: BaseCmd;

constructor () {
this._baseCmd = new BaseCmd();
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/export-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface Arguments {
}

export class ExportStateCmd {
_argv?: Arguments
_argv?: Arguments;
_baseCmd: BaseCmd;

constructor () {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/fill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface Arguments {
}

export class FillCmd {
_argv?: Arguments
_argv?: Arguments;
_baseCmd: BaseCmd;

constructor () {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/import-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface Arguments {
}

export class ImportStateCmd {
_argv?: Arguments
_argv?: Arguments;
_baseCmd: BaseCmd;

constructor () {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/inspect-cid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface Arguments {
}

export class InspectCIDCmd {
_argv?: Arguments
_argv?: Arguments;
_baseCmd: BaseCmd;

constructor () {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/job-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface Arguments {
}

export class JobRunnerCmd {
_argv?: Arguments
_argv?: Arguments;
_baseCmd: BaseCmd;

constructor () {
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/reset/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ interface Arguments {
}

export class ResetStateCmd {
_argv?: Arguments
_argv?: Arguments;
_config?: Config;
_database?: DatabaseInterface
_database?: DatabaseInterface;

async initConfig (configFile: string): Promise<Config> {
this._config = await getConfig(configFile);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/reset/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface Arguments {
}

export class ResetWatcherCmd {
_argv?: Arguments
_argv?: Arguments;
_baseCmd: BaseCmd;

constructor () {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ interface Arguments {
}

export class ServerCmd {
_argv?: Arguments
_argv?: Arguments;
_baseCmd: BaseCmd;

constructor () {
Expand Down
1 change: 1 addition & 0 deletions packages/codegen/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@typescript-eslint"
],
"rules": {
"indent": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [
"warn",
Expand Down
6 changes: 3 additions & 3 deletions packages/codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"node-fetch": "^2",
"solc": "0.8.13",
"ts-node": "^10.2.1",
"typescript": "^4.3.2",
"typescript": "^5.0.2",
"yargs": "^17.1.1"
},
"devDependencies": {
Expand All @@ -43,10 +43,10 @@
"@types/node": "^16.9.0",
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.47.1",
"eslint": "^7.27.0",
"eslint": "^8.35.0",
"eslint-config-semistandard": "^15.0.1",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.23.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/codegen/src/templates/package-template.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"eslint": "^7.27.0",
"eslint-config-semistandard": "^15.0.1",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.23.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/eden-watcher/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@typescript-eslint"
],
"rules": {
"indent": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [
"warn",
Expand Down
6 changes: 3 additions & 3 deletions packages/eden-watcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.47.1",
"copyfiles": "^2.4.1",
"eslint": "^7.27.0",
"eslint": "^8.35.0",
"eslint-config-semistandard": "^15.0.1",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.23.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"ts-node": "^10.2.1",
"typescript": "^4.3.2"
"typescript": "^5.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/Account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export class Account {
totalSlashed!: bigint;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/Block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ export class Block {
size!: bigint;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/Claim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ export class Claim {
claimed!: bigint;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/Distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ export class Distribution {
metadataURI!: string;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/Distributor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export class Distributor {
currentDistribution!: string;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/Epoch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ export class Epoch {
producerBlocksRatio!: Decimal;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ export class Network {
stakedPercentiles!: bigint[];

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/Producer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ export class Producer {
pendingEpochBlocks!: bigint;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/ProducerEpoch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ export class ProducerEpoch {
blocksProducedRatio!: Decimal;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export class ProducerRewardCollectorChange {
rewardCollector!: string;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/ProducerSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export class ProducerSet {
producers!: string[];

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/ProducerSetChange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ export class ProducerSetChange {
changeType!: ProducerSetChangeType;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/RewardSchedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ export class RewardSchedule {
activeRewardScheduleEntry!: string;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
2 changes: 1 addition & 1 deletion packages/eden-watcher/src/entity/RewardScheduleEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export class RewardScheduleEntry {
rewardsPerEpoch!: bigint;

@Column('boolean', { default: false })
isPruned!: boolean
isPruned!: boolean;
}
Loading