Skip to content

Commit 80a5407

Browse files
authored
Update JS dependencies for api augment and e2e tests (#1965)
# Goal The goal of this PR is to get Api Augment to Polkadotjs v11+ # Discussion - Update eslint to flat config files and ready for v9 - Polkadotjs/api v11 - Node to v20.12.2 - Other small package updates
1 parent a3abf5b commit 80a5407

36 files changed

+2895
-5248
lines changed

e2e/.eslintrc.cjs

Lines changed: 0 additions & 24 deletions
This file was deleted.

e2e/.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.11.1
1+
20.12.2

e2e/.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nodejs 20.11.1
1+
nodejs 20.12.2

e2e/eslint.config.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
import mochaPlugin from 'eslint-plugin-mocha';
6+
7+
export default tseslint.config(
8+
eslint.configs.recommended,
9+
...tseslint.configs.strict,
10+
...tseslint.configs.stylistic,
11+
mochaPlugin.configs.flat.recommended,
12+
{
13+
rules: {
14+
'@typescript-eslint/no-empty-interface': 'off',
15+
'@typescript-eslint/no-unused-vars': 'off',
16+
'@typescript-eslint/no-explicit-any': 'off',
17+
'@typescript-eslint/no-non-null-assertion': 'off',
18+
'@typescript-eslint/no-inferrable-types': 'off',
19+
'@typescript-eslint/no-extraneous-class': 'off',
20+
semi: ['error', 'always'],
21+
'mocha/no-setup-in-describe': 'off',
22+
'no-use-before-define': 'off',
23+
'no-unused-vars': 'off',
24+
'no-var': 'error',
25+
'id-length': [
26+
'error',
27+
{
28+
exceptionPatterns: ['[i-k]', 'e', 'c', 'x', 'y', 'r', 's', 'v', 'f', '_'],
29+
properties: 'never',
30+
},
31+
],
32+
'allow-namespace': 'off',
33+
},
34+
}
35+
);

e2e/load-tests/signatureRegistry.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('MSA Initializer Load Tests', function () {
3131
let blockNumber = await getBlockNumber();
3232
console.log('Starting Block Number:', blockNumber);
3333

34-
let signatureCallTests: Array<KeyringPair> = [];
34+
let signatureCallTests: KeyringPair[] = [];
3535

3636
// Make 50k signatures via 50k/2 loops
3737
const loopCount = 25_000;
@@ -89,7 +89,7 @@ async function generateMsas(count: number = 1): Promise<GeneratedMsa[]> {
8989
const fundingSource = getFundingSource('load-signature-registry');
9090

9191
// Create and fund the control keys
92-
const controlKeyPromises: Array<Promise<KeyringPair>> = [];
92+
const controlKeyPromises: Promise<KeyringPair>[] = [];
9393
let devAccountNonce = await getNonce(fundingSource);
9494
const ed = await getExistentialDeposit();
9595
for (let i = 0; i < count; i++) {
@@ -100,7 +100,7 @@ async function generateMsas(count: number = 1): Promise<GeneratedMsa[]> {
100100
const controlKeys = await Promise.all(controlKeyPromises);
101101

102102
// Create the msas
103-
const msaPromises: Array<Promise<GeneratedMsa>> = [];
103+
const msaPromises: Promise<GeneratedMsa>[] = [];
104104
for (let i = 0; i < count; i++) {
105105
msaPromises.push(
106106
createMsa(controlKeys[i]).then((id) => ({

0 commit comments

Comments
 (0)