Skip to content

Commit 8ee3124

Browse files
Update dependency @api3/eslint-plugin-commons to v2 (#351)
* Update dependency @api3/eslint-plugin-commons to v2 * Remove rules that have been excluded * Fix lint by importing constant --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Derek Croote <[email protected]>
1 parent 4c209d7 commit 8ee3124

File tree

5 files changed

+408
-140
lines changed

5 files changed

+408
-140
lines changed

.eslintrc.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,4 @@ module.exports = {
1717
},
1818
extends: ['plugin:@api3/eslint-plugin-commons/universal', 'plugin:@api3/eslint-plugin-commons/jest'],
1919
plugins: ['@typescript-eslint', 'import', 'jest'],
20-
rules: {
21-
'unicorn/no-process-exit': 'off',
22-
'unicorn/prefer-top-level-await': 'off',
23-
24-
// Typescript
25-
'@typescript-eslint/consistent-return': 'off', // Does not play with no useless undefined when function return type is "T | undefined" and does not have a fixer.
26-
'@typescript-eslint/max-params': 'off',
27-
'@typescript-eslint/no-dynamic-delete': 'off',
28-
'@typescript-eslint/no-var-requires': 'off',
29-
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
30-
31-
// Lodash
32-
'lodash/prefer-immutable-method': 'off',
33-
'lodash/prop-shorthand': 'off',
34-
35-
// Jest
36-
'jest/no-hooks': 'off',
37-
},
3820
};

local-test-configuration/scripts/initialize-chain.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import dotenv from 'dotenv';
1919
import { type JsonRpcProvider, NonceManager, ethers } from 'ethers';
2020
import { zip } from 'lodash';
2121

22+
import { HUNDRED_PERCENT } from '../../src/constants';
2223
import { getGasPrice } from '../../src/gas-price';
2324
import { deriveSponsorWallet, encodeDapiName } from '../../src/utils';
2425

@@ -54,8 +55,7 @@ export const deriveRole = (adminRole: string, roleDescription: string) => {
5455
};
5556

5657
function encodeUpdateParameters() {
57-
const HUNDRED_PERCENT = 1e8;
58-
const deviationThresholdInPercentage = HUNDRED_PERCENT / 100; // 1%
58+
const deviationThresholdInPercentage = HUNDRED_PERCENT / 100n; // 1%
5959
const deviationReference = 0;
6060
const heartbeatInterval = 86_400; // 24 hrs
6161
const updateParameters = ethers.AbiCoder.defaultAbiCoder().encode(

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@api3/chains": "^8.1.1",
4040
"@api3/commons": "^0.10.0",
4141
"@api3/contracts": "5.1.0",
42-
"@api3/eslint-plugin-commons": "^1.0.1",
42+
"@api3/eslint-plugin-commons": "^2.0.0",
4343
"@api3/promise-utils": "^0.4.0",
4444
"dotenv": "^16.4.5",
4545
"ethers": "^6.13.1",

0 commit comments

Comments
 (0)