Skip to content

Commit 5026e23

Browse files
chore(deps): update typescript-eslint monorepo to v3 (major) (#3783)
1 parent 4ac2706 commit 5026e23

File tree

86 files changed

+543
-503
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+543
-503
lines changed

.eslintrc.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
],
1616
"rules": {
1717
"@typescript-eslint/await-thenable": "off",
18-
"@typescript-eslint/ban-ts-ignore": "off",
18+
"@typescript-eslint/ban-ts-comment": "off",
19+
"@typescript-eslint/ban-types": "off",
1920
"@typescript-eslint/camelcase": "off",
2021
"@typescript-eslint/explicit-function-return-type": "off",
2122
"@typescript-eslint/explicit-member-accessibility": ["error"],
@@ -24,16 +25,21 @@
2425
"@typescript-eslint/no-empty-function": "off",
2526
"@typescript-eslint/no-empty-interface": "off",
2627
"@typescript-eslint/no-explicit-any": "off",
28+
"@typescript-eslint/no-floating-promises": "off",
2729
"@typescript-eslint/no-inferrable-types": "off",
2830
"@typescript-eslint/no-misused-promises": "off",
2931
"@typescript-eslint/no-namespace": "off",
3032
"@typescript-eslint/no-non-null-assertion": "off",
33+
"@typescript-eslint/no-unsafe-assignment": "off",
3134
"@typescript-eslint/no-unsafe-call": "off",
3235
"@typescript-eslint/no-unsafe-member-access": "off",
36+
"@typescript-eslint/no-unsafe-return": "off",
3337
"@typescript-eslint/no-unused-vars": "off",
3438
"@typescript-eslint/no-var-requires": "off",
3539
"@typescript-eslint/prefer-regexp-exec": "off",
3640
"@typescript-eslint/require-await": "off",
41+
"@typescript-eslint/restrict-plus-operands": "off",
42+
"@typescript-eslint/restrict-template-expressions": "off",
3743
"@typescript-eslint/unbound-method": "off",
3844
"jest/no-standalone-expect": "off",
3945
"no-async-promise-executor": "off",

.github/workflows/functional.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,7 @@ jobs:
6060
run: mkdir -p $HOME/.core/database
6161

6262
- name: Functional tests
63-
run: yarn test __tests__/functional/core-database/ --coverage --coverageDirectory .coverage/functional/core-database/
64-
65-
- name: Codecov
66-
uses: codecov/codecov-action@v1
67-
with:
68-
file: .coverage/functional/core-database/clover.xml
69-
fail_ci_if_error: true
63+
run: yarn test __tests__/functional/core-database/
7064

7165
bridgechain-registration:
7266
runs-on: ubuntu-latest

.github/workflows/integration.yml

+1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,5 @@ jobs:
6868
uses: codecov/codecov-action@v1
6969
with:
7070
file: .coverage/integration/clover.xml
71+
flags: integration
7172
fail_ci_if_error: true

.github/workflows/unit.yml

+20
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
uses: codecov/codecov-action@v1
4242
with:
4343
file: .coverage/unit/core/clover.xml
44+
flags: unit
4445
fail_ci_if_error: true
4546

4647
core-api:
@@ -75,6 +76,7 @@ jobs:
7576
uses: codecov/codecov-action@v1
7677
with:
7778
file: .coverage/unit/core-api/clover.xml
79+
flags: unit
7880
fail_ci_if_error: true
7981

8082
core-blockchain:
@@ -109,6 +111,7 @@ jobs:
109111
uses: codecov/codecov-action@v1
110112
with:
111113
file: .coverage/unit/core-blockchain/clover.xml
114+
flags: unit
112115
fail_ci_if_error: true
113116

114117
core-cli:
@@ -143,6 +146,7 @@ jobs:
143146
uses: codecov/codecov-action@v1
144147
with:
145148
file: .coverage/unit/core-cli/clover.xml
149+
flags: unit
146150
fail_ci_if_error: true
147151

148152
core-database:
@@ -177,6 +181,7 @@ jobs:
177181
uses: codecov/codecov-action@v1
178182
with:
179183
file: .coverage/unit/core-database/clover.xml
184+
flags: unit
180185
fail_ci_if_error: true
181186

182187
core-forger:
@@ -211,6 +216,7 @@ jobs:
211216
uses: codecov/codecov-action@v1
212217
with:
213218
file: .coverage/unit/core-forger/clover.xml
219+
flags: unit
214220
fail_ci_if_error: true
215221

216222
core-kernel:
@@ -245,6 +251,7 @@ jobs:
245251
uses: codecov/codecov-action@v1
246252
with:
247253
file: .coverage/unit/core-kernel/clover.xml
254+
flags: unit
248255
fail_ci_if_error: true
249256

250257
core-logger-pino:
@@ -279,6 +286,7 @@ jobs:
279286
uses: codecov/codecov-action@v1
280287
with:
281288
file: .coverage/unit/core-logger-pino/clover.xml
289+
flags: unit
282290
fail_ci_if_error: true
283291

284292
core-magistrate-api:
@@ -313,6 +321,7 @@ jobs:
313321
uses: codecov/codecov-action@v1
314322
with:
315323
file: .coverage/unit/core-magistrate-api/clover.xml
324+
flags: unit
316325
fail_ci_if_error: true
317326

318327
core-magistrate-crypto:
@@ -347,6 +356,7 @@ jobs:
347356
uses: codecov/codecov-action@v1
348357
with:
349358
file: .coverage/unit/core-magistrate-crypto/clover.xml
359+
flags: unit
350360
fail_ci_if_error: true
351361

352362
core-magistrate-transactions:
@@ -381,6 +391,7 @@ jobs:
381391
uses: codecov/codecov-action@v1
382392
with:
383393
file: .coverage/unit/core-magistrate-transactions/clover.xml
394+
flags: unit
384395
fail_ci_if_error: true
385396

386397
core-manager:
@@ -415,6 +426,7 @@ jobs:
415426
uses: codecov/codecov-action@v1
416427
with:
417428
file: .coverage/unit/core-manager/clover.xml
429+
flags: unit
418430
fail_ci_if_error: true
419431

420432
core-p2p:
@@ -449,6 +461,7 @@ jobs:
449461
uses: codecov/codecov-action@v1
450462
with:
451463
file: .coverage/unit/core-p2p/clover.xml
464+
flags: unit
452465
fail_ci_if_error: true
453466

454467
core-snapshots:
@@ -483,6 +496,7 @@ jobs:
483496
uses: codecov/codecov-action@v1
484497
with:
485498
file: .coverage/unit/core-snapshots/clover.xml
499+
flags: unit
486500
fail_ci_if_error: true
487501

488502
core-state:
@@ -517,6 +531,7 @@ jobs:
517531
uses: codecov/codecov-action@v1
518532
with:
519533
file: .coverage/unit/core-state/clover.xml
534+
flags: unit
520535
fail_ci_if_error: true
521536

522537
core-test-framework:
@@ -551,6 +566,7 @@ jobs:
551566
uses: codecov/codecov-action@v1
552567
with:
553568
file: .coverage/unit/core-test-framework/clover.xml
569+
flags: unit
554570
fail_ci_if_error: true
555571

556572
core-transaction-pool:
@@ -585,6 +601,7 @@ jobs:
585601
uses: codecov/codecov-action@v1
586602
with:
587603
file: .coverage/unit/core-transaction-pool/clover.xml
604+
flags: unit
588605
fail_ci_if_error: true
589606

590607
core-transactions:
@@ -619,6 +636,7 @@ jobs:
619636
uses: codecov/codecov-action@v1
620637
with:
621638
file: .coverage/unit/core-transactions/clover.xml
639+
flags: unit
622640
fail_ci_if_error: true
623641

624642
core-webhooks:
@@ -653,6 +671,7 @@ jobs:
653671
uses: codecov/codecov-action@v1
654672
with:
655673
file: .coverage/unit/core-webhooks/clover.xml
674+
flags: unit
656675
fail_ci_if_error: true
657676

658677
crypto:
@@ -687,4 +706,5 @@ jobs:
687706
uses: codecov/codecov-action@v1
688707
with:
689708
file: .coverage/unit/crypto/clover.xml
709+
flags: unit
690710
fail_ci_if_error: true

__tests__/unit/core-manager/service-provider.test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const mockEventDispatcher = {
2222

2323
const setPluginConfiguration = (app: Application, serviceProvider: ServiceProvider, configuration: any) => {
2424
const pluginConfiguration = app.get<Providers.PluginConfiguration>(Container.Identifiers.PluginConfiguration);
25-
const instance: Providers.PluginConfiguration = pluginConfiguration.from("core-monitor", configuration);
25+
const instance: Providers.PluginConfiguration = pluginConfiguration.from("core-manager", configuration);
2626

2727
serviceProvider.setConfig(instance);
2828
};
@@ -120,6 +120,8 @@ describe("ServiceProvider", () => {
120120
it("should create wallet", async () => {
121121
const usedDefaults = { ...defaults };
122122

123+
usedDefaults.watcher.enabled = true;
124+
123125
setPluginConfiguration(app, serviceProvider, usedDefaults);
124126

125127
await expect(serviceProvider.register()).toResolve();

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
"@types/prettier": "^2.0.0",
6767
"@types/rimraf": "^3.0.0",
6868
"@types/uuid": "^8.0.0",
69-
"@typescript-eslint/eslint-plugin": "^2.25.0",
70-
"@typescript-eslint/parser": "^2.25.0",
69+
"@typescript-eslint/eslint-plugin": "^3.0.0",
70+
"@typescript-eslint/parser": "^3.0.0",
7171
"babel-loader": "^8.1.0",
7272
"capture-console": "^1.0.1",
7373
"codecov": "^3.6.5",

packages/core-blockchain/src/blockchain.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@ export class Blockchain implements Contracts.Blockchain.Blockchain {
1212
@Container.inject(Container.Identifiers.Application)
1313
public readonly app!: Contracts.Kernel.Application;
1414

15-
// todo: make this private
16-
public isStopped!: boolean;
17-
// todo: make this private
18-
public options: any;
19-
// todo: make this private and use a queue instance from core-kernel
20-
// @ts-ignore
21-
public queue: async.AsyncQueue<any>;
22-
// todo: make this private
23-
// @ts-ignore
24-
protected blockProcessor: BlockProcessor;
25-
2615
@Container.inject(Container.Identifiers.StateStore)
2716
private readonly state!: Contracts.State.StateStore;
2817

@@ -41,6 +30,17 @@ export class Blockchain implements Contracts.Blockchain.Blockchain {
4130
@Container.inject(Container.Identifiers.EventDispatcherService)
4231
private readonly emitter!: Contracts.Kernel.EventDispatcher;
4332

33+
// todo: make this private
34+
public isStopped!: boolean;
35+
// todo: make this private
36+
public options: any;
37+
// todo: make this private and use a queue instance from core-kernel
38+
// @ts-ignore
39+
public queue: async.AsyncQueue<any>;
40+
// todo: make this private
41+
// @ts-ignore
42+
protected blockProcessor: BlockProcessor;
43+
4444
private missedBlocks: number = 0;
4545

4646
/**

0 commit comments

Comments
 (0)