Skip to content

Commit

Permalink
Bump the tests group with 11 updates (#2260)
Browse files Browse the repository at this point in the history
* Bump the tests group with 11 updates

Bumps the tests group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) | `10.0.6` | `10.0.7` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `7.0.1` | `8.4.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.0.1` | `8.4.0` |
| [eslint](https://github.com/eslint/eslint) | `8.56.0` | `9.9.1` |
| [eslint-plugin-no-only-tests](https://github.com/levibuzolic/eslint-plugin-no-only-tests) | `3.1.0` | `3.3.0` |
| [prettier](https://github.com/prettier/prettier) | `3.2.5` | `3.3.3` |
| [prettier-plugin-solidity](https://github.com/prettier-solidity/prettier-plugin-solidity) | `1.3.1` | `1.4.1` |
| [solhint](https://github.com/protofire/solhint) | `4.1.1` | `5.0.3` |
| [nyc](https://github.com/istanbuljs/nyc) | `15.1.0` | `17.0.0` |
| [sinon](https://github.com/sinonjs/sinon) | `17.0.1` | `18.0.0` |
| [ts-jest](https://github.com/kulshekhar/ts-jest) | `29.1.2` | `29.2.5` |


Updates `@types/mocha` from 10.0.6 to 10.0.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Updates `@typescript-eslint/eslint-plugin` from 7.0.1 to 8.4.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.4.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 7.0.1 to 8.4.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.4.0/packages/parser)

Updates `eslint` from 8.56.0 to 9.9.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.56.0...v9.9.1)

Updates `eslint-plugin-no-only-tests` from 3.1.0 to 3.3.0
- [Release notes](https://github.com/levibuzolic/eslint-plugin-no-only-tests/releases)
- [Changelog](https://github.com/levibuzolic/eslint-plugin-no-only-tests/blob/main/CHANGELOG.md)
- [Commits](levibuzolic/eslint-plugin-no-only-tests@v3.1.0...v3.3.0)

Updates `prettier` from 3.2.5 to 3.3.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.2.5...3.3.3)

Updates `prettier-plugin-solidity` from 1.3.1 to 1.4.1
- [Release notes](https://github.com/prettier-solidity/prettier-plugin-solidity/releases)
- [Commits](prettier-solidity/prettier-plugin-solidity@v1.3.1...v1.4.1)

Updates `solhint` from 4.1.1 to 5.0.3
- [Release notes](https://github.com/protofire/solhint/releases)
- [Changelog](https://github.com/protofire/solhint/blob/develop/CHANGELOG.md)
- [Commits](protofire/solhint@v4.1.1...v5.0.3)

Updates `nyc` from 15.1.0 to 17.0.0
- [Release notes](https://github.com/istanbuljs/nyc/releases)
- [Changelog](https://github.com/istanbuljs/nyc/blob/main/CHANGELOG.md)
- [Commits](istanbuljs/nyc@v15.1.0...nyc-v17.0.0)

Updates `sinon` from 17.0.1 to 18.0.0
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](sinonjs/sinon@v17.0.1...v18.0.0)

Updates `ts-jest` from 29.1.2 to 29.2.5
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](kulshekhar/ts-jest@v29.1.2...v29.2.5)

---
updated-dependencies:
- dependency-name: "@types/mocha"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: tests
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: eslint-plugin-no-only-tests
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: tests
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: tests
- dependency-name: prettier-plugin-solidity
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: tests
- dependency-name: solhint
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: nyc
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: tests
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump the tests group with 11 updates

Bumps the tests group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) | `10.0.6` | `10.0.7` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `7.0.1` | `8.4.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.0.1` | `8.4.0` |
| [eslint](https://github.com/eslint/eslint) | `8.56.0` | `9.9.1` |
| [eslint-plugin-no-only-tests](https://github.com/levibuzolic/eslint-plugin-no-only-tests) | `3.1.0` | `3.3.0` |
| [prettier](https://github.com/prettier/prettier) | `3.2.5` | `3.3.3` |
| [prettier-plugin-solidity](https://github.com/prettier-solidity/prettier-plugin-solidity) | `1.3.1` | `1.4.1` |
| [solhint](https://github.com/protofire/solhint) | `4.1.1` | `5.0.3` |
| [nyc](https://github.com/istanbuljs/nyc) | `15.1.0` | `17.0.0` |
| [sinon](https://github.com/sinonjs/sinon) | `17.0.1` | `18.0.0` |
| [ts-jest](https://github.com/kulshekhar/ts-jest) | `29.1.2` | `29.2.5` |

Updates `@types/mocha` from 10.0.6 to 10.0.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Updates `@typescript-eslint/eslint-plugin` from 7.0.1 to 8.4.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.4.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 7.0.1 to 8.4.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.4.0/packages/parser)

Updates `eslint` from 8.56.0 to 9.9.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.56.0...v9.9.1)

Updates `eslint-plugin-no-only-tests` from 3.1.0 to 3.3.0
- [Release notes](https://github.com/levibuzolic/eslint-plugin-no-only-tests/releases)
- [Changelog](https://github.com/levibuzolic/eslint-plugin-no-only-tests/blob/main/CHANGELOG.md)
- [Commits](levibuzolic/eslint-plugin-no-only-tests@v3.1.0...v3.3.0)

Updates `prettier` from 3.2.5 to 3.3.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.2.5...3.3.3)

Updates `prettier-plugin-solidity` from 1.3.1 to 1.4.1
- [Release notes](https://github.com/prettier-solidity/prettier-plugin-solidity/releases)
- [Commits](prettier-solidity/prettier-plugin-solidity@v1.3.1...v1.4.1)

Updates `solhint` from 4.1.1 to 5.0.3
- [Release notes](https://github.com/protofire/solhint/releases)
- [Changelog](https://github.com/protofire/solhint/blob/develop/CHANGELOG.md)
- [Commits](protofire/solhint@v4.1.1...v5.0.3)

Updates `nyc` from 15.1.0 to 17.0.0
- [Release notes](https://github.com/istanbuljs/nyc/releases)
- [Changelog](https://github.com/istanbuljs/nyc/blob/main/CHANGELOG.md)
- [Commits](istanbuljs/nyc@v15.1.0...nyc-v17.0.0)

Updates `sinon` from 17.0.1 to 18.0.0
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](sinonjs/sinon@v17.0.1...v18.0.0)

Updates `ts-jest` from 29.1.2 to 29.2.5
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](kulshekhar/ts-jest@v29.1.2...v29.2.5)

---
updated-dependencies:
- dependency-name: "@types/mocha"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: tests
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: eslint-plugin-no-only-tests
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: tests
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: tests
- dependency-name: prettier-plugin-solidity
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: tests
- dependency-name: solhint
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: nyc
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: tests
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: tests
...

Signed-off-by: dependabot[bot] <support@github.com>

* Upgrade ESLint and fix found issues in code

* Fix the test

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Noisekit <noisekit@proton.me>
  • Loading branch information
dependabot[bot] and noisekit authored Sep 4, 2024
1 parent 3c15414 commit 9927d5a
Show file tree
Hide file tree
Showing 31 changed files with 627 additions and 701 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,9 @@ jobs:
- checkout
- yarn-install

# Ignoring 1097346 for "ip" package that is not yet fixed but also not very dangerous
# Ignoring 1097346 and 1099357 for "ip" package that is not yet fixed but also not very dangerous
# https://github.com/indutny/node-ip/issues/136#issuecomment-1941462942
- run: yarn audit --ignore 1097346
- run: yarn audit --ignore 1097346 --ignore 1099357

simulate-release:
parameters:
Expand Down
23 changes: 0 additions & 23 deletions .eslintignore

This file was deleted.

77 changes: 0 additions & 77 deletions .eslintrc.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import assert from 'assert/strict';
import assertBn from '@synthetixio/core-utils/utils/assertions/assert-bignumber';
import assertRevert from '@synthetixio/core-utils/utils/assertions/assert-revert';
Expand Down
134 changes: 134 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
const progress = require('eslint-plugin-progress');
const noOnlyTests = require('eslint-plugin-no-only-tests');
const globals = require('globals');
const tsParser = require('@typescript-eslint/parser');
const js = require('@eslint/js');
const { FlatCompat } = require('@eslint/eslintrc');

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

module.exports = [
{
ignores: [
'!**/.*',
'!.circleci/test-batch.js',
'**/coverage',
'**/dist',
'utils/*/utils',
'**/typechain-types',
'**/contracts/routers',
'**/contracts/generated',
'**/test/generated',
'**/artifacts',
'**/subgraph/**/deployments',
'**/subgraph/build',
'**/subgraph/.bin',
'markets/legacy-market/contracts/InitialModuleBundle.sol',
'markets/perps-market/contracts/modules/CoreModule.sol',
'markets/spot-market/contracts/modules/CoreModule.sol',
'protocol/governance/contracts/modules/core/InitialModuleBundle.sol',
'protocol/oracle-manager/contracts/modules/CoreModule.sol',
'protocol/synthetix/contracts/modules/common/OwnerModule.sol',
'protocol/synthetix/contracts/modules/common/UpgradeModule.sol',
'protocol/synthetix/contracts/modules/InitialModuleBundle.sol',
'utils/core-modules/contracts/interfaces/IOwnerModule.sol',
'utils/core-modules/contracts/modules/CoreModule.sol',
],
},
...compat.extends('eslint:recommended'),
{
plugins: {
progress,
'no-only-tests': noOnlyTests,
},

languageOptions: {
globals: {
...globals.node,
hre: 'writable',
Proxy: 'readonly',
Promise: 'readonly',
},

ecmaVersion: 12,
sourceType: 'commonjs',
},

rules: {
'progress/enable': 0,
indent: 'off',
'no-only-tests/no-only-tests': 'error',
'linebreak-style': 'off',
quotes: 'off',
semi: 'off',
'no-inner-declarations': 'off',
'max-len': 'off',
},
},
...compat.extends('plugin:@typescript-eslint/recommended').map((config) => ({
...config,
files: ['**/*.ts'],
})),
{
files: ['**/*.ts'],

languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: 'script',

parserOptions: {
project: ['./tsconfig.eslint.json'],
},
},

rules: {
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-empty-function': 0,
},
},
{
files: [
'./utils/*/test/**/*.{j,t}s',
'./markets/*/test/**/*.{j,t}s',
'./protocol/*/test/**/*.{j,t}s',
'**/*.test.{j,t}s',
'utils/sample-project/test/bootstrap.js',
],

languageOptions: {
globals: {
...globals.mocha,
},
},
},
{
files: [
'protocol/synthetix/subgraph/**/*',
'markets/spot-market/subgraph/**/*',
'markets/perps-market/subgraph/**/*',
],

languageOptions: {
globals: {
i32: true,
i64: true,
assert: true,
},
},

rules: {
'prefer-const': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-array-constructor': 'off',
},
},
];
2 changes: 1 addition & 1 deletion markets/bfp-market/test/assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const assertEvents = async (
} else {
const allEvents = parsedLogs.join(`\n${spaces}`);

typeof expectedAtIndex === 'string'
return typeof expectedAtIndex === 'string'
? assert.strictEqual(
event,
expectedAtIndex,
Expand Down
2 changes: 1 addition & 1 deletion markets/bfp-market/test/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ export const findEventSafe = (receipt: ContractReceipt, eventName: string, contr
.map((log) => {
try {
return contract.interface.parseLog(log);
} catch (err) {
} catch {
return undefined;
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,19 @@ describe('MarketConfiguration', () => {
...fixture.settlementStrategy,
settlementDelay: 0,
};
await systems()
.PerpsMarket.connect(owner())
.addSettlementStrategy(marketId, settlementStrategy),

await assertEvent(
await systems()
.PerpsMarket.connect(owner())
.addSettlementStrategy(marketId, settlementStrategy),
'SettlementStrategyAdded(' +
marketId.toString() +
', [' +
settlementStrategy.strategyType.toString() +
', ' +
settlementStrategy.settlementDelay.toString() +
'1' + // settlement delay defaults to 1
', ' +
bn(1).toString() +
settlementStrategy.settlementWindowDuration.toString() +
', "' +
settlementStrategy.priceVerificationContract.toString() +
'", "' +
Expand All @@ -233,8 +235,11 @@ describe('MarketConfiguration', () => {
settlementStrategy.settlementReward.toString() +
', ' +
settlementStrategy.disabled.toString() +
'], 0)',
systems().PerpsMarket;
', ' +
settlementStrategy.commitmentPriceDelay.toString() +
'], 3)',
systems().PerpsMarket
);
});
});
});
Expand Down
33 changes: 18 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
"audit": "yarn npm audit --all --recursive --severity high"
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.1",
"@ethersproject/abi": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@lerna-lite/changed": "^3.3.0",
Expand All @@ -61,18 +63,19 @@
"@synthetixio/deps": "workspace:*",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.17",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"eslint": "^9.9.1",
"eslint-plugin-no-only-tests": "^3.1.0",
"globals": "^15.9.0",
"lint-staged": "^15.2.10",
"mocha": "^10.7.3",
"mocha-junit-reporter": "^2.2.1",
"pre-commit": "^1.2.2",
"prettier": "^3.2.5",
"prettier-plugin-solidity": "^1.3.1",
"prettier-plugin-toml": "^2.0.1",
"solhint": "^4.1.1",
"solhint": "^5.0.3",
"solhint-plugin-meta-transactions": "^0.1.0",
"solhint-plugin-numcast": "^1.0.0",
"ts-node": "^10.9.2",
Expand All @@ -86,22 +89,22 @@
],
"lint-staged": {
"*.js": [
"prettier --check",
"eslint --max-warnings=0"
"yarn prettier --check",
"yarn eslint --max-warnings=0"
],
"*.ts": [
"prettier --check",
"eslint --max-warnings=0"
"yarn prettier --check",
"yarn eslint --max-warnings=0"
],
"*.sol": [
"prettier --check",
"solhint"
"yarn prettier --check",
"yarn solhint"
],
"*.toml": "prettier --check",
"*.yml": "prettier --check",
"*.yaml": "prettier --check",
"*.json": "prettier --check",
"*.md": "prettier --check"
"*.toml": "yarn prettier --check",
"*.yml": "yarn prettier --check",
"*.yaml": "yarn prettier --check",
"*.json": "yarn prettier --check",
"*.md": "yarn prettier --check"
},
"workspaces": [
"utils/**",
Expand Down
5 changes: 2 additions & 3 deletions protocol/governance/tasks/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ async function _spinChain({
settings,
getArtifact: async (contractName: string) =>
await hre.run('cannon:get-artifact', { name: contractName }),
// eslint-disable-next-line @typescript-eslint/no-require-imports
pkgInfo: require(path.join(hre.config.paths.root, 'package.json')),
projectDirectory: hre.config.paths.root,
port,
Expand All @@ -185,9 +186,7 @@ function _keepAlive() {

return new Promise<void>((resolve) => {
function run() {
setTimeout(() => {
running ? run() : resolve();
}, 10);
setTimeout(() => (running ? run() : resolve()), 10);
}

run();
Expand Down
Loading

0 comments on commit 9927d5a

Please sign in to comment.