diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000000..ba02b753af34 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 46aca2515c83..000000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,275 +0,0 @@ -module.exports = { - root: true, - env: { - browser: true, - es6: true, - node: true, - // Performance tests still use mocha - mocha: true, - }, - globals: { - BigInt: true, - }, - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 10, - project: "./tsconfig.json", - sourceType: "module", - }, - ignorePatterns: [ - "webEsmBundle.browser.test.ts" - ], - plugins: ["@typescript-eslint", "eslint-plugin-import", "@chainsafe/eslint-plugin-node", "prettier"], - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:import/errors", - "plugin:import/typescript", - "plugin:import/warnings", - ], - rules: { - "@chainsafe/node/file-extension-in-import": ["error", "always", {esm: true}], - "@chainsafe/node/no-deprecated-api": "error", - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-comment": "error", - "@typescript-eslint/explicit-function-return-type": ["error", {allowExpressions: true}], - "@typescript-eslint/explicit-member-accessibility": ["error", {accessibility: "no-public"}], - "@typescript-eslint/func-call-spacing": "error", - // TODO after upgrading es-lint, member-ordering is now leading to lint errors. Set to warning now and fix in another PR - "@typescript-eslint/member-ordering": "off", - "@typescript-eslint/naming-convention": [ - "error", - {selector: "default", format: ["camelCase"]}, - { - selector: ["classProperty", "objectLiteralProperty", "classMethod", "parameter"], - format: ["camelCase"], - leadingUnderscore: "allow", - }, - //variable must be in camel or upper case - {selector: "variable", format: ["camelCase", "UPPER_CASE"], leadingUnderscore: "allow"}, - //classes and types must be in PascalCase - {selector: ["typeLike", "enum"], format: ["PascalCase"]}, - {selector: "enumMember", format: null}, - //ignore rule for quoted stuff - { - selector: [ - "classProperty", - "objectLiteralProperty", - "typeProperty", - "classMethod", - "objectLiteralMethod", - "typeMethod", - "accessor", - "enumMember", - ], - format: null, - modifiers: ["requiresQuotes"], - }, - //ignore rules on destructured params - {selector: "variable", modifiers: ["destructured"], format: null}, - { - selector: "import", - format: ["camelCase", "PascalCase"], - }, - ], - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-floating-promises": "error", - "@typescript-eslint/no-non-null-assertion": "error", - "@typescript-eslint/no-require-imports": "error", - // We usually type-cast these standard types because the concerned function accepts any type - // and we want to TS detect error if original variable type changes - "@typescript-eslint/no-unnecessary-type-assertion": ["error", {typesToIgnore: ["string", "bigint", "number"]}], - "@typescript-eslint/no-unsafe-assignment": "error", - "@typescript-eslint/no-unsafe-call": "error", - "@typescript-eslint/no-unsafe-member-access": "error", - "@typescript-eslint/no-unsafe-return": "error", - "@typescript-eslint/no-unused-expressions": "error", - "@typescript-eslint/no-unused-vars": ["error", {varsIgnorePattern: "^_", argsIgnorePattern: "^_"}], - "@typescript-eslint/no-use-before-define": "off", - "@typescript-eslint/restrict-template-expressions": [ - "error", - {allowNumber: true, allowBoolean: true, allowNullish: true, allowNever: true, allowRegExp: true}, - ], - "@typescript-eslint/return-await": "error", - "@typescript-eslint/semi": "error", - "@typescript-eslint/strict-boolean-expressions": [ - "error", - {allowNullableBoolean: true, allowNullableString: true, allowAny: true}, - ], - - "@typescript-eslint/type-annotation-spacing": "error", - "constructor-super": "off", - "func-call-spacing": "off", - // Force to add names to all functions to ease CPU profiling - "func-names": ["error", "always"], - "import/namespace": "off", - //if --fix is run it messes imports like /lib/presets/minimal & /lib/presets/mainnet - "import/no-duplicates": "off", - "import/no-extraneous-dependencies": [ - "error", - { - devDependencies: false, - optionalDependencies: false, - peerDependencies: false, - }, - ], - "import/no-relative-packages": "error", - // TEMP Disabled while eslint-plugin-import support ESM (Typescript does support it) https://github.com/import-js/eslint-plugin-import/issues/2170 - "import/no-unresolved": "off", - "import/order": [ - "error", - { - groups: ["builtin", "external", "internal", "parent", "sibling", "index"], - pathGroups: [ - {pattern: "@lodestar/**", group: "internal"}, - // We want mocks to be imported before any internal code - {pattern: "**/mocks/**", group: "internal"}, - ], - pathGroupsExcludedImportTypes: ["builtin"], - }, - ], - //doesnt work, it reports false errors - "new-parens": "error", - "no-bitwise": "off", - "no-caller": "error", - "no-cond-assign": "error", - "no-consecutive-blank-lines": 0, - "no-console": "error", - "no-loss-of-precision": "error", - "no-prototype-builtins": 0, - "no-restricted-globals": [ - "error", - { - name: "fetch", - message: "Please use 'fetch' from '@lodestar/api' instead.", - }, - ], - "no-restricted-imports": [ - "error", - { - patterns: ["../lib/*", "@chainsafe/*/lib/*"], - paths: [ - ...restrictNodeModuleImports( - "child_process", - "crypto", - "fs", - "http", - "net", - "os", - "path", - "stream", - "util", - "url", - "worker_threads" - ), - ], - }, - ], - "no-restricted-syntax": ["error", ...restrictImportDestructuring("node:fs", "node:os", "node:path")], - // superseded by @typescript-eslint/return-await, must be disabled as it can report incorrect errors - "no-return-await": "off", - "no-var": "error", - "object-curly-spacing": ["error", "never"], - "object-literal-sort-keys": 0, - "prefer-const": "error", - "prettier/prettier": "error", - quotes: ["error", "double"], - semi: "off", - }, - settings: { - "import/core-modules": [ - "node:child_process", - "node:crypto", - "node:fs", - "node:http", - "node:net", - "node:os", - "node:path", - "node:stream", - "node:util", - "node:url", - ], - "import/resolver": { - typescript: { - project: "packages/*/tsconfig.json", - }, - }, - }, - overrides: [ - { - files: [ - "**/*.config.js", - "**/*.config.mjs", - "**/*.config.cjs", - "**/*.config.ts", - "scripts/vitest/**/*.ts", - "scripts/vite/**/*.ts", - ], - rules: { - "@typescript-eslint/naming-convention": "off", - // Allow require in CJS modules - "@typescript-eslint/no-require-imports": "off", - // Allow require in CJS modules - "@typescript-eslint/no-var-requires": "off", - // Allow importing packages from dev dependencies - "import/no-extraneous-dependencies": "off", - // Allow importing and mixing different configurations - "import/no-relative-packages": "off", - }, - }, - { - files: ["**/test/**/*.ts"], - rules: { - "@typescript-eslint/no-explicit-any": "off", - "func-names": "off", - "import/no-extraneous-dependencies": "off", - // Turned off as it floods log with warnings. Underlying issue is not critical so switching off is acceptable - "import/no-named-as-default-member": "off", - }, - }, - { - files: ["**/perf/**/*.ts"], - rules: { - // A lot of benchmarks just need to execute expressions without using the result - "@typescript-eslint/no-unused-expressions": "off", - }, - }, - { - files: ["**/test/**/*.test.ts"], - plugins: ["vitest"], - extends: ["plugin:vitest/recommended"], - rules: { - "vitest/consistent-test-it": ["error", {fn: "it", withinDescribe: "it"}], - // We use a lot dynamic assertions so tests may not have usage of expect - "vitest/expect-expect": "off", - "vitest/no-disabled-tests": "warn", - "vitest/no-focused-tests": "error", - "vitest/prefer-called-with": "error", - "vitest/prefer-spy-on": "error", - // Our usage contains dynamic test title, this rule enforce static string value - "vitest/valid-title": "off", - }, - }, - { - files: ["**/types/**/*.ts"], - rules: { - "@typescript-eslint/naming-convention": [ - "off", - {selector: "interface", prefix: ["I"]}, - {selector: "interface", format: ["PascalCase"], prefix: ["I"]}, - ], - }, - }, - ], -}; - -function restrictNodeModuleImports(...modules) { - return modules.map((module) => ({name: module, message: `Please use 'node:${module}' instead.`})); -} - -function restrictImportDestructuring(...modules) { - return modules.map((module) => ({ - selector: `ImportDeclaration[source.value='${module}'] ImportSpecifier`, - message: `Importing from '${module}' using destructuring is restricted.`, - })); -} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c801b0462d60..5514f6e896b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,9 +64,6 @@ jobs: - name: Assert ESM module exports run: node scripts/assert_exports.mjs - - name: Assert eslintrc rules sorted - run: scripts/assert_eslintrc_sorted.mjs - type-checks: name: Type Checks needs: build diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000000..de51190cd9f3 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "biomejs.biome" + ] +} diff --git a/.wordlist.txt b/.wordlist.txt index 11a5a3746476..a2e642a926a0 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -26,7 +26,6 @@ EIPs EL ENR ENRs -ESLint ETH Edgington Erigon diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9592f3bb0237..24d087810980 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ To run tests: - :test_tube: Run `yarn test:spec` for spec tests. - :test_tube: Run `yarn test` to run all tests. - :test_tube: Run `yarn check-types` to check TypeScript types. -- :test_tube: Run `yarn lint` to run the linter (ESLint). +- :test_tube: Run `yarn lint` to run the linter. Note that to run `test:e2e`, first ensure that the environment is correctly setup by running the `run_e2e_env.sh` script. This script requires a running docker engine. diff --git a/biome.jsonc b/biome.jsonc new file mode 100644 index 000000000000..b49fc601600c --- /dev/null +++ b/biome.jsonc @@ -0,0 +1,376 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.9.3/schema.json", + "vcs": { + "clientKind": "git", + "enabled": true, + "useIgnoreFile": true + }, + "files": { + "include": ["packages/*/src/**/*.ts", "packages/*/test/**/*.ts"] + }, + "formatter": { + "enabled": true, + "formatWithErrors": true, + "useEditorconfig": true, + "lineWidth": 120, + "attributePosition": "auto", + "bracketSpacing": false, + "ignore": ["**/lib", "**/.nyc_output", "./packages/*/spec-tests", "**/node_modules", "./packages/*/node_modules/**"] + }, + "organizeImports": { + "enabled": false + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "complexity": { + "noForEach": "off", + "noStaticOnlyClass": "off", + "noThisInStatic": "off", + "noUselessEmptyExport": "off", + "noUselessTypeConstraint": "error", + "useArrowFunction": "off", + "useFlatMap": "off", + "useLiteralKeys": "off", + "useOptionalChain": "off", + "useRegexLiterals": "off", + "noBannedTypes": "error", + "noUselessThisAlias": "error" + }, + "correctness": { + "noInvalidConstructorSuper": "off", + "noInvalidUseBeforeDeclaration": "off", + "noPrecisionLoss": "error", + "noUnusedVariables": "error", + "noVoidTypeReturn": "off", + "useYield": "off", + "useImportExtensions": { + "level": "error", + "options": { + "suggestedExtensions": { + "ts": { + "module": "js", + "component": "jsx" + } + } + } + }, + "useArrayLiterals": "error", + "noUndeclaredDependencies": "off", // TODO: Need to see why this rule is not detecting monorepo packages + "noUndeclaredVariables": "error" + }, + "performance": { + "noAccumulatingSpread": "off", + "noDelete": "off" + }, + "style": { + "noCommaOperator": "off", + "noInferrableTypes": "off", + "noNonNullAssertion": "error", + "noParameterAssign": "off", + "noRestrictedGlobals": { + "level": "error", + "options": { + "deniedGlobals": ["fetch"] + } + }, + "noUnusedTemplateLiteral": "off", + "noUselessElse": "off", + "noVar": "error", + "useConst": "error", + "useEnumInitializers": "off", + "useExponentiationOperator": "off", + "useExportType": "off", + "useImportType": "off", + "useLiteralEnumMembers": "off", + "useNamingConvention": { + "level": "error", + "options": { + "strictCase": false, + "conventions": [ + { + "selector": { + "kind": "any" + }, + "formats": ["camelCase"] + }, + { + "selector": { + "kind": "classProperty" + }, + "formats": ["camelCase"] + }, + { + "selector": { + "kind": "objectLiteralProperty" + }, + "formats": ["camelCase"] + }, + { + "selector": { + "kind": "classMethod" + }, + "formats": ["camelCase"] + }, + { + "selector": { + "kind": "functionParameter" + }, + "formats": ["camelCase"] + }, + { + "selector": { + "kind": "variable" + }, + "formats": ["camelCase", "CONSTANT_CASE"] + }, + { + "selector": { + "kind": "typeLike" + }, + "formats": ["PascalCase"] + }, + { + "selector": { + "kind": "enum" + }, + "formats": ["PascalCase"] + }, + { + "selector": { + "kind": "enumMember" + }, + "formats": ["PascalCase", "camelCase", "CONSTANT_CASE"] + }, + { + "selector": { + "kind": "classProperty" + }, + "formats": ["PascalCase", "camelCase", "CONSTANT_CASE"] + }, + { + "selector": { + "kind": "typeProperty" + }, + "formats": ["PascalCase", "camelCase", "CONSTANT_CASE"] + }, + { + "selector": { + "kind": "classMember" + }, + "formats": ["PascalCase", "camelCase", "CONSTANT_CASE"] + }, + { + "selector": { + "kind": "objectLiteralMethod" + }, + "formats": ["PascalCase", "camelCase", "CONSTANT_CASE"] + }, + { + "selector": { + "kind": "typeMethod" + }, + "formats": ["PascalCase", "camelCase", "CONSTANT_CASE"] + }, + { + "selector": { + "kind": "variable" + }, + "formats": ["PascalCase", "camelCase", "CONSTANT_CASE"] + }, + { + "selector": { + "kind": "importAlias" + }, + "formats": ["PascalCase", "camelCase"] + }, + { + "selector": { + "kind": "importNamespace" + }, + "formats": ["PascalCase", "camelCase"] + } + ] + } + }, + "useNumberNamespace": "off", + "useSingleVarDeclarator": "off", + "useTemplate": "off", + "noNamespace": "error", + "useAsConstAssertion": "error" + }, + "suspicious": { + "noAssignInExpressions": "error", + "noAsyncPromiseExecutor": "off", + "noConfusingVoidType": "off", + "noConsoleLog": "error", + "noDoubleEquals": "off", + "noDuplicateTestHooks": "off", + "noExplicitAny": "error", + "noExportsInTest": "off", + "noFallthroughSwitchClause": "off", + "noGlobalIsFinite": "off", + "noGlobalIsNan": "off", + "noImplicitAnyLet": "off", + "noPrototypeBuiltins": "off", + "noRedundantUseStrict": "off", + "noShadowRestrictedNames": "off", + "useDefaultSwitchClauseLast": "off", + "useGetterReturn": "off", + "noExtraNonNullAssertion": "error", + "noMisleadingInstantiator": "error", + "noUnsafeDeclarationMerging": "error", + "noEmptyBlockStatements": "off" // There is a lot of empty code blocks, should be enabled and clean up separately. + }, + "nursery": { + "useConsistentMemberAccessibility": { + "level": "error", + "options": { + "accessibility": "noPublic" + } + }, + "noCommonJs": "error", + "noRestrictedImports": { + "level": "error", + "options": { + "paths": { + "child_process": "Please use node:child_process instead.", + "crypto": "Please use node:crypto instead.", + "fs": "Please use node:fs instead.", + "http": "Please use node:https instead.", + "net": "Please use node:net instead.", + "os": "Please use node:os instead.", + "path": "Please use node:path instead.", + "stream": "Please use node:stream instead.", + "util": "Please use node:util instead.", + "url": "Please use node:url instead.", + "worker_threads": "Please use node:worker_threads instead." + } + } + }, + "noDuplicateElseIf": "error", + "noUselessEscapeInRegex": "error", + "noIrregularWhitespace": "error", + "noOctalEscape": "error", + // Need to enable this rule with exception to anonymous functions + "useExplicitFunctionReturnType": "off" + } + } + }, + "javascript": { + "formatter": { + "jsxQuoteStyle": "double", + "quoteProperties": "asNeeded", + "trailingCommas": "es5", + "semicolons": "always", + "arrowParentheses": "always", + "bracketSpacing": false, + "bracketSameLine": false, + "quoteStyle": "double", + "attributePosition": "auto", + "enabled": true + }, + "linter": { + "enabled": true + }, + "globals": ["BigInt"] + }, + "overrides": [ + { + "include": ["packages/**/test/perf/**/*.test.ts", "packages/state-transition/test/utils/beforeValueMocha.ts"], + "javascript": { + // These are used by mocha + "globals": ["describe", "it", "before", "after"] + } + }, + { + "include": ["packages/cli/src/", "packages/test-utils/src", "packages/flare/src"], + "linter": { + "rules": { + "suspicious": { + "noConsoleLog": "off" + } + } + } + }, + { + "include": [ + "**/*.config.js", + "**/*.config.mjs", + "**/*.config.cjs", + "**/*.config.ts", + "scripts/vitest/**/*.ts", + "scripts/vite/**/*.ts", + "**/types/**/*.ts", + "packages/api/src/beacon/routes/*.ts", + "packages/api/src/**/routes.ts", + "packages/api/src/utils/server/handler.ts", + "packages/api/test/unit/client/urlFormat.test.ts", + "packages/beacon-node/src/api/impl/config/constants.ts", + "packages/beacon-node/src/eth1/provider/eth1Provider.ts", + "" + ], + "linter": { + "rules": { + "style": { + "useNamingConvention": { + "level": "off", + "options": { + "strictCase": false + } + } + } + } + } + }, + { + "include": [ + "**/test/**/*.ts", + "packages/*/test/**/*.js", + "packages/api/src/utils/**/*.ts", + "packages/beacon-node/src/db/repositories/checkpointState.ts", + "packages/spec-test-util/src/single.ts" + ], + "linter": { + "rules": { + "suspicious": { + "noExplicitAny": "off" + } + } + } + }, + { + "include": ["packages/beacon-node/test/e2e/eth1/jsonRpcHttpClient.test.ts"], + "linter": { + "rules": { + "correctness": { + "noUnusedVariables": "off" + } + } + } + }, + { + "include": ["**/test/**/*.ts", "packages/*/test/**/*.js"], + "linter": { + "rules": { + "suspicious": { + "noConsoleLog": "off" + } + } + } + }, + { + "include": ["**/perf/**/*.ts"], + "linter": { + "rules": {} + } + }, + { + "include": ["**/test/**/*.test.ts"], + "linter": { + "rules": {} + } + } + ] +} diff --git a/docs/yarn.lock b/docs/yarn.lock index 27123932fe26..dad4d8ef1c07 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -3187,7 +3187,14 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^3.0.2, braces@~3.0.2: +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -4772,6 +4779,13 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + finalhandler@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" @@ -6965,11 +6979,11 @@ micromark@^4.0.0: micromark-util-types "^2.0.0" micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: - braces "^3.0.2" + braces "^3.0.3" picomatch "^2.3.1" mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": diff --git a/package.json b/package.json index 85d9662ab920..7399b4ba6c1e 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "build:bundle": "lerna run build:bundle", "build:watch": "lerna exec --parallel -- 'yarn run build:watch'", "build:ifchanged": "lerna exec -- ../../scripts/build_if_changed.sh", - "lint": "eslint --report-unused-disable-directives --color --ext .ts packages/*/src packages/*/test", - "lint:fix": "yarn lint --fix", + "lint": "biome check", + "lint:fix": "yarn lint --write", "lint-dashboards": "node scripts/lint-grafana-dashboards.mjs ./dashboards", "check-build": "lerna run check-build", "check-bundle": "lerna run check-bundle", @@ -48,22 +48,15 @@ }, "devDependencies": { "@actions/core": "^1.10.1", - "@chainsafe/eslint-plugin-node": "^11.2.3", "@dapplion/benchmark": "^0.2.4", + "@biomejs/biome": "^1.9.3", "@types/mocha": "^10.0.6", "@types/node": "^20.12.8", - "@typescript-eslint/eslint-plugin": "^7.2.0", - "@typescript-eslint/parser": "^7.2.0", "@vitest/browser": "^2.0.4", "@vitest/coverage-v8": "^2.0.4", "crypto-browserify": "^3.12.0", "dotenv": "^16.4.5", "electron": "^26.2.2", - "eslint": "^8.57.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-vitest": "^0.3.26", "https-browserify": "^1.0.0", "jsdom": "^23.0.1", "lerna": "^7.3.0", diff --git a/packages/api/package.json b/packages/api/package.json index 7d851d9513ba..58566a0b23f6 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -63,8 +63,8 @@ "build:release": "yarn clean && yarn run build", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit", "test:unit": "vitest --run --dir test/unit/", "check-readme": "typescript-docs-verifier" diff --git a/packages/api/src/beacon/client/events.ts b/packages/api/src/beacon/client/events.ts index 34f14f2e8397..9937b850b49a 100644 --- a/packages/api/src/beacon/client/events.ts +++ b/packages/api/src/beacon/client/events.ts @@ -16,10 +16,15 @@ export function getClient(config: ChainForkConfig, baseUrl: string): ApiClient { const eventSerdes = getEventSerdes(config); return { - eventstream: async ({topics, signal, onEvent, onError, onClose}) => { + eventstream: async ({ + topics, + signal, + onEvent, + onError, + onClose, + }): Promise> => { const query = stringifyQuery({topics}); const url = `${urlJoin(baseUrl, definitions.eventstream.url)}?${query}`; - // eslint-disable-next-line @typescript-eslint/naming-convention const EventSource = await getEventSource(); const eventSource = new EventSource(url); @@ -40,7 +45,7 @@ export function getClient(config: ChainForkConfig, baseUrl: string): ApiClient { // EventSource will try to reconnect always on all errors // `eventSource.onerror` events are informative but don't indicate the EventSource closed // The only way to abort the connection from the client is via eventSource.close() - eventSource.onerror = function onerror(err) { + eventSource.onerror = function onerror(err): void { const errEs = err as unknown as EventSourceError; // Ignore noisy errors due to beacon node being offline diff --git a/packages/api/src/beacon/routes/beacon/block.ts b/packages/api/src/beacon/routes/beacon/block.ts index be6789753e0f..04d42cdab81e 100644 --- a/packages/api/src/beacon/routes/beacon/block.ts +++ b/packages/api/src/beacon/routes/beacon/block.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ContainerType, ListCompositeType, ValueOf} from "@chainsafe/ssz"; import {ChainForkConfig} from "@lodestar/config"; import { @@ -225,7 +224,7 @@ export type Endpoints = { >; }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: const blockIdOnlyReq: RequestCodec> = { writeReq: ({blockId}) => ({params: {block_id: blockId.toString()}}), parseReq: ({params}) => ({blockId: params.block_id}), diff --git a/packages/api/src/beacon/routes/beacon/pool.ts b/packages/api/src/beacon/routes/beacon/pool.ts index 4fe3efd4daf2..3f0b8ac74284 100644 --- a/packages/api/src/beacon/routes/beacon/pool.ts +++ b/packages/api/src/beacon/routes/beacon/pool.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ValueOf} from "@chainsafe/ssz"; import {ChainForkConfig} from "@lodestar/config"; import {isForkPostElectra} from "@lodestar/params"; diff --git a/packages/api/src/beacon/routes/beacon/rewards.ts b/packages/api/src/beacon/routes/beacon/rewards.ts index c65282625343..d41b5ef705f0 100644 --- a/packages/api/src/beacon/routes/beacon/rewards.ts +++ b/packages/api/src/beacon/routes/beacon/rewards.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ContainerType, ValueOf} from "@chainsafe/ssz"; import {ChainForkConfig} from "@lodestar/config"; import {Epoch, ssz} from "@lodestar/types"; diff --git a/packages/api/src/beacon/routes/beacon/state.ts b/packages/api/src/beacon/routes/beacon/state.ts index 1489f48c297e..4127bb1ce793 100644 --- a/packages/api/src/beacon/routes/beacon/state.ts +++ b/packages/api/src/beacon/routes/beacon/state.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ContainerType, ValueOf} from "@chainsafe/ssz"; import {ChainForkConfig} from "@lodestar/config"; import {MAX_VALIDATORS_PER_COMMITTEE} from "@lodestar/params"; @@ -269,7 +268,7 @@ export type Endpoints = { >; }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: const stateIdOnlyReq: RequestCodec> = { writeReq: ({stateId}) => ({params: {state_id: stateId.toString()}}), parseReq: ({params}) => ({stateId: params.state_id}), diff --git a/packages/api/src/beacon/routes/config.ts b/packages/api/src/beacon/routes/config.ts index f8a606af1431..afce0898908c 100644 --- a/packages/api/src/beacon/routes/config.ts +++ b/packages/api/src/beacon/routes/config.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ContainerType, ValueOf} from "@chainsafe/ssz"; import {ChainForkConfig} from "@lodestar/config"; import {ssz} from "@lodestar/types"; diff --git a/packages/api/src/beacon/routes/debug.ts b/packages/api/src/beacon/routes/debug.ts index 590ecf71dd9c..349684f62ccd 100644 --- a/packages/api/src/beacon/routes/debug.ts +++ b/packages/api/src/beacon/routes/debug.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ContainerType, Type, ValueOf} from "@chainsafe/ssz"; import {ChainForkConfig} from "@lodestar/config"; import {ssz, StringType, BeaconState} from "@lodestar/types"; diff --git a/packages/api/src/beacon/routes/events.ts b/packages/api/src/beacon/routes/events.ts index 1f041aa30194..5fa218bc02f3 100644 --- a/packages/api/src/beacon/routes/events.ts +++ b/packages/api/src/beacon/routes/events.ts @@ -188,7 +188,6 @@ export type TypeJson = { }; export function getTypeByEvent(config: ChainForkConfig): {[K in EventType]: TypeJson} { - // eslint-disable-next-line @typescript-eslint/naming-convention const WithVersion = (getType: (fork: ForkName) => TypeJson): TypeJson<{data: T; version: ForkName}> => { return { toJson: ({data, version}) => ({ @@ -289,7 +288,6 @@ export function getTypeByEvent(config: ChainForkConfig): {[K in EventType]: Type }; } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function getEventSerdes(config: ChainForkConfig) { const typeByEvent = getTypeByEvent(config); diff --git a/packages/api/src/beacon/routes/lightclient.ts b/packages/api/src/beacon/routes/lightclient.ts index ab45323f8f64..decf8982b654 100644 --- a/packages/api/src/beacon/routes/lightclient.ts +++ b/packages/api/src/beacon/routes/lightclient.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ListCompositeType, ValueOf} from "@chainsafe/ssz"; import { LightClientBootstrap, diff --git a/packages/api/src/beacon/routes/lodestar.ts b/packages/api/src/beacon/routes/lodestar.ts index a97d065cfe4d..1d3c62ca2082 100644 --- a/packages/api/src/beacon/routes/lodestar.ts +++ b/packages/api/src/beacon/routes/lodestar.ts @@ -21,7 +21,7 @@ export type SyncChainDebugState = { status: string; startEpoch: number; peers: number; - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: batches: any[]; }; diff --git a/packages/api/src/beacon/routes/node.ts b/packages/api/src/beacon/routes/node.ts index 0744b5f07452..c7a6c2e36361 100644 --- a/packages/api/src/beacon/routes/node.ts +++ b/packages/api/src/beacon/routes/node.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ContainerType, ValueOf} from "@chainsafe/ssz"; import {ChainForkConfig} from "@lodestar/config"; import {ssz, stringType} from "@lodestar/types"; diff --git a/packages/api/src/beacon/routes/proof.ts b/packages/api/src/beacon/routes/proof.ts index 2ef4dad15e81..0c6d5a058cea 100644 --- a/packages/api/src/beacon/routes/proof.ts +++ b/packages/api/src/beacon/routes/proof.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {CompactMultiProof, ProofType} from "@chainsafe/persistent-merkle-tree"; import {ByteListType, ContainerType} from "@chainsafe/ssz"; import {fromHex, toHex} from "@lodestar/utils"; diff --git a/packages/api/src/beacon/routes/validator.ts b/packages/api/src/beacon/routes/validator.ts index a9a1423e4da2..cf30d5748a46 100644 --- a/packages/api/src/beacon/routes/validator.ts +++ b/packages/api/src/beacon/routes/validator.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ContainerType, Type, ValueOf} from "@chainsafe/ssz"; import {ChainForkConfig} from "@lodestar/config"; import {isForkBlobs, isForkPostElectra} from "@lodestar/params"; diff --git a/packages/api/src/beacon/server/index.ts b/packages/api/src/beacon/server/index.ts index 21c0607d3f14..304f4d42be17 100644 --- a/packages/api/src/beacon/server/index.ts +++ b/packages/api/src/beacon/server/index.ts @@ -25,7 +25,7 @@ export function registerRoutes( // Enforces that we are declaring routes for every routeId in `Endpoints` [K in keyof Endpoints]: () => { // The Endpoints are enforced in each getRoutes return type - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: [K2 in keyof Endpoints[K]]: FastifyRoute; }; } = { diff --git a/packages/api/src/builder/routes.ts b/packages/api/src/builder/routes.ts index 7459e46abd0b..018110e5eded 100644 --- a/packages/api/src/builder/routes.ts +++ b/packages/api/src/builder/routes.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import { ssz, bellatrix, diff --git a/packages/api/src/keymanager/routes.ts b/packages/api/src/keymanager/routes.ts index b6abe8928d77..0db096d14e83 100644 --- a/packages/api/src/keymanager/routes.ts +++ b/packages/api/src/keymanager/routes.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ContainerType, ValueOf} from "@chainsafe/ssz"; import {ChainForkConfig} from "@lodestar/config"; import {Epoch, phase0, ssz, stringType} from "@lodestar/types"; diff --git a/packages/api/src/utils/client/eventSource.ts b/packages/api/src/utils/client/eventSource.ts index 6b5b75124034..2e2cf0076068 100644 --- a/packages/api/src/utils/client/eventSource.ts +++ b/packages/api/src/utils/client/eventSource.ts @@ -1,6 +1,5 @@ // This function switches between the native web implementation and a nodejs implemnetation export async function getEventSource(): Promise { - // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (globalThis.EventSource) { return EventSource; } else { diff --git a/packages/api/src/utils/client/fetch.ts b/packages/api/src/utils/client/fetch.ts index a338d82e521f..31e52cdbd67f 100644 --- a/packages/api/src/utils/client/fetch.ts +++ b/packages/api/src/utils/client/fetch.ts @@ -6,7 +6,7 @@ async function wrappedFetch(url: string | URL, init?: RequestInit): Promise { try { // This function wraps global `fetch` which should only be directly called here - // eslint-disable-next-line no-restricted-globals + // biome-ignore lint/style/noRestrictedGlobals: return await fetch(url, init); } catch (e) { throw new FetchError(url, e); diff --git a/packages/api/src/utils/client/httpClient.ts b/packages/api/src/utils/client/httpClient.ts index e11e35dc85c7..eec86725fcaa 100644 --- a/packages/api/src/utils/client/httpClient.ts +++ b/packages/api/src/utils/client/httpClient.ts @@ -198,8 +198,7 @@ export class HttpClient implements IHttpClient { this.logger?.debug("Requesting fallback URL", {routeId, baseUrl: printableUrl, score: this.urlsScore[i]}); } - // eslint-disable-next-line @typescript-eslint/naming-convention - const i_ = i; // Keep local copy of i variable to index urlScore after requestMethod() resolves + const i_ = i; // Keep local copy of i variable to index urlScore after requestWithBody() resolves const urlInit = this.urlsInits[i]; if (urlInit === undefined) { diff --git a/packages/api/src/utils/client/response.ts b/packages/api/src/utils/client/response.ts index fdcb2afda943..7a4c4fb98ce4 100644 --- a/packages/api/src/utils/client/response.ts +++ b/packages/api/src/utils/client/response.ts @@ -26,13 +26,15 @@ export class ApiResponse extends Response { wireFormat(): WireFormat | null { if (this._wireFormat === undefined) { if (this.definition.resp.isEmpty) { - return (this._wireFormat = null); + this._wireFormat = null; + return this._wireFormat; } const contentType = this.headers.get(HttpHeader.ContentType); if (contentType === null) { if (this.status === HttpStatusCode.NO_CONTENT) { - return (this._wireFormat = null); + this._wireFormat = null; + return this._wireFormat; } else { throw Error("Content-Type header is required in response"); } @@ -198,7 +200,7 @@ export class ApiResponse extends Response { } else { return errBody; } - } catch (e) { + } catch (_e) { return errBody || this.statusText; } } diff --git a/packages/api/src/utils/codecs.ts b/packages/api/src/utils/codecs.ts index 36d905583098..54214740f435 100644 --- a/packages/api/src/utils/codecs.ts +++ b/packages/api/src/utils/codecs.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ArrayType, ListBasicType, ListCompositeType, Type, isBasicType, isCompositeType} from "@chainsafe/ssz"; import {ForkName} from "@lodestar/params"; import {objectToExpectedCase} from "@lodestar/utils"; @@ -20,11 +19,8 @@ export type EmptyRequest = Record; export type EmptyResponseData = void; export type EmptyMeta = void; -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type AnyEndpoint = Endpoint; -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type EmptyRequestEndpoint = Endpoint; -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type EmptyResponseEndpoint = Endpoint; /** Shortcut for routes that have no params, query */ diff --git a/packages/api/src/utils/metadata.ts b/packages/api/src/utils/metadata.ts index 1eaa4132119f..2ee9b2f51f0e 100644 --- a/packages/api/src/utils/metadata.ts +++ b/packages/api/src/utils/metadata.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ContainerType, ValueOf} from "@chainsafe/ssz"; import {ForkName} from "@lodestar/params"; import {StringType, ssz, stringType} from "@lodestar/types"; diff --git a/packages/api/src/utils/serdes.ts b/packages/api/src/utils/serdes.ts index 282c2514e00d..c2080ad2d020 100644 --- a/packages/api/src/utils/serdes.ts +++ b/packages/api/src/utils/serdes.ts @@ -104,7 +104,7 @@ export function fromGraffitiHex(hex?: string): string | undefined { } try { return new TextDecoder("utf8").decode(fromHex(hex)); - } catch { + } catch (_e) { // allow malformed graffiti hex string return hex; } diff --git a/packages/api/src/utils/server/handler.ts b/packages/api/src/utils/server/handler.ts index a3cd9a43a56a..035f4328141a 100644 --- a/packages/api/src/utils/server/handler.ts +++ b/packages/api/src/utils/server/handler.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import type * as fastify from "fastify"; import {HttpHeader, MediaType, SUPPORTED_MEDIA_TYPES, parseAcceptHeader, parseContentTypeHeader} from "../headers.js"; import { diff --git a/packages/api/src/utils/server/method.ts b/packages/api/src/utils/server/method.ts index 080c78869798..6fc99cc49a72 100644 --- a/packages/api/src/utils/server/method.ts +++ b/packages/api/src/utils/server/method.ts @@ -12,10 +12,9 @@ type ApplicationResponseObject = { : {data: E["return"] | (E["return"] extends undefined ? undefined : Uint8Array)}) & (E["meta"] extends EmptyMeta ? {meta?: never} : {meta: E["meta"]}); -export type ApplicationResponse = - HasOnlyOptionalProps> extends true - ? ApplicationResponseObject | void - : ApplicationResponseObject; +export type ApplicationResponse = HasOnlyOptionalProps> extends true + ? ApplicationResponseObject | void + : ApplicationResponseObject; export type ApiContext = { /** diff --git a/packages/api/test/perf/compileRouteUrlFormater.test.ts b/packages/api/test/perf/compileRouteUrlFormater.test.ts index ab16e1a5d14e..60d9e3fea8ee 100644 --- a/packages/api/test/perf/compileRouteUrlFormater.test.ts +++ b/packages/api/test/perf/compileRouteUrlFormater.test.ts @@ -1,7 +1,5 @@ import {compileRouteUrlFormatter} from "../../src/utils/urlFormat.js"; -/* eslint-disable no-console */ - describe("route parse", () => { it.skip("Benchmark compileRouteUrlFormatter", () => { const path = "/eth/v1/validator/:name/attester/:epoch"; diff --git a/packages/api/test/unit/beacon/genericServerTest/beacon.test.ts b/packages/api/test/unit/beacon/genericServerTest/beacon.test.ts index a722e72a4c27..f8c13b33afb6 100644 --- a/packages/api/test/unit/beacon/genericServerTest/beacon.test.ts +++ b/packages/api/test/unit/beacon/genericServerTest/beacon.test.ts @@ -8,7 +8,6 @@ import {testData} from "../testData/beacon.js"; describe("beacon / beacon", () => { runGenericServerTest( - // eslint-disable-next-line @typescript-eslint/naming-convention createChainForkConfig({...defaultChainConfig, ALTAIR_FORK_EPOCH: 1, BELLATRIX_FORK_EPOCH: 2}), getClient, getRoutes, diff --git a/packages/api/test/unit/beacon/genericServerTest/config.test.ts b/packages/api/test/unit/beacon/genericServerTest/config.test.ts index 8b924cf07693..91075f96d1e3 100644 --- a/packages/api/test/unit/beacon/genericServerTest/config.test.ts +++ b/packages/api/test/unit/beacon/genericServerTest/config.test.ts @@ -6,8 +6,6 @@ import {getRoutes} from "../../../../src/beacon/server/config.js"; import {runGenericServerTest} from "../../../utils/genericServerTest.js"; import {testData} from "../testData/config.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - describe("beacon / config", () => { runGenericServerTest(config, getClient, getRoutes, testData); diff --git a/packages/api/test/unit/beacon/oapiSpec.test.ts b/packages/api/test/unit/beacon/oapiSpec.test.ts index 2b8a8254dd6b..0478d503d517 100644 --- a/packages/api/test/unit/beacon/oapiSpec.test.ts +++ b/packages/api/test/unit/beacon/oapiSpec.test.ts @@ -18,7 +18,6 @@ import {testData as validatorTestData} from "./testData/validator.js"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); const version = "v3.0.0-alpha.6"; @@ -28,7 +27,6 @@ const openApiFile: OpenApiFile = { version: RegExp(version), }; -// eslint-disable-next-line @typescript-eslint/naming-convention const config = createChainForkConfig({...defaultChainConfig, ALTAIR_FORK_EPOCH: 1, BELLATRIX_FORK_EPOCH: 2}); const definitions = { diff --git a/packages/api/test/unit/beacon/testData/events.ts b/packages/api/test/unit/beacon/testData/events.ts index 8a7610a26836..3d2ffb708965 100644 --- a/packages/api/test/unit/beacon/testData/events.ts +++ b/packages/api/test/unit/beacon/testData/events.ts @@ -5,8 +5,6 @@ import {GenericServerTestCases} from "../../../utils/genericServerTest.js"; const abortController = new AbortController(); -/* eslint-disable @typescript-eslint/naming-convention */ - export const testData: GenericServerTestCases = { eventstream: { args: {topics: [EventType.head, EventType.chainReorg], signal: abortController.signal, onEvent: () => {}}, diff --git a/packages/api/test/unit/builder/builder.test.ts b/packages/api/test/unit/builder/builder.test.ts index 045a66496b6f..d2e25916069e 100644 --- a/packages/api/test/unit/builder/builder.test.ts +++ b/packages/api/test/unit/builder/builder.test.ts @@ -10,7 +10,6 @@ describe("builder", () => { runGenericServerTest( createChainForkConfig({ ...defaultChainConfig, - /* eslint-disable @typescript-eslint/naming-convention */ ALTAIR_FORK_EPOCH: 0, BELLATRIX_FORK_EPOCH: 0, DENEB_FORK_EPOCH: 0, diff --git a/packages/api/test/unit/builder/oapiSpec.test.ts b/packages/api/test/unit/builder/oapiSpec.test.ts index 60168f71d8d8..d972b64905e5 100644 --- a/packages/api/test/unit/builder/oapiSpec.test.ts +++ b/packages/api/test/unit/builder/oapiSpec.test.ts @@ -10,7 +10,6 @@ import {testData} from "./testData.js"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); const version = "v0.2.0"; @@ -23,7 +22,6 @@ const openApiFile: OpenApiFile = { }; const definitions = getDefinitions( - // eslint-disable-next-line @typescript-eslint/naming-convention createChainForkConfig({...defaultChainConfig, ALTAIR_FORK_EPOCH: 0, BELLATRIX_FORK_EPOCH: 0}) ); diff --git a/packages/api/test/unit/client/fetch.test.ts b/packages/api/test/unit/client/fetch.test.ts index 80e5f58b164a..0c08c5bbf5a3 100644 --- a/packages/api/test/unit/client/fetch.test.ts +++ b/packages/api/test/unit/client/fetch.test.ts @@ -92,7 +92,6 @@ describe("FetchError", function () { const afterHook = afterHooks.pop(); if (afterHook) await afterHook().catch((e: Error) => { - // eslint-disable-next-line no-console console.error("Error in afterEach hook", e); }); } diff --git a/packages/api/test/unit/client/httpClientFallback.test.ts b/packages/api/test/unit/client/httpClientFallback.test.ts index ea20c3f33982..244fcbe5bf23 100644 --- a/packages/api/test/unit/client/httpClientFallback.test.ts +++ b/packages/api/test/unit/client/httpClientFallback.test.ts @@ -81,7 +81,6 @@ describe("httpClient fallback", () => { fetchStub.mockClear(); - // eslint-disable-next-line no-console if (DEBUG_LOGS) console.log("completed assertions step", step); } diff --git a/packages/api/test/unit/client/urlFormat.test.ts b/packages/api/test/unit/client/urlFormat.test.ts index dc86e2674e13..5132044b7631 100644 --- a/packages/api/test/unit/client/urlFormat.test.ts +++ b/packages/api/test/unit/client/urlFormat.test.ts @@ -7,8 +7,6 @@ import { urlToTokens, } from "../../../src/utils/urlFormat.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - describe("utils / urlFormat", () => { const testCases: { urlTemplate: string; diff --git a/packages/api/test/unit/keymanager/oapiSpec.test.ts b/packages/api/test/unit/keymanager/oapiSpec.test.ts index 97011f5d3660..aab4e1823ab0 100644 --- a/packages/api/test/unit/keymanager/oapiSpec.test.ts +++ b/packages/api/test/unit/keymanager/oapiSpec.test.ts @@ -9,7 +9,6 @@ import {testData} from "./testData.js"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); const version = "v1.1.0"; diff --git a/packages/api/test/utils/checkAgainstSpec.ts b/packages/api/test/utils/checkAgainstSpec.ts index 5e339efcb822..85e9711ae601 100644 --- a/packages/api/test/utils/checkAgainstSpec.ts +++ b/packages/api/test/utils/checkAgainstSpec.ts @@ -127,7 +127,7 @@ export function runTestCheckAgainstSpec>( expect(reqSsz.body).toBeInstanceOf(Uint8Array); expect(reqCodec.onlySupport).not.toBe(WireFormat.json); - } catch { + } catch (_e) { throw Error("Must support ssz request body"); } } @@ -167,7 +167,7 @@ export function runTestCheckAgainstSpec>( expect(sszBytes).toBeInstanceOf(Uint8Array); expect(routeDef.resp.onlySupport).not.toBe(WireFormat.json); - } catch { + } catch (_e) { throw Error("Must support ssz response body"); } } @@ -183,7 +183,6 @@ function validateSchema(schema: Parameters[0], json: unknown try { validate = ajv.compile(schema); } catch (e) { - // eslint-disable-next-line no-console console.error(JSON.stringify(schema, null, 2)); (e as Error).message = `${id} schema - ${(e as Error).message}`; throw e; diff --git a/packages/api/test/utils/parseOpenApiSpec.ts b/packages/api/test/utils/parseOpenApiSpec.ts index 7527fb61abaa..e6e75014312b 100644 --- a/packages/api/test/utils/parseOpenApiSpec.ts +++ b/packages/api/test/utils/parseOpenApiSpec.ts @@ -105,7 +105,6 @@ export function parseOpenApiSpec(openApiJson: OpenApiJson): Map Promise< addSszContentTypeParser(server); server.addHook("onError", (_request, _reply, error, done) => { - // eslint-disable-next-line no-console console.log(`onError: ${error.toString()}`); done(); }); diff --git a/packages/beacon-node/package.json b/packages/beacon-node/package.json index 4deaf7c6ac16..8b46bc0038c7 100644 --- a/packages/beacon-node/package.json +++ b/packages/beacon-node/package.json @@ -75,8 +75,8 @@ "build:release": "yarn clean && yarn run build", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit && yarn test:e2e", "test:unit:minimal": "LODESTAR_PRESET=minimal vitest --run --dir test/unit/", "test:unit:mainnet": "LODESTAR_PRESET=mainnet vitest --run --dir test/unit-mainnet", diff --git a/packages/beacon-node/src/api/impl/beacon/blocks/index.ts b/packages/beacon-node/src/api/impl/beacon/blocks/index.ts index 65e7b9373a22..240f391027a9 100644 --- a/packages/beacon-node/src/api/impl/beacon/blocks/index.ts +++ b/packages/beacon-node/src/api/impl/beacon/blocks/index.ts @@ -224,15 +224,17 @@ export function getBeaconBlockApi({ () => network.publishBeaconBlock(signedBlock) as Promise, () => // there is no rush to persist block since we published it to gossip anyway - chain.processBlock(blockForImport, {...opts, eagerPersistBlock: false}).catch((e) => { - if (e instanceof BlockError && e.type.code === BlockErrorCode.PARENT_UNKNOWN) { - network.events.emit(NetworkEvent.unknownBlockParent, { - blockInput: blockForImport, - peer: IDENTITY_PEER_ID, - }); - } - throw e; - }), + chain + .processBlock(blockForImport, {...opts, eagerPersistBlock: false}) + .catch((e) => { + if (e instanceof BlockError && e.type.code === BlockErrorCode.PARENT_UNKNOWN) { + network.events.emit(NetworkEvent.unknownBlockParent, { + blockInput: blockForImport, + peer: IDENTITY_PEER_ID, + }); + } + throw e; + }), ]; await promiseAllMaybeAsync(publishPromises); }; @@ -258,7 +260,7 @@ export function getBeaconBlockApi({ chain.logger.debug("Reconstructing signedBlockOrContents", {slot, blockRoot, source}); const contents = executionPayload - ? chain.producedContentsCache.get(toRootHex(executionPayload.blockHash)) ?? null + ? (chain.producedContentsCache.get(toRootHex(executionPayload.blockHash)) ?? null) : null; const signedBlockOrContents = reconstructFullBlockOrContents(signedBlindedBlock, {executionPayload, contents}); diff --git a/packages/beacon-node/src/api/impl/beacon/pool/index.ts b/packages/beacon-node/src/api/impl/beacon/pool/index.ts index e01b172f1e72..9343dd67a399 100644 --- a/packages/beacon-node/src/api/impl/beacon/pool/index.ts +++ b/packages/beacon-node/src/api/impl/beacon/pool/index.ts @@ -94,7 +94,6 @@ export function getBeaconPoolApi({ signedAttestations.map(async (attestation, i) => { try { const fork = chain.config.getForkName(chain.clock.currentSlot); - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type const validateFn = () => validateApiAttestation(fork, chain, {attestation, serializedData: null}); const {slot, beaconBlockRoot} = attestation.data; // when a validator is configured with multiple beacon node urls, this attestation data may come from another beacon node diff --git a/packages/beacon-node/src/api/impl/beacon/state/utils.ts b/packages/beacon-node/src/api/impl/beacon/state/utils.ts index 5e9d3be01221..074fa7928d91 100644 --- a/packages/beacon-node/src/api/impl/beacon/state/utils.ts +++ b/packages/beacon-node/src/api/impl/beacon/state/utils.ts @@ -134,7 +134,7 @@ export function getStateValidatorIndex( if (id.startsWith("0x")) { try { id = fromHex(id); - } catch (e) { + } catch (_e) { return {valid: false, code: 400, reason: "Invalid pubkey hex encoding"}; } } else { diff --git a/packages/beacon-node/src/api/impl/config/constants.ts b/packages/beacon-node/src/api/impl/config/constants.ts index 14ecade15b2e..e951da35bdd2 100644 --- a/packages/beacon-node/src/api/impl/config/constants.ts +++ b/packages/beacon-node/src/api/impl/config/constants.ts @@ -41,8 +41,6 @@ import { FULL_EXIT_REQUEST_AMOUNT, } from "@lodestar/params"; -/* eslint-disable @typescript-eslint/naming-convention */ - /** * Hand-picked list of constants declared in consensus-spec .md files. * This list is asserted to be up-to-date with the test `test/e2e/api/impl/config.test.ts` diff --git a/packages/beacon-node/src/api/impl/events/index.ts b/packages/beacon-node/src/api/impl/events/index.ts index 25659743ddf3..55a49fe0c7e3 100644 --- a/packages/beacon-node/src/api/impl/events/index.ts +++ b/packages/beacon-node/src/api/impl/events/index.ts @@ -10,11 +10,10 @@ export function getEventsApi({ const onAbortFns: (() => void)[] = []; for (const topic of topics) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: const handler = (data: any): void => { // TODO: What happens if this handler throws? Does it break the other chain.emitter listeners? - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment onEvent({type: topic, message: data}); }; diff --git a/packages/beacon-node/src/api/impl/node/utils.ts b/packages/beacon-node/src/api/impl/node/utils.ts index f26539eb0b36..27978a03ec39 100644 --- a/packages/beacon-node/src/api/impl/node/utils.ts +++ b/packages/beacon-node/src/api/impl/node/utils.ts @@ -44,6 +44,7 @@ function getPeerState(status: StreamStatus): routes.node.PeerState { case "closing": return "disconnecting"; case "closed": + return "disconnected"; default: return "disconnected"; } diff --git a/packages/beacon-node/src/api/impl/validator/index.ts b/packages/beacon-node/src/api/impl/validator/index.ts index 43bb60187463..9cb2a6a53d4f 100644 --- a/packages/beacon-node/src/api/impl/validator/index.ts +++ b/packages/beacon-node/src/api/impl/validator/index.ts @@ -1189,7 +1189,6 @@ export function getValidatorApi( signedAggregateAndProofs.map(async (signedAggregateAndProof, i) => { try { // TODO: Validate in batch - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type const validateFn = () => validateApiAggregateAndProof(fork, chain, signedAggregateAndProof); const {slot, beaconBlockRoot} = signedAggregateAndProof.message.aggregate.data; // when a validator is configured with multiple beacon node urls, this attestation may come from another beacon node diff --git a/packages/beacon-node/src/api/rest/activeSockets.ts b/packages/beacon-node/src/api/rest/activeSockets.ts index 9f1b0f1a78a3..e6a9aa382333 100644 --- a/packages/beacon-node/src/api/rest/activeSockets.ts +++ b/packages/beacon-node/src/api/rest/activeSockets.ts @@ -93,7 +93,7 @@ export class HttpActiveSocketsTracker { await waitFor(() => this.sockets.size === 0, { timeout: GRACEFUL_TERMINATION_TIMEOUT, }); - } catch { + } catch (_e) { // Ignore timeout error } finally { for (const socket of this.sockets) { diff --git a/packages/beacon-node/src/api/rest/swaggerUI.ts b/packages/beacon-node/src/api/rest/swaggerUI.ts index c48f4e51860d..b4db3e43e6b1 100644 --- a/packages/beacon-node/src/api/rest/swaggerUI.ts +++ b/packages/beacon-node/src/api/rest/swaggerUI.ts @@ -41,15 +41,13 @@ async function getAsset(name: string): Promise { const path = await import("node:path"); const fs = await import("node:fs/promises"); const url = await import("node:url"); - // eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); return await fs.readFile(path.join(__dirname, "../../../../../assets/", name)); - } catch (e) { + } catch (_e) { return undefined; } } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export async function getFavicon() { const content = await getAsset("round-icon.ico"); if (!content) { @@ -67,7 +65,6 @@ export async function getFavicon() { ]; } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export async function getLogo() { const content = await getAsset("lodestar_icon_text_white.png"); if (!content) { diff --git a/packages/beacon-node/src/chain/blocks/verifyBlocksDataAvailability.ts b/packages/beacon-node/src/chain/blocks/verifyBlocksDataAvailability.ts index 8393c91063de..accd3df31ab0 100644 --- a/packages/beacon-node/src/chain/blocks/verifyBlocksDataAvailability.ts +++ b/packages/beacon-node/src/chain/blocks/verifyBlocksDataAvailability.ts @@ -83,7 +83,6 @@ async function maybeValidateBlobs( return {dataAvailabilityStatus: DataAvailabilityStatus.Available, availableBlockInput: blockInput}; } - // eslint-disable-next-line no-fallthrough case BlockInputType.dataPromise: { // run full validation const {block} = blockInput; @@ -136,7 +135,7 @@ async function raceWithCutoff( try { await Promise.race([availabilityPromise, cutoffTimeout]); - } catch (e) { + } catch (_e) { // throw unavailable so that the unknownblock/blobs can be triggered to pull the block throw new BlockError(block, {code: BlockErrorCode.DATA_UNAVAILABLE}); } diff --git a/packages/beacon-node/src/chain/bls/multithread/index.ts b/packages/beacon-node/src/chain/bls/multithread/index.ts index 3725fa4bcb1c..ce9b726c7693 100644 --- a/packages/beacon-node/src/chain/bls/multithread/index.ts +++ b/packages/beacon-node/src/chain/bls/multithread/index.ts @@ -3,9 +3,8 @@ import path from "node:path"; import {spawn, Worker} from "@chainsafe/threads"; // `threads` library creates self global variable which breaks `timeout-abort-controller` https://github.com/jacobheun/timeout-abort-controller/issues/9 // Don't add an eslint disable here as a reminder that this has to be fixed eventually -// eslint-disable-next-line // @ts-ignore -// eslint-disable-next-line +// biome-ignore lint/suspicious/noGlobalAssign: self = undefined; import {PublicKey} from "@chainsafe/blst"; import {Logger} from "@lodestar/utils"; diff --git a/packages/beacon-node/src/chain/bls/multithread/poolSize.ts b/packages/beacon-node/src/chain/bls/multithread/poolSize.ts index 9397f97849cd..2c683e191fd6 100644 --- a/packages/beacon-node/src/chain/bls/multithread/poolSize.ts +++ b/packages/beacon-node/src/chain/bls/multithread/poolSize.ts @@ -6,7 +6,7 @@ try { } else { defaultPoolSize = (await import("node:os")).availableParallelism(); } -} catch (e) { +} catch (_e) { defaultPoolSize = 8; } diff --git a/packages/beacon-node/src/chain/bls/multithread/worker.ts b/packages/beacon-node/src/chain/bls/multithread/worker.ts index 9073920df19c..d2794db2e6bf 100644 --- a/packages/beacon-node/src/chain/bls/multithread/worker.ts +++ b/packages/beacon-node/src/chain/bls/multithread/worker.ts @@ -75,7 +75,7 @@ function verifyManySignatureSets(workReqArr: BlsWorkReq[]): BlsWorkResult { // Re-verify all sigs nonBatchableSets.push(...batchableChunk); } - } catch (e) { + } catch (_e) { // TODO: Ignore this error expecting that the same error will happen when re-verifying the set individually // It's not ideal but '@chainsafe/blst' may throw errors on some conditions batchRetries++; diff --git a/packages/beacon-node/src/chain/emitter.ts b/packages/beacon-node/src/chain/emitter.ts index 9c3ea4a9bf52..10b6455e48f5 100644 --- a/packages/beacon-node/src/chain/emitter.ts +++ b/packages/beacon-node/src/chain/emitter.ts @@ -1,4 +1,4 @@ -import {EventEmitter} from "events"; +import {EventEmitter} from "node:events"; import {StrictEventEmitter} from "strict-event-emitter-types"; import {routes} from "@lodestar/api"; diff --git a/packages/beacon-node/src/chain/initState.ts b/packages/beacon-node/src/chain/initState.ts index 311806fb1be7..2883cdc8388e 100644 --- a/packages/beacon-node/src/chain/initState.ts +++ b/packages/beacon-node/src/chain/initState.ts @@ -132,7 +132,7 @@ export async function initStateFromEth1({ * Restore the latest beacon state from db */ export async function initStateFromDb( - config: ChainForkConfig, + _config: ChainForkConfig, db: IBeaconDb, logger: Logger ): Promise { diff --git a/packages/beacon-node/src/chain/produceBlock/validateBlobsAndKzgCommitments.ts b/packages/beacon-node/src/chain/produceBlock/validateBlobsAndKzgCommitments.ts index ba086ecafc7e..06f17c92156a 100644 --- a/packages/beacon-node/src/chain/produceBlock/validateBlobsAndKzgCommitments.ts +++ b/packages/beacon-node/src/chain/produceBlock/validateBlobsAndKzgCommitments.ts @@ -5,7 +5,8 @@ import {BlobsBundle} from "../../execution/index.js"; * Optionally sanity-check that the KZG commitments match the versioned hashes in the transactions * https://github.com/ethereum/consensus-specs/blob/11a037fd9227e29ee809c9397b09f8cc3383a8c0/specs/eip4844/validator.md#blob-kzg-commitments */ -export function validateBlobsAndKzgCommitments(payload: ExecutionPayload, blobsBundle: BlobsBundle): void { + +export function validateBlobsAndKzgCommitments(_payload: ExecutionPayload, blobsBundle: BlobsBundle): void { // sanity-check that the KZG commitments match the blobs (as produced by the execution engine) if (blobsBundle.blobs.length !== blobsBundle.commitments.length) { throw Error( diff --git a/packages/beacon-node/src/chain/rewards/attestationsRewards.ts b/packages/beacon-node/src/chain/rewards/attestationsRewards.ts index 70fb27de239a..0c74b8610f93 100644 --- a/packages/beacon-node/src/chain/rewards/attestationsRewards.ts +++ b/packages/beacon-node/src/chain/rewards/attestationsRewards.ts @@ -36,9 +36,9 @@ const defaultAttestationsReward = {head: 0, target: 0, source: 0, inclusionDelay const defaultAttestationsPenalty = {target: 0, source: 0}; export async function computeAttestationsRewards( - epoch: Epoch, + _epoch: Epoch, state: CachedBeaconStateAllForks, - config: BeaconConfig, + _config: BeaconConfig, validatorIds?: (ValidatorIndex | string)[] ): Promise { const fork = state.config.getForkName(state.slot); diff --git a/packages/beacon-node/src/chain/validation/aggregateAndProof.ts b/packages/beacon-node/src/chain/validation/aggregateAndProof.ts index 39a3700aacf9..de5f40372c9f 100644 --- a/packages/beacon-node/src/chain/validation/aggregateAndProof.ts +++ b/packages/beacon-node/src/chain/validation/aggregateAndProof.ts @@ -6,7 +6,7 @@ import { createAggregateSignatureSetFromComponents, } from "@lodestar/state-transition"; import {toRootHex} from "@lodestar/utils"; -import {IBeaconChain} from ".."; +import {IBeaconChain} from "../index.js"; import {AttestationError, AttestationErrorCode, GossipAction} from "../errors/index.js"; import {RegenCaller} from "../regen/index.js"; import {getSelectionProofSignatureSet, getAggregateAndProofSignatureSet} from "./signatureSets/index.js"; diff --git a/packages/beacon-node/src/chain/validation/attesterSlashing.ts b/packages/beacon-node/src/chain/validation/attesterSlashing.ts index 11a499c9bb53..5da146a67a86 100644 --- a/packages/beacon-node/src/chain/validation/attesterSlashing.ts +++ b/packages/beacon-node/src/chain/validation/attesterSlashing.ts @@ -4,7 +4,7 @@ import { assertValidAttesterSlashing, getAttesterSlashingSignatureSets, } from "@lodestar/state-transition"; -import {IBeaconChain} from ".."; +import {IBeaconChain} from "../index.js"; import {AttesterSlashingError, AttesterSlashingErrorCode, GossipAction} from "../errors/index.js"; export async function validateApiAttesterSlashing( diff --git a/packages/beacon-node/src/chain/validation/blsToExecutionChange.ts b/packages/beacon-node/src/chain/validation/blsToExecutionChange.ts index e5ad56daeb5c..fff399aada50 100644 --- a/packages/beacon-node/src/chain/validation/blsToExecutionChange.ts +++ b/packages/beacon-node/src/chain/validation/blsToExecutionChange.ts @@ -4,7 +4,7 @@ import { getBlsToExecutionChangeSignatureSet, CachedBeaconStateCapella, } from "@lodestar/state-transition"; -import {IBeaconChain} from ".."; +import {IBeaconChain} from "../index.js"; import {BlsToExecutionChangeError, BlsToExecutionChangeErrorCode, GossipAction} from "../errors/index.js"; export async function validateApiBlsToExecutionChange( diff --git a/packages/beacon-node/src/chain/validation/proposerSlashing.ts b/packages/beacon-node/src/chain/validation/proposerSlashing.ts index 7281302aae8d..48fe6db326c9 100644 --- a/packages/beacon-node/src/chain/validation/proposerSlashing.ts +++ b/packages/beacon-node/src/chain/validation/proposerSlashing.ts @@ -1,6 +1,6 @@ import {phase0} from "@lodestar/types"; import {assertValidProposerSlashing, getProposerSlashingSignatureSets} from "@lodestar/state-transition"; -import {IBeaconChain} from ".."; +import {IBeaconChain} from "../index.js"; import {ProposerSlashingError, ProposerSlashingErrorCode, GossipAction} from "../errors/index.js"; export async function validateApiProposerSlashing( diff --git a/packages/beacon-node/src/chain/validation/voluntaryExit.ts b/packages/beacon-node/src/chain/validation/voluntaryExit.ts index 3957b51180d9..2b38b161423e 100644 --- a/packages/beacon-node/src/chain/validation/voluntaryExit.ts +++ b/packages/beacon-node/src/chain/validation/voluntaryExit.ts @@ -1,6 +1,6 @@ import {phase0} from "@lodestar/types"; import {isValidVoluntaryExit, getVoluntaryExitSignatureSet} from "@lodestar/state-transition"; -import {IBeaconChain} from ".."; +import {IBeaconChain} from "../index.js"; import {VoluntaryExitError, VoluntaryExitErrorCode, GossipAction} from "../errors/index.js"; import {RegenCaller} from "../regen/index.js"; diff --git a/packages/beacon-node/src/db/repositories/backfilledRanges.ts b/packages/beacon-node/src/db/repositories/backfilledRanges.ts index 309909b18cb8..f86c20288099 100644 --- a/packages/beacon-node/src/db/repositories/backfilledRanges.ts +++ b/packages/beacon-node/src/db/repositories/backfilledRanges.ts @@ -23,8 +23,7 @@ export class BackfilledRanges extends Repository { return bytesToInt(super.decodeKey(data) as unknown as Uint8Array, "be"); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - getId(value: Slot): number { + getId(_value: Slot): number { throw new Error("Cannot get the db key from slot"); } } diff --git a/packages/beacon-node/src/db/repositories/checkpointState.ts b/packages/beacon-node/src/db/repositories/checkpointState.ts index 8848f4d26d3a..cb111a497f87 100644 --- a/packages/beacon-node/src/db/repositories/checkpointState.ts +++ b/packages/beacon-node/src/db/repositories/checkpointState.ts @@ -11,7 +11,6 @@ import {Bucket, getBucketNameByValue} from "../buckets.js"; export class CheckpointStateRepository extends Repository { constructor(config: ChainForkConfig, db: Db) { // Pick some type but won't be used. Casted to any because no type can match `BeaconStateAllForks` - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any const type = ssz.phase0.BeaconState as any; const bucket = Bucket.allForks_checkpointState; super(config, db, bucket, type, getBucketNameByValue(bucket)); diff --git a/packages/beacon-node/src/db/repositories/depositDataRoot.ts b/packages/beacon-node/src/db/repositories/depositDataRoot.ts index fa8983f0e5fa..9b872c91bce4 100644 --- a/packages/beacon-node/src/db/repositories/depositDataRoot.ts +++ b/packages/beacon-node/src/db/repositories/depositDataRoot.ts @@ -21,8 +21,7 @@ export class DepositDataRootRepository extends Repository { } // depositDataRoots stored by depositData index - // eslint-disable-next-line @typescript-eslint/no-unused-vars - getId(value: Root): number { + getId(_value: Root): number { throw new Error("Unable to create depositIndex from root"); } diff --git a/packages/beacon-node/src/db/repositories/eth1Data.ts b/packages/beacon-node/src/db/repositories/eth1Data.ts index e0a6c14e4022..f87199a0b80e 100644 --- a/packages/beacon-node/src/db/repositories/eth1Data.ts +++ b/packages/beacon-node/src/db/repositories/eth1Data.ts @@ -14,8 +14,7 @@ export class Eth1DataRepository extends Repository { constructor(config: ChainForkConfig, db: Db) { // Pick some type but won't be used. Casted to any because no type can match `BeaconStateAllForks` - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: const type = ssz.phase0.BeaconState as any; const bucket = Bucket.allForks_stateArchive; super(config, db, bucket, type, getBucketNameByValue(bucket)); diff --git a/packages/beacon-node/src/db/single/preGenesisStateLastProcessedBlock.ts b/packages/beacon-node/src/db/single/preGenesisStateLastProcessedBlock.ts index c958b9de2f0a..37dcb069acc9 100644 --- a/packages/beacon-node/src/db/single/preGenesisStateLastProcessedBlock.ts +++ b/packages/beacon-node/src/db/single/preGenesisStateLastProcessedBlock.ts @@ -10,7 +10,7 @@ export class PreGenesisStateLastProcessedBlock { private readonly db: Db; private readonly key: Uint8Array; - constructor(config: ChainForkConfig, db: Db) { + constructor(_config: ChainForkConfig, db: Db) { this.db = db; this.type = ssz.UintNum64; this.bucket = Bucket.phase0_preGenesisStateLastProcessedBlock; diff --git a/packages/beacon-node/src/eth1/eth1MergeBlockTracker.ts b/packages/beacon-node/src/eth1/eth1MergeBlockTracker.ts index 9ba4a09a5549..f2ce0a8bb2f5 100644 --- a/packages/beacon-node/src/eth1/eth1MergeBlockTracker.ts +++ b/packages/beacon-node/src/eth1/eth1MergeBlockTracker.ts @@ -167,7 +167,6 @@ export class Eth1MergeBlockTracker { this.status = {code: StatusCode.SEARCHING}; this.logger.info("Starting search for terminal POW block", { - // eslint-disable-next-line @typescript-eslint/naming-convention TERMINAL_TOTAL_DIFFICULTY: this.config.TERMINAL_TOTAL_DIFFICULTY, }); @@ -268,7 +267,6 @@ export class Eth1MergeBlockTracker { // this class can start eagerly looking for the merge block when not necessary, startPollingMergeBlock() should // only be called when there is certainty that a mergeBlock search is necessary. - // eslint-disable-next-line no-constant-condition while (true) { if (block.totalDifficulty < this.config.TERMINAL_TOTAL_DIFFICULTY) { // TTD not reached yet diff --git a/packages/beacon-node/src/eth1/provider/eth1Provider.ts b/packages/beacon-node/src/eth1/provider/eth1Provider.ts index c86991eb7d15..d284700ddb1d 100644 --- a/packages/beacon-node/src/eth1/provider/eth1Provider.ts +++ b/packages/beacon-node/src/eth1/provider/eth1Provider.ts @@ -21,8 +21,6 @@ import { } from "./jsonRpcHttpClient.js"; import {isJsonRpcTruncatedError, quantityToNum, numToQuantity, dataToBytes} from "./utils.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - /** * Binds return types to Ethereum JSON RPC methods */ diff --git a/packages/beacon-node/src/eth1/provider/jsonRpcHttpClient.ts b/packages/beacon-node/src/eth1/provider/jsonRpcHttpClient.ts index cbe70ecb7e18..e1a2a001c278 100644 --- a/packages/beacon-node/src/eth1/provider/jsonRpcHttpClient.ts +++ b/packages/beacon-node/src/eth1/provider/jsonRpcHttpClient.ts @@ -1,4 +1,4 @@ -import {EventEmitter} from "events"; +import {EventEmitter} from "node:events"; import {StrictEventEmitter} from "strict-event-emitter-types"; import {fetch} from "@lodestar/api"; import {ErrorAborted, Gauge, Histogram, TimeoutError, isValidHttpUrl, retry} from "@lodestar/utils"; diff --git a/packages/beacon-node/src/eth1/provider/jwt.ts b/packages/beacon-node/src/eth1/provider/jwt.ts index da1fc1827cdd..1e267120957f 100644 --- a/packages/beacon-node/src/eth1/provider/jwt.ts +++ b/packages/beacon-node/src/eth1/provider/jwt.ts @@ -2,7 +2,6 @@ import type {TAlgorithm} from "jwt-simple"; // TODO: fix jwt-simple types import jwt from "jwt-simple"; -// eslint-disable-next-line import/no-named-as-default-member const {encode, decode} = jwt; /** diff --git a/packages/beacon-node/src/execution/builder/index.ts b/packages/beacon-node/src/execution/builder/index.ts index 2f584ad7dadd..fff66a3e8bc5 100644 --- a/packages/beacon-node/src/execution/builder/index.ts +++ b/packages/beacon-node/src/execution/builder/index.ts @@ -18,6 +18,7 @@ export function initializeExecutionBuilder( ): IExecutionBuilder { switch (opts.mode) { case "http": + return new ExecutionBuilderHttp(opts, config, metrics, logger); default: return new ExecutionBuilderHttp(opts, config, metrics, logger); } diff --git a/packages/beacon-node/src/execution/engine/http.ts b/packages/beacon-node/src/execution/engine/http.ts index b42424b28998..a8206a89250d 100644 --- a/packages/beacon-node/src/execution/engine/http.ts +++ b/packages/beacon-node/src/execution/engine/http.ts @@ -437,7 +437,7 @@ export class ExecutionEngineHttp implements IExecutionEngine { this.payloadIdCache.prune(); } - async getPayloadBodiesByHash(fork: ForkName, blockHashes: RootHex[]): Promise<(ExecutionPayloadBody | null)[]> { + async getPayloadBodiesByHash(_fork: ForkName, blockHashes: RootHex[]): Promise<(ExecutionPayloadBody | null)[]> { const method = "engine_getPayloadBodiesByHashV1"; assertReqSizeLimit(blockHashes.length, 32); const response = await this.rpc.fetchWithRetries< @@ -448,7 +448,7 @@ export class ExecutionEngineHttp implements IExecutionEngine { } async getPayloadBodiesByRange( - fork: ForkName, + _fork: ForkName, startBlockNumber: number, blockCount: number ): Promise<(ExecutionPayloadBody | null)[]> { diff --git a/packages/beacon-node/src/execution/engine/index.ts b/packages/beacon-node/src/execution/engine/index.ts index a8b878502aff..dd2de2017c22 100644 --- a/packages/beacon-node/src/execution/engine/index.ts +++ b/packages/beacon-node/src/execution/engine/index.ts @@ -55,6 +55,8 @@ export function initializeExecutionEngine( return getExecutionEngineFromBackend(new ExecutionEngineMockBackend(opts), modules); case "http": + return getExecutionEngineHttp(opts, modules); + default: return getExecutionEngineHttp(opts, modules); } diff --git a/packages/beacon-node/src/execution/engine/mock.ts b/packages/beacon-node/src/execution/engine/mock.ts index 4cff2a8d00f4..bc3a130e604e 100644 --- a/packages/beacon-node/src/execution/engine/mock.ts +++ b/packages/beacon-node/src/execution/engine/mock.ts @@ -85,7 +85,6 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend { }); this.handlers = { - /* eslint-disable @typescript-eslint/naming-convention */ engine_newPayloadV1: this.notifyNewPayload.bind(this), engine_newPayloadV2: this.notifyNewPayload.bind(this), engine_newPayloadV3: this.notifyNewPayload.bind(this), diff --git a/packages/beacon-node/src/execution/engine/types.ts b/packages/beacon-node/src/execution/engine/types.ts index 32fe4cb79d3d..9b4f5e5c83e6 100644 --- a/packages/beacon-node/src/execution/engine/types.ts +++ b/packages/beacon-node/src/execution/engine/types.ts @@ -19,8 +19,6 @@ import { import {ExecutionPayloadStatus, BlobsBundle, PayloadAttributes, VersionedHashes} from "./interface.js"; import {WithdrawalV1} from "./payloadIdCache.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - export type EngineApiRpcParamTypes = { /** * 1. Object - Instance of ExecutionPayload diff --git a/packages/beacon-node/src/execution/engine/utils.ts b/packages/beacon-node/src/execution/engine/utils.ts index b56f62bf602b..4d84eda52c44 100644 --- a/packages/beacon-node/src/execution/engine/utils.ts +++ b/packages/beacon-node/src/execution/engine/utils.ts @@ -12,7 +12,7 @@ import {isQueueErrorAborted} from "../../util/queue/errors.js"; import {ExecutionPayloadStatus, ExecutionEngineState} from "./interface.js"; export type JsonRpcBackend = { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: readonly handlers: Record any>; }; @@ -27,8 +27,7 @@ export class ExecutionEngineMockJsonRpcClient implements IJsonRpcHttpClient { if (handler === undefined) { throw Error(`Unknown method ${payload.method}`); } - - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: return handler(...(payload.params as any[])) as R; }, payload); } diff --git a/packages/beacon-node/src/metrics/metrics/beacon.ts b/packages/beacon-node/src/metrics/metrics/beacon.ts index 949999dbb1f4..6e86328ee561 100644 --- a/packages/beacon-node/src/metrics/metrics/beacon.ts +++ b/packages/beacon-node/src/metrics/metrics/beacon.ts @@ -11,7 +11,6 @@ export type BeaconMetrics = ReturnType; * https://github.com/ethereum/beacon-metrics/ and * https://hackmd.io/D5FmoeFZScim_squBFl8oA */ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createBeaconMetrics(register: RegistryMetricCreator) { return { // From https://github.com/ethereum/beacon-metrics/blob/master/metrics.md diff --git a/packages/beacon-node/src/metrics/metrics/lodestar.ts b/packages/beacon-node/src/metrics/metrics/lodestar.ts index bac740b7ee04..f15e195faa20 100644 --- a/packages/beacon-node/src/metrics/metrics/lodestar.ts +++ b/packages/beacon-node/src/metrics/metrics/lodestar.ts @@ -25,7 +25,6 @@ export type LodestarMetrics = ReturnType; /** * Extra Lodestar custom metrics */ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createLodestarMetrics( register: RegistryMetricCreator, metadata?: LodestarMetadata, diff --git a/packages/beacon-node/src/monitoring/service.ts b/packages/beacon-node/src/monitoring/service.ts index 9581c5f11c92..bd2388738d1f 100644 --- a/packages/beacon-node/src/monitoring/service.ts +++ b/packages/beacon-node/src/monitoring/service.ts @@ -229,7 +229,7 @@ export class MonitoringService { } return url; - } catch { + } catch (_e) { throw new Error(`Monitoring endpoint must be a valid URL: ${endpoint}`); } } diff --git a/packages/beacon-node/src/monitoring/system.ts b/packages/beacon-node/src/monitoring/system.ts index a1a79b1bd277..83507443be01 100644 --- a/packages/beacon-node/src/monitoring/system.ts +++ b/packages/beacon-node/src/monitoring/system.ts @@ -3,7 +3,6 @@ import os from "node:os"; import path from "node:path"; // We want to keep `system` export as it's more readable and easier to understand -// eslint-disable-next-line import/no-named-as-default import system from "systeminformation"; import {Logger} from "@lodestar/utils"; diff --git a/packages/beacon-node/src/network/core/metrics.ts b/packages/beacon-node/src/network/core/metrics.ts index c267ec069d88..7d0ef47d84af 100644 --- a/packages/beacon-node/src/network/core/metrics.ts +++ b/packages/beacon-node/src/network/core/metrics.ts @@ -5,7 +5,6 @@ import {SubnetSource} from "../subnets/attnetsService.js"; export type NetworkCoreMetrics = ReturnType; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createNetworkCoreMetrics(register: RegistryMetricCreator) { return { register, @@ -254,7 +253,6 @@ export function createNetworkCoreMetrics(register: RegistryMetricCreator) { export type NetworkCoreWorkerMetrics = ReturnType; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function getNetworkCoreWorkerMetrics(register: RegistryMetricCreator) { return { reqRespBridgeRespCallerPending: register.gauge({ diff --git a/packages/beacon-node/src/network/core/networkCore.ts b/packages/beacon-node/src/network/core/networkCore.ts index 83ef4c4fb063..1a497925e4fd 100644 --- a/packages/beacon-node/src/network/core/networkCore.ts +++ b/packages/beacon-node/src/network/core/networkCore.ts @@ -149,7 +149,7 @@ export class NetworkCore implements INetworkCore { // Bind discv5's ENR to local metadata // resolve circular dependency by setting `discv5` variable after the peer manager is instantiated - // eslint-disable-next-line prefer-const + // biome-ignore lint/style/useConst: let discv5: Discv5Worker | undefined; const onMetadataSetValue = function onMetadataSetValue(key: string, value: Uint8Array): void { discv5?.setEnrValue(key, value).catch((e) => logger.error("error on setEnrValue", {key}, e)); diff --git a/packages/beacon-node/src/network/core/networkCoreWorker.ts b/packages/beacon-node/src/network/core/networkCoreWorker.ts index 1df348335582..5e4b057402d8 100644 --- a/packages/beacon-node/src/network/core/networkCoreWorker.ts +++ b/packages/beacon-node/src/network/core/networkCoreWorker.ts @@ -28,7 +28,6 @@ import { // Cloned data from instantiation const workerData = worker.workerData as NetworkWorkerData; const parentPort = worker.parentPort; -// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (!workerData) throw Error("workerData must be defined"); if (!parentPort) throw Error("parentPort must be defined"); diff --git a/packages/beacon-node/src/network/core/networkCoreWorkerHandler.ts b/packages/beacon-node/src/network/core/networkCoreWorkerHandler.ts index 19cca27eaaac..bd66a21e726b 100644 --- a/packages/beacon-node/src/network/core/networkCoreWorkerHandler.ts +++ b/packages/beacon-node/src/network/core/networkCoreWorkerHandler.ts @@ -136,7 +136,7 @@ export class WorkerNetworkCore implements INetworkCore { resourceLimits: {maxYoungGenerationSizeMb: opts.maxYoungGenerationSizeMb}, } as ConstructorParameters[1]); - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: const networkThreadApi = (await spawn(worker, { // A Lodestar Node may do very expensive task at start blocking the event loop and causing // the initialization to timeout. The number below is big enough to almost disable the timeout diff --git a/packages/beacon-node/src/network/core/types.ts b/packages/beacon-node/src/network/core/types.ts index 41b7f669eaac..4eeaf96e1903 100644 --- a/packages/beacon-node/src/network/core/types.ts +++ b/packages/beacon-node/src/network/core/types.ts @@ -90,7 +90,7 @@ export type NetworkWorkerData = { */ export type NetworkWorkerApi = INetworkCorePublic & { // To satisfy the constraint of `ModuleThread` type - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: [string: string]: (...args: any[]) => Promise | any; // Async method through worker boundary reportPeer(peer: PeerIdStr, action: PeerAction, actionName: string): Promise; diff --git a/packages/beacon-node/src/network/discv5/index.ts b/packages/beacon-node/src/network/discv5/index.ts index b2136658dfe7..745b3171c38d 100644 --- a/packages/beacon-node/src/network/discv5/index.ts +++ b/packages/beacon-node/src/network/discv5/index.ts @@ -1,4 +1,4 @@ -import EventEmitter from "events"; +import EventEmitter from "node:events"; import {PeerId, Secp256k1PeerId} from "@libp2p/interface"; import {StrictEventEmitter} from "strict-event-emitter-types"; import {exportToProtobuf} from "@libp2p/peer-id-factory"; diff --git a/packages/beacon-node/src/network/discv5/worker.ts b/packages/beacon-node/src/network/discv5/worker.ts index be8fdc4af601..8e96751d5fe7 100644 --- a/packages/beacon-node/src/network/discv5/worker.ts +++ b/packages/beacon-node/src/network/discv5/worker.ts @@ -22,7 +22,6 @@ import {enrRelevance, ENRRelevance} from "./utils.js"; // Cloned data from instatiation const workerData = worker.workerData as Discv5WorkerData; -// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (!workerData) throw Error("workerData must be defined"); const logger = getNodeLogger(workerData.loggerOpts); diff --git a/packages/beacon-node/src/network/events.ts b/packages/beacon-node/src/network/events.ts index 45759de61073..a95b52394163 100644 --- a/packages/beacon-node/src/network/events.ts +++ b/packages/beacon-node/src/network/events.ts @@ -1,4 +1,4 @@ -import {EventEmitter} from "events"; +import {EventEmitter} from "node:events"; import {PeerId, TopicValidatorResult} from "@libp2p/interface"; import {phase0, RootHex} from "@lodestar/types"; import {BlockInput, NullBlockInput} from "../chain/blocks/types.js"; diff --git a/packages/beacon-node/src/network/forks.ts b/packages/beacon-node/src/network/forks.ts index 47575cf6d9c6..1c613f4cee94 100644 --- a/packages/beacon-node/src/network/forks.ts +++ b/packages/beacon-node/src/network/forks.ts @@ -86,7 +86,6 @@ export function getCurrentAndNextFork( } return { - // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions currentFork: forks[currentForkIdx] || forks[0], nextFork: hasNextFork ? forks[nextForkIdx] : undefined, }; diff --git a/packages/beacon-node/src/network/gossip/gossipsub.ts b/packages/beacon-node/src/network/gossip/gossipsub.ts index e6977abe8ce6..1fc326ba1e58 100644 --- a/packages/beacon-node/src/network/gossip/gossipsub.ts +++ b/packages/beacon-node/src/network/gossip/gossipsub.ts @@ -26,7 +26,6 @@ import { GOSSIP_D_LOW, } from "./scoringParameters.js"; -/* eslint-disable @typescript-eslint/naming-convention */ /** As specified in https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/phase0/p2p-interface.md */ const GOSSIPSUB_HEARTBEAT_INTERVAL = 0.7 * 1000; diff --git a/packages/beacon-node/src/network/gossip/interface.ts b/packages/beacon-node/src/network/gossip/interface.ts index af5e3888d04f..ff1bfa088c17 100644 --- a/packages/beacon-node/src/network/gossip/interface.ts +++ b/packages/beacon-node/src/network/gossip/interface.ts @@ -203,7 +203,7 @@ export type BatchGossipHandler = ( gossipHandlerParams: GossipHandlerParamGeneric[] ) => Promise<(null | GossipActionError)[]>; -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: export type ResolvedType Promise> = F extends (...args: any) => Promise ? T : never; diff --git a/packages/beacon-node/src/network/gossip/metrics.ts b/packages/beacon-node/src/network/gossip/metrics.ts index c2b5d0b32338..5ca5d22154c2 100644 --- a/packages/beacon-node/src/network/gossip/metrics.ts +++ b/packages/beacon-node/src/network/gossip/metrics.ts @@ -4,7 +4,6 @@ import {GossipType} from "./interface.js"; export type Eth2GossipsubMetrics = ReturnType; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createEth2GossipsubMetrics(register: RegistryMetricCreator) { return { gossipPeer: { diff --git a/packages/beacon-node/src/network/gossip/scoringParameters.ts b/packages/beacon-node/src/network/gossip/scoringParameters.ts index 7e1be07f2ca7..3ba32614afeb 100644 --- a/packages/beacon-node/src/network/gossip/scoringParameters.ts +++ b/packages/beacon-node/src/network/gossip/scoringParameters.ts @@ -12,8 +12,6 @@ import {Eth2Context, Eth2GossipsubModules} from "./gossipsub.js"; import {GossipType} from "./interface.js"; import {stringifyGossipTopic} from "./topic.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - export const GOSSIP_D = 8; export const GOSSIP_D_LOW = 6; export const GOSSIP_D_HIGH = 12; diff --git a/packages/beacon-node/src/network/gossip/topic.ts b/packages/beacon-node/src/network/gossip/topic.ts index b7c7425584c5..c44e29274bca 100644 --- a/packages/beacon-node/src/network/gossip/topic.ts +++ b/packages/beacon-node/src/network/gossip/topic.ts @@ -78,7 +78,6 @@ function stringifyGossipTopicType(topic: GossipTopic): string { } } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function getGossipSSZType(topic: GossipTopic) { switch (topic.type) { case GossipType.beacon_block: @@ -120,7 +119,7 @@ export function sszDeserialize(topic: T, serializedData: const sszType = getGossipSSZType(topic); try { return sszType.deserialize(serializedData) as SSZTypeOfGossipTopic; - } catch (e) { + } catch (_e) { throw new GossipActionError(GossipAction.REJECT, {code: GossipErrorCode.INVALID_SERIALIZED_BYTES_ERROR_CODE}); } } @@ -131,7 +130,7 @@ export function sszDeserialize(topic: T, serializedData: export function sszDeserializeAttestation(fork: ForkName, serializedData: Uint8Array): Attestation { try { return sszTypesFor(fork).Attestation.deserialize(serializedData); - } catch (e) { + } catch (_e) { throw new GossipActionError(GossipAction.REJECT, {code: GossipErrorCode.INVALID_SERIALIZED_BYTES_ERROR_CODE}); } } diff --git a/packages/beacon-node/src/network/peers/datastore.ts b/packages/beacon-node/src/network/peers/datastore.ts index 762e99dc45b4..88a7a6f5f2d6 100644 --- a/packages/beacon-node/src/network/peers/datastore.ts +++ b/packages/beacon-node/src/network/peers/datastore.ts @@ -147,8 +147,7 @@ export class Eth2PeerDataStore extends BaseDatastore { if (this._dirtyItems.size >= this._threshold) { try { await this._commitData(); - // eslint-disable-next-line no-empty - } catch (e) {} + } catch (_e) {} } } diff --git a/packages/beacon-node/src/network/peers/discover.ts b/packages/beacon-node/src/network/peers/discover.ts index 79603f780e3d..9e06a39b4fb4 100644 --- a/packages/beacon-node/src/network/peers/discover.ts +++ b/packages/beacon-node/src/network/peers/discover.ts @@ -304,7 +304,6 @@ export class PeerDiscovery { const {id, multiaddrs} = evt.detail; // libp2p may send us PeerInfos without multiaddrs https://github.com/libp2p/js-libp2p/issues/1873 - // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (!multiaddrs || multiaddrs.length === 0) { this.metrics?.discovery.discoveredStatus.inc({status: DiscoveredPeerStatus.no_multiaddrs}); return; diff --git a/packages/beacon-node/src/network/peers/peerManager.ts b/packages/beacon-node/src/network/peers/peerManager.ts index 43fbee723f0e..3971e2147707 100644 --- a/packages/beacon-node/src/network/peers/peerManager.ts +++ b/packages/beacon-node/src/network/peers/peerManager.ts @@ -383,7 +383,7 @@ export class PeerManager { private async requestMetadata(peer: PeerId): Promise { try { this.onMetadata(peer, await this.reqResp.sendMetadata(peer)); - } catch (e) { + } catch (_e) { // TODO: Downvote peer here or in the reqResp layer } } @@ -395,7 +395,7 @@ export class PeerManager { // If peer replies a PING request also update lastReceivedMsg const peerData = this.connectedPeers.get(peer.toString()); if (peerData) peerData.lastReceivedMsgUnixTsMs = Date.now(); - } catch (e) { + } catch (_e) { // TODO: Downvote peer here or in the reqResp layer } } @@ -403,7 +403,7 @@ export class PeerManager { private async requestStatus(peer: PeerId, localStatus: phase0.Status): Promise { try { this.onStatus(peer, await this.reqResp.sendStatus(peer, localStatus)); - } catch (e) { + } catch (_e) { // TODO: Failed to get peer latest status: downvote but don't disconnect } } @@ -423,7 +423,7 @@ export class PeerManager { * NOTE: Discovery should only add a new query if one isn't already queued. */ private heartbeat(): void { - // timer is safe without a try {} catch {}, in case of error the metric won't register and timer is GC'ed + // timer is safe without a try {} catch (_e) {}, in case of error the metric won't register and timer is GC'ed const timer = this.metrics?.peerManager.heartbeatDuration.startTimer(); const connectedPeers = this.getConnectedPeerIds(); diff --git a/packages/beacon-node/src/network/processor/gossipHandlers.ts b/packages/beacon-node/src/network/processor/gossipHandlers.ts index 90c131a943ed..dab3af0df8ba 100644 --- a/packages/beacon-node/src/network/processor/gossipHandlers.ts +++ b/packages/beacon-node/src/network/processor/gossipHandlers.ts @@ -680,7 +680,6 @@ export async function validateGossipFnRetryUnknownRoot( blockRoot: Root ): Promise { let unknownBlockRootRetries = 0; - // eslint-disable-next-line no-constant-condition while (true) { try { return await fn(); diff --git a/packages/beacon-node/src/network/processor/index.ts b/packages/beacon-node/src/network/processor/index.ts index 5cfed6c20346..ec0edf54644f 100644 --- a/packages/beacon-node/src/network/processor/index.ts +++ b/packages/beacon-node/src/network/processor/index.ts @@ -396,7 +396,9 @@ export class NetworkProcessor { if (item) { this.gossipTopicConcurrency[topic] += numMessages; this.processPendingGossipsubMessage(item) - .finally(() => (this.gossipTopicConcurrency[topic] -= numMessages)) + .finally(() => { + this.gossipTopicConcurrency[topic] -= numMessages; + }) .catch((e) => this.logger.error("processGossipAttestations must not throw", {}, e)); jobsSubmitted += numMessages; diff --git a/packages/beacon-node/src/network/reqresp/beaconBlocksMaybeBlobsByRange.ts b/packages/beacon-node/src/network/reqresp/beaconBlocksMaybeBlobsByRange.ts index 4dae4831d716..74b6d8f13b2e 100644 --- a/packages/beacon-node/src/network/reqresp/beaconBlocksMaybeBlobsByRange.ts +++ b/packages/beacon-node/src/network/reqresp/beaconBlocksMaybeBlobsByRange.ts @@ -80,6 +80,7 @@ export function matchBlockWithBlobs( let blobSidecar: deneb.BlobSidecar; while ( + // biome-ignore lint/suspicious/noAssignInExpressions: (blobSidecar = allBlobSidecars[blobSideCarIndex])?.signedBlockHeader.message.slot === block.data.message.slot ) { blobSidecars.push(blobSidecar); diff --git a/packages/beacon-node/src/network/reqresp/protocols.ts b/packages/beacon-node/src/network/reqresp/protocols.ts index a0fa9576c93c..e63df4b1341b 100644 --- a/packages/beacon-node/src/network/reqresp/protocols.ts +++ b/packages/beacon-node/src/network/reqresp/protocols.ts @@ -3,8 +3,6 @@ import {ForkDigestContext} from "@lodestar/config"; import {ProtocolNoHandler, ReqRespMethod, Version, requestSszTypeByMethod, responseSszTypeByMethod} from "./types.js"; import {rateLimitQuotas} from "./rateLimit.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - export const Goodbye = toProtocol({ method: ReqRespMethod.Goodbye, version: Version.V1, diff --git a/packages/beacon-node/src/network/reqresp/rateLimit.ts b/packages/beacon-node/src/network/reqresp/rateLimit.ts index 881ab36bc05d..b6dacd6ba8e5 100644 --- a/packages/beacon-node/src/network/reqresp/rateLimit.ts +++ b/packages/beacon-node/src/network/reqresp/rateLimit.ts @@ -76,7 +76,7 @@ function getRequestCountFn( return (reqData: Uint8Array) => { try { return (type && fn(type.deserialize(reqData))) ?? 1; - } catch (e) { + } catch (_e) { return 1; } }; diff --git a/packages/beacon-node/src/network/reqresp/score.ts b/packages/beacon-node/src/network/reqresp/score.ts index c74b645c9909..647481162c78 100644 --- a/packages/beacon-node/src/network/reqresp/score.ts +++ b/packages/beacon-node/src/network/reqresp/score.ts @@ -8,7 +8,6 @@ import {ReqRespMethod} from "./types.js"; * https://github.com/libp2p/js-libp2p/blob/6350a187c7c207086e42436ccbcabd59af6f5e3d/src/errors.js#L32 */ const libp2pErrorCodes = { - // eslint-disable-next-line @typescript-eslint/naming-convention ERR_UNSUPPORTED_PROTOCOL: "ERR_UNSUPPORTED_PROTOCOL", }; diff --git a/packages/beacon-node/src/network/util.ts b/packages/beacon-node/src/network/util.ts index dd317b5a0427..835096afbfc8 100644 --- a/packages/beacon-node/src/network/util.ts +++ b/packages/beacon-node/src/network/util.ts @@ -15,7 +15,6 @@ export function prettyPrintPeerIdStr(id: PeerIdStr): string { */ // Compat function for efficiency reasons export function getConnectionsMap(libp2p: Libp2p): Map { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return return libp2p.services.components.connectionManager.getConnectionsMap()["map"]; } diff --git a/packages/beacon-node/src/sync/backfill/backfill.ts b/packages/beacon-node/src/sync/backfill/backfill.ts index 77d2836bdcc3..f60e28a19e1d 100644 --- a/packages/beacon-node/src/sync/backfill/backfill.ts +++ b/packages/beacon-node/src/sync/backfill/backfill.ts @@ -1,4 +1,4 @@ -import {EventEmitter} from "events"; +import {EventEmitter} from "node:events"; import {StrictEventEmitter} from "strict-event-emitter-types"; import {BeaconStateAllForks, blockToHeader, computeAnchorCheckpoint} from "@lodestar/state-transition"; import {BeaconConfig, ChainForkConfig} from "@lodestar/config"; @@ -13,7 +13,7 @@ import {INetwork, NetworkEvent, NetworkEventData, PeerAction} from "../../networ import {ItTrigger} from "../../util/itTrigger.js"; import {PeerIdStr} from "../../util/peerId.js"; import {shuffleOne} from "../../util/shuffle.js"; -import {Metrics} from "../../metrics/metrics"; +import {Metrics} from "../../metrics/metrics.js"; import {byteArrayEquals} from "../../util/bytes.js"; import {verifyBlockProposerSignature, verifyBlockSequence, BackfillBlockHeader, BackfillBlock} from "./verify.js"; import {BackfillSyncError, BackfillSyncErrorCode} from "./errors.js"; @@ -680,6 +680,7 @@ export class BackfillSync extends (EventEmitter as {new (): BackfillSyncEmitter} let isPrevFinWsConfirmedAnchorParent = false; while ( backCount !== this.opts.backfillBatchSize && + // biome-ignore lint/suspicious/noAssignInExpressions: (parentBlock = await this.db.blockArchive.getByRoot(anchorBlock.message.parentRoot)) ) { // Before moving anchorBlock back, we need check for prevFinalizedCheckpointBlock diff --git a/packages/beacon-node/src/sync/range/range.ts b/packages/beacon-node/src/sync/range/range.ts index 887a86a3aaf2..efdf84cf7af1 100644 --- a/packages/beacon-node/src/sync/range/range.ts +++ b/packages/beacon-node/src/sync/range/range.ts @@ -1,4 +1,4 @@ -import {EventEmitter} from "events"; +import {EventEmitter} from "node:events"; import {StrictEventEmitter} from "strict-event-emitter-types"; import {computeStartSlotAtEpoch} from "@lodestar/state-transition"; import {BeaconConfig} from "@lodestar/config"; diff --git a/packages/beacon-node/src/util/asyncIterableToEvents.ts b/packages/beacon-node/src/util/asyncIterableToEvents.ts index 0468ca2b431b..836983d8e4f0 100644 --- a/packages/beacon-node/src/util/asyncIterableToEvents.ts +++ b/packages/beacon-node/src/util/asyncIterableToEvents.ts @@ -46,7 +46,6 @@ export class AsyncIterableBridgeCaller { } getAsyncIterable(callArgs: Args): AsyncIterable { - // eslint-disable-next-line @typescript-eslint/no-this-alias const self = this; return { @@ -67,7 +66,6 @@ export class AsyncIterableBridgeCaller { return { async next() { - // eslint-disable-next-line no-constant-condition while (true) { const item = req.items.shift(); if (item !== null) { diff --git a/packages/beacon-node/src/util/kzg.ts b/packages/beacon-node/src/util/kzg.ts index e20a379d62ff..efc6dd34ee1c 100644 --- a/packages/beacon-node/src/util/kzg.ts +++ b/packages/beacon-node/src/util/kzg.ts @@ -3,8 +3,6 @@ import fs from "node:fs"; import {fileURLToPath} from "node:url"; import {fromHex, toHex} from "@lodestar/utils"; -/* eslint-disable @typescript-eslint/naming-convention */ - // "c-kzg" has hardcoded the mainnet value, do not use params export const FIELD_ELEMENTS_PER_BLOB_MAINNET = 4096; @@ -87,7 +85,6 @@ export function loadEthereumTrustedSetup(mode: TrustedFileMode = TrustedFileMode } } -/* eslint-disable @typescript-eslint/naming-convention */ export interface TrustedSetupJSON { setup_G1: string[]; setup_G2: string[]; diff --git a/packages/beacon-node/src/util/map.ts b/packages/beacon-node/src/util/map.ts index 6cc8f37155b1..1b8fc6222032 100644 --- a/packages/beacon-node/src/util/map.ts +++ b/packages/beacon-node/src/util/map.ts @@ -43,7 +43,6 @@ export class OrderedMap { } values(): IterableIterator { - // eslint-disable-next-line @typescript-eslint/no-this-alias const _self = this; return (function* generateValues() { for (const key of _self.keys()) { diff --git a/packages/beacon-node/src/util/profile.ts b/packages/beacon-node/src/util/profile.ts index 7085c329c823..ccb5b098be31 100644 --- a/packages/beacon-node/src/util/profile.ts +++ b/packages/beacon-node/src/util/profile.ts @@ -37,7 +37,7 @@ export async function profileNodeJS(durationMs: number): Promise { export async function writeHeapSnapshot(prefix: string, dirpath: string): Promise { // Lazily import NodeJS only modules const fs = await import("node:fs"); - const v8 = await import("v8"); + const v8 = await import("node:v8"); const snapshotStream = v8.getHeapSnapshot(); const filepath = `${dirpath}/${prefix}_${new Date().toISOString()}.heapsnapshot`; const fileStream = fs.createWriteStream(filepath); diff --git a/packages/beacon-node/src/util/queue/errors.ts b/packages/beacon-node/src/util/queue/errors.ts index edb0b3b87374..7117b5629372 100644 --- a/packages/beacon-node/src/util/queue/errors.ts +++ b/packages/beacon-node/src/util/queue/errors.ts @@ -7,11 +7,7 @@ export enum QueueErrorCode { export type QueueErrorCodeType = {code: QueueErrorCode.QUEUE_ABORTED} | {code: QueueErrorCode.QUEUE_MAX_LENGTH}; -export class QueueError extends LodestarError { - constructor(type: QueueErrorCodeType) { - super(type); - } -} +export class QueueError extends LodestarError {} export function isQueueErrorAborted(e: unknown): e is QueueError { return e instanceof QueueError && e.type.code === QueueErrorCode.QUEUE_ABORTED; diff --git a/packages/beacon-node/src/util/queue/fnQueue.ts b/packages/beacon-node/src/util/queue/fnQueue.ts index ec3267bdf93a..80e179f8e8f3 100644 --- a/packages/beacon-node/src/util/queue/fnQueue.ts +++ b/packages/beacon-node/src/util/queue/fnQueue.ts @@ -1,10 +1,10 @@ import {JobItemQueue} from "./itemQueue.js"; import {QueueMetrics, JobQueueOpts} from "./options.js"; -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: type Fn = (...args: any) => Promise; -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: export class JobFnQueue extends JobItemQueue<[Fn], any> { constructor(opts: JobQueueOpts, metrics?: QueueMetrics) { super((fn) => fn(), opts, metrics); diff --git a/packages/beacon-node/src/util/queue/itemQueue.ts b/packages/beacon-node/src/util/queue/itemQueue.ts index 7da7b6cdd8cb..f380a15f5eaf 100644 --- a/packages/beacon-node/src/util/queue/itemQueue.ts +++ b/packages/beacon-node/src/util/queue/itemQueue.ts @@ -7,7 +7,8 @@ import {defaultQueueOpts, QueueMetrics, JobQueueOpts, QueueType} from "./options * JobQueue that stores arguments in the job array instead of closures. * Supports a single itemProcessor, for arbitrary functions use the JobFnQueue */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any + +// biome-ignore lint/suspicious/noExplicitAny: export class JobItemQueue { private readonly opts: Required; /** diff --git a/packages/beacon-node/test/e2e/api/impl/beacon/node/endpoints.test.ts b/packages/beacon-node/test/e2e/api/impl/beacon/node/endpoints.test.ts index 2d2a0a37c59e..0789932e61e4 100644 --- a/packages/beacon-node/test/e2e/api/impl/beacon/node/endpoints.test.ts +++ b/packages/beacon-node/test/e2e/api/impl/beacon/node/endpoints.test.ts @@ -67,9 +67,7 @@ describe("beacon node api", function () { const bnElOffline = await getDevBeaconNode({ params: { ...chainConfigDef, - // eslint-disable-next-line @typescript-eslint/naming-convention ALTAIR_FORK_EPOCH: 0, - // eslint-disable-next-line @typescript-eslint/naming-convention BELLATRIX_FORK_EPOCH: 0, }, options: { diff --git a/packages/beacon-node/test/e2e/api/impl/lightclient/endpoint.test.ts b/packages/beacon-node/test/e2e/api/impl/lightclient/endpoint.test.ts index c746746741cf..8f05ae41c468 100644 --- a/packages/beacon-node/test/e2e/api/impl/lightclient/endpoint.test.ts +++ b/packages/beacon-node/test/e2e/api/impl/lightclient/endpoint.test.ts @@ -13,7 +13,6 @@ import {getAndInitDevValidators} from "../../../../utils/node/validator.js"; import {BeaconNode} from "../../../../../src/node/nodejs.js"; import {waitForEvent} from "../../../../utils/events/resolver.js"; -/* eslint-disable @typescript-eslint/naming-convention */ describe("lightclient api", function () { const SECONDS_PER_SLOT = 1; const ALTAIR_FORK_EPOCH = 0; diff --git a/packages/beacon-node/test/e2e/api/lodestar/lodestar.test.ts b/packages/beacon-node/test/e2e/api/lodestar/lodestar.test.ts index 5cccb2aa0772..d505e38b3f9a 100644 --- a/packages/beacon-node/test/e2e/api/lodestar/lodestar.test.ts +++ b/packages/beacon-node/test/e2e/api/lodestar/lodestar.test.ts @@ -20,7 +20,6 @@ describe("api / impl / validator", function () { const validatorCount = 8; const restPort = 9596; const testParams: Pick = { - /* eslint-disable @typescript-eslint/naming-convention */ SECONDS_PER_SLOT: SECONDS_PER_SLOT, ALTAIR_FORK_EPOCH: ALTAIR_FORK_EPOCH, }; diff --git a/packages/beacon-node/test/e2e/chain/lightclient.test.ts b/packages/beacon-node/test/e2e/chain/lightclient.test.ts index c501a2618049..5e7b7f36fff2 100644 --- a/packages/beacon-node/test/e2e/chain/lightclient.test.ts +++ b/packages/beacon-node/test/e2e/chain/lightclient.test.ts @@ -34,7 +34,6 @@ describe("chain / lightclient", function () { const restPort = 9000; const testParams: Pick = { - /* eslint-disable @typescript-eslint/naming-convention */ SECONDS_PER_SLOT: 1, ALTAIR_FORK_EPOCH: 0, }; diff --git a/packages/beacon-node/test/e2e/chain/proposerBoostReorg.test.ts b/packages/beacon-node/test/e2e/chain/proposerBoostReorg.test.ts index 594e20ec4cb0..ad32e2d5b270 100644 --- a/packages/beacon-node/test/e2e/chain/proposerBoostReorg.test.ts +++ b/packages/beacon-node/test/e2e/chain/proposerBoostReorg.test.ts @@ -17,13 +17,10 @@ describe("proposer boost reorg", function () { const validatorCount = 8; const testParams: Pick = { - // eslint-disable-next-line @typescript-eslint/naming-convention SECONDS_PER_SLOT: 2, // need this to make block `reorgSlot - 1` strong enough - // eslint-disable-next-line @typescript-eslint/naming-convention REORG_PARENT_WEIGHT_THRESHOLD: 80, // need this to make block `reorgSlot + 1` to become the head - // eslint-disable-next-line @typescript-eslint/naming-convention PROPOSER_SCORE_BOOST: 120, }; diff --git a/packages/beacon-node/test/e2e/chain/stateCache/nHistoricalStates.test.ts b/packages/beacon-node/test/e2e/chain/stateCache/nHistoricalStates.test.ts index fd14b7b8b8c0..b6c5c30dace4 100644 --- a/packages/beacon-node/test/e2e/chain/stateCache/nHistoricalStates.test.ts +++ b/packages/beacon-node/test/e2e/chain/stateCache/nHistoricalStates.test.ts @@ -24,7 +24,6 @@ describe("regen/reload states with n-historical states configuration", function const validatorCount = 8; const testParams: Pick = { - // eslint-disable-next-line @typescript-eslint/naming-convention SECONDS_PER_SLOT: 2, }; diff --git a/packages/beacon-node/test/e2e/doppelganger/doppelganger.test.ts b/packages/beacon-node/test/e2e/doppelganger/doppelganger.test.ts index ab9061f1eacd..bdfcbde056cd 100644 --- a/packages/beacon-node/test/e2e/doppelganger/doppelganger.test.ts +++ b/packages/beacon-node/test/e2e/doppelganger/doppelganger.test.ts @@ -34,7 +34,6 @@ describe.skip("doppelganger / doppelganger test", function () { const validatorCount = 1; const genesisSlotsDelay = 5; const beaconParams: Pick = { - // eslint-disable-next-line @typescript-eslint/naming-convention SECONDS_PER_SLOT: 2, }; @@ -123,7 +122,7 @@ describe.skip("doppelganger / doppelganger test", function () { doppelgangerProtection: true, }); - const {beaconNode: bn2, validators: validators} = await createBNAndVC({ + const {beaconNode: bn2, validators} = await createBNAndVC({ genesisTime: bn.chain.getHeadState().genesisTime, }); @@ -202,7 +201,7 @@ describe.skip("doppelganger / doppelganger test", function () { doppelgangerProtection, }); - const {beaconNode: bn2, validators: validators} = await createBNAndVC({ + const {beaconNode: bn2, validators} = await createBNAndVC({ genesisTime: bn.chain.getHeadState().genesisTime, doppelgangerProtection: false, }); diff --git a/packages/beacon-node/test/e2e/eth1/eth1ForBlockProduction.test.ts b/packages/beacon-node/test/e2e/eth1/eth1ForBlockProduction.test.ts index 17692cfcca3a..837a765d1710 100644 --- a/packages/beacon-node/test/e2e/eth1/eth1ForBlockProduction.test.ts +++ b/packages/beacon-node/test/e2e/eth1/eth1ForBlockProduction.test.ts @@ -68,7 +68,6 @@ describe.skip("eth1 / Eth1Provider", function () { // Resolves when Eth1ForBlockProduction has fetched both blocks and deposits const {eth1Datas, deposits} = await (async function resolveWithEth1DataAndDeposits() { - // eslint-disable-next-line no-constant-condition while (true) { const eth1Datas = await db.eth1Data.entries(); const deposits = await db.depositEvent.values(); diff --git a/packages/beacon-node/test/e2e/eth1/eth1MergeBlockTracker.test.ts b/packages/beacon-node/test/e2e/eth1/eth1MergeBlockTracker.test.ts index ae3e0c707542..034493482c21 100644 --- a/packages/beacon-node/test/e2e/eth1/eth1MergeBlockTracker.test.ts +++ b/packages/beacon-node/test/e2e/eth1/eth1MergeBlockTracker.test.ts @@ -10,8 +10,6 @@ import {quantityToBigint} from "../../../src/eth1/provider/utils.js"; import {ZERO_HASH} from "../../../src/constants/index.js"; import {getGoerliRpcUrl} from "../../testParams.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - // This test is constantly failing. We must unblock PR so this issue is a TODO to debug it and re-enable latter. // It's OKAY to disable temporarily since this functionality is tested indirectly by the sim merge tests. // See https://github.com/ChainSafe/lodestar/issues/4197 diff --git a/packages/beacon-node/test/e2e/eth1/jsonRpcHttpClient.test.ts b/packages/beacon-node/test/e2e/eth1/jsonRpcHttpClient.test.ts index 4e290c6d6318..fac0e3810b6d 100644 --- a/packages/beacon-node/test/e2e/eth1/jsonRpcHttpClient.test.ts +++ b/packages/beacon-node/test/e2e/eth1/jsonRpcHttpClient.test.ts @@ -174,7 +174,6 @@ describe("eth1 / jsonRpcHttpClient - with retries", function () { const afterHook = afterHooks.pop(); if (afterHook) await afterHook().catch((e: Error) => { - // eslint-disable-next-line no-console console.error("Error in afterEach hook", e); }); } diff --git a/packages/beacon-node/test/e2e/interop/genesisState.test.ts b/packages/beacon-node/test/e2e/interop/genesisState.test.ts index 2287c6a1deb8..739319a4257c 100644 --- a/packages/beacon-node/test/e2e/interop/genesisState.test.ts +++ b/packages/beacon-node/test/e2e/interop/genesisState.test.ts @@ -9,7 +9,6 @@ describe("interop / initDevState", () => { it("Create interop deposits", () => { const deposits = interopDeposits(config, ssz.phase0.DepositDataRootList.defaultViewDU(), 1); - /* eslint-disable @typescript-eslint/naming-convention */ expect(deposits.map((deposit) => ssz.phase0.Deposit.toJson(deposit))).toEqual([ { proof: [ diff --git a/packages/beacon-node/test/e2e/network/gossipsub.test.ts b/packages/beacon-node/test/e2e/network/gossipsub.test.ts index c19f3c7c4388..3d8b1e07bbd7 100644 --- a/packages/beacon-node/test/e2e/network/gossipsub.test.ts +++ b/packages/beacon-node/test/e2e/network/gossipsub.test.ts @@ -35,7 +35,6 @@ function runTests({useWorker}: {useWorker: boolean}): void { }); // Schedule all forks at ALTAIR_FORK_EPOCH to avoid generating the pubkeys cache - /* eslint-disable @typescript-eslint/naming-convention */ const config = createChainForkConfig({ ...defaultChainConfig, ALTAIR_FORK_EPOCH: 1, @@ -44,7 +43,6 @@ function runTests({useWorker}: {useWorker: boolean}): void { }); const START_SLOT = computeStartSlotAtEpoch(config.ALTAIR_FORK_EPOCH); - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type async function mockModules(gossipHandlersPartial?: Partial) { const [netA, closeA] = await getNetworkForTest(`gossipsub-${useWorker ? "worker" : "main"}-A`, config, { opts: {useWorker}, @@ -65,7 +63,9 @@ function runTests({useWorker}: {useWorker: boolean}): void { it("Publish and receive a voluntaryExit", async function () { let onVoluntaryExit: (ve: Uint8Array) => void; - const onVoluntaryExitPromise = new Promise((resolve) => (onVoluntaryExit = resolve)); + const onVoluntaryExitPromise = new Promise((resolve) => { + onVoluntaryExit = resolve; + }); const {netA, netB} = await mockModules({ [GossipType.voluntary_exit]: async ({gossipData}: GossipHandlerParamGeneric) => { @@ -100,7 +100,9 @@ function runTests({useWorker}: {useWorker: boolean}): void { it("Publish and receive a blsToExecutionChange", async function () { let onBlsToExecutionChange: (blsToExec: Uint8Array) => void; - const onBlsToExecutionChangePromise = new Promise((resolve) => (onBlsToExecutionChange = resolve)); + const onBlsToExecutionChangePromise = new Promise((resolve) => { + onBlsToExecutionChange = resolve; + }); const {netA, netB} = await mockModules({ [GossipType.bls_to_execution_change]: async ({ @@ -136,7 +138,9 @@ function runTests({useWorker}: {useWorker: boolean}): void { it("Publish and receive an attesterSlashing", async function () { let onAttesterSlashingChange: (payload: Uint8Array) => void; - const onAttesterSlashingChangePromise = new Promise((resolve) => (onAttesterSlashingChange = resolve)); + const onAttesterSlashingChangePromise = new Promise((resolve) => { + onAttesterSlashingChange = resolve; + }); const {netA, netB} = await mockModules({ [GossipType.attester_slashing]: async ({gossipData}: GossipHandlerParamGeneric) => { @@ -168,7 +172,9 @@ function runTests({useWorker}: {useWorker: boolean}): void { it("Publish and receive a proposerSlashing", async function () { let onProposerSlashingChange: (payload: Uint8Array) => void; - const onProposerSlashingChangePromise = new Promise((resolve) => (onProposerSlashingChange = resolve)); + const onProposerSlashingChangePromise = new Promise((resolve) => { + onProposerSlashingChange = resolve; + }); const {netA, netB} = await mockModules({ [GossipType.proposer_slashing]: async ({gossipData}: GossipHandlerParamGeneric) => { @@ -200,9 +206,9 @@ function runTests({useWorker}: {useWorker: boolean}): void { it("Publish and receive a LightClientOptimisticUpdate", async function () { let onLightClientOptimisticUpdate: (ou: Uint8Array) => void; - const onLightClientOptimisticUpdatePromise = new Promise( - (resolve) => (onLightClientOptimisticUpdate = resolve) - ); + const onLightClientOptimisticUpdatePromise = new Promise((resolve) => { + onLightClientOptimisticUpdate = resolve; + }); const {netA, netB} = await mockModules({ [GossipType.light_client_optimistic_update]: async ({ @@ -239,9 +245,9 @@ function runTests({useWorker}: {useWorker: boolean}): void { it("Publish and receive a LightClientFinalityUpdate", async function () { let onLightClientFinalityUpdate: (fu: Uint8Array) => void; - const onLightClientFinalityUpdatePromise = new Promise( - (resolve) => (onLightClientFinalityUpdate = resolve) - ); + const onLightClientFinalityUpdatePromise = new Promise((resolve) => { + onLightClientFinalityUpdate = resolve; + }); const {netA, netB} = await mockModules({ [GossipType.light_client_finality_update]: async ({ diff --git a/packages/beacon-node/test/e2e/network/mdns.test.ts b/packages/beacon-node/test/e2e/network/mdns.test.ts index d8e148e191fe..4c49ca319a42 100644 --- a/packages/beacon-node/test/e2e/network/mdns.test.ts +++ b/packages/beacon-node/test/e2e/network/mdns.test.ts @@ -68,7 +68,6 @@ describe.skip("mdns", function () { return {block, state, config: beaconConfig}; }); - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type async function createTestNode(nodeName: string) { const {config} = getStaticData(); const chain = getMockedBeaconChain(); @@ -111,7 +110,6 @@ describe.skip("mdns", function () { return {network, chain}; } - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type async function createTestNodesAB() { return Promise.all([createTestNode("mdns-A"), createTestNode("mdns-B")]); } diff --git a/packages/beacon-node/test/e2e/network/network.test.ts b/packages/beacon-node/test/e2e/network/network.test.ts index 094a75280e8b..a1c1546ef4fc 100644 --- a/packages/beacon-node/test/e2e/network/network.test.ts +++ b/packages/beacon-node/test/e2e/network/network.test.ts @@ -38,7 +38,6 @@ function runTests({useWorker}: {useWorker: boolean}): void { }); afterEach(() => controller.abort()); - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type async function createTestNode(nodeName: string) { const [network, closeAll] = await getNetworkForTest(nodeName, config, {opts: {useWorker}}); diff --git a/packages/beacon-node/test/e2e/network/peers/peerManager.test.ts b/packages/beacon-node/test/e2e/network/peers/peerManager.test.ts index 795a4bf67ecc..b690b9ab4988 100644 --- a/packages/beacon-node/test/e2e/network/peers/peerManager.test.ts +++ b/packages/beacon-node/test/e2e/network/peers/peerManager.test.ts @@ -33,7 +33,6 @@ describe("network / peers / PeerManager", function () { } }); - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type async function mockModules() { // Setup fake chain const block = ssz.phase0.SignedBeaconBlock.defaultValue(); diff --git a/packages/beacon-node/test/e2e/network/reqrespEncode.test.ts b/packages/beacon-node/test/e2e/network/reqrespEncode.test.ts index d96f405eae7c..d8d02c203dd9 100644 --- a/packages/beacon-node/test/e2e/network/reqrespEncode.test.ts +++ b/packages/beacon-node/test/e2e/network/reqrespEncode.test.ts @@ -35,7 +35,6 @@ describe("reqresp encoder", () => { } }); - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type async function getLibp2p() { const listen = `/ip4/127.0.0.1/tcp/${port++}`; const libp2p = await createLibp2p({ @@ -50,7 +49,6 @@ describe("reqresp encoder", () => { return {libp2p, multiaddr: multiaddr(`${listen}/p2p/${libp2p.peerId.toString()}`)}; } - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type async function getReqResp(getHandler?: GetReqRespHandlerFn) { const {libp2p, multiaddr} = await getLibp2p(); @@ -76,7 +74,6 @@ describe("reqresp encoder", () => { return {libp2p, multiaddr, reqresp: new ReqRespBeaconNode(modules)}; } - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type async function dialProtocol({ dialer, toMultiaddr, diff --git a/packages/beacon-node/test/e2e/sync/finalizedSync.test.ts b/packages/beacon-node/test/e2e/sync/finalizedSync.test.ts index 01293285d756..ed19617f0822 100644 --- a/packages/beacon-node/test/e2e/sync/finalizedSync.test.ts +++ b/packages/beacon-node/test/e2e/sync/finalizedSync.test.ts @@ -20,7 +20,6 @@ describe("sync / finalized sync", function () { const validatorCount = 8; const testParams: Pick = { - // eslint-disable-next-line @typescript-eslint/naming-convention SECONDS_PER_SLOT: 2, }; @@ -114,7 +113,7 @@ describe("sync / finalized sync", function () { try { await waitForSynced; loggerNodeB.info("Node B synced to Node A, received head block", {slot: head.message.slot}); - } catch (e) { + } catch (_e) { assert.fail("Failed to sync to other node in time"); } }); diff --git a/packages/beacon-node/test/e2e/sync/unknownBlockSync.test.ts b/packages/beacon-node/test/e2e/sync/unknownBlockSync.test.ts index 31f640269db7..7d31d25a07d3 100644 --- a/packages/beacon-node/test/e2e/sync/unknownBlockSync.test.ts +++ b/packages/beacon-node/test/e2e/sync/unknownBlockSync.test.ts @@ -22,7 +22,6 @@ describe("sync / unknown block sync", function () { const validatorCount = 8; const testParams: Pick = { - // eslint-disable-next-line @typescript-eslint/naming-convention SECONDS_PER_SLOT: 2, }; diff --git a/packages/beacon-node/test/globalSetup.ts b/packages/beacon-node/test/globalSetup.ts index 8194c76662df..f41a7f249b9b 100644 --- a/packages/beacon-node/test/globalSetup.ts +++ b/packages/beacon-node/test/globalSetup.ts @@ -11,7 +11,6 @@ export async function setup(): Promise { // Override FIELD_ELEMENTS_PER_BLOB if its a dev run, mostly to distinguish from // spec runs if (process.env.LODESTAR_PRESET === "minimal" && process.env.DEV_RUN) { - // eslint-disable-next-line @typescript-eslint/naming-convention setActivePreset(PresetName.minimal, {FIELD_ELEMENTS_PER_BLOB: 4096}); } } diff --git a/packages/beacon-node/test/memory/bytesHex.ts b/packages/beacon-node/test/memory/bytesHex.ts index 44115d345b2c..c7429869dac7 100644 --- a/packages/beacon-node/test/memory/bytesHex.ts +++ b/packages/beacon-node/test/memory/bytesHex.ts @@ -45,7 +45,6 @@ function testRunnerMemoryBpi(testCases: {getInstance: (bytes: number) => unknown convergeFactor: 0.2 / 100, }); - // eslint-disable-next-line no-console console.log(`${id.padEnd(longestId)} - ${bpi.toFixed(1)} bytes / instance`); } } diff --git a/packages/beacon-node/test/memory/pubkeysToIndex.ts b/packages/beacon-node/test/memory/pubkeysToIndex.ts index b647d153dba2..32cdf6e82296 100644 --- a/packages/beacon-node/test/memory/pubkeysToIndex.ts +++ b/packages/beacon-node/test/memory/pubkeysToIndex.ts @@ -52,7 +52,6 @@ function testRunnerMemoryBpi(testCases: {getInstance: (bytes: number) => unknown sampleEvery: 5, }); - // eslint-disable-next-line no-console console.log(`${id.padEnd(longestId)} - ${bpi.toFixed(1)} bytes / instance`); } } diff --git a/packages/beacon-node/test/memory/seenAttestationData.ts b/packages/beacon-node/test/memory/seenAttestationData.ts index c6735bd861e9..44a82dcd5841 100644 --- a/packages/beacon-node/test/memory/seenAttestationData.ts +++ b/packages/beacon-node/test/memory/seenAttestationData.ts @@ -53,7 +53,6 @@ function testRunnerMemoryBpi(testCases: {getInstance: (bytes: number) => unknown sampleEvery: 5, }); - // eslint-disable-next-line no-console console.log(`${id.padEnd(longestId)} - ${bpi.toFixed(1)} bytes / instance`); } } diff --git a/packages/beacon-node/test/memory/testRunnerMemory.ts b/packages/beacon-node/test/memory/testRunnerMemory.ts index a5c4df9e5794..05e7c8afab01 100644 --- a/packages/beacon-node/test/memory/testRunnerMemory.ts +++ b/packages/beacon-node/test/memory/testRunnerMemory.ts @@ -57,7 +57,6 @@ export async function testRunnerMemoryGc(opts: TestRunnerMemoryOpts): Prom usedMemoryArr.push(totalUsedMemoryDiff); const usedMemoryReg = linearRegression(xs, usedMemoryArr); - // eslint-disable-next-line no-console console.log("totalUsedMemoryDiff", totalUsedMemoryDiff, usedMemoryReg); } } @@ -137,7 +136,6 @@ export function testRunnerMemory(opts: TestRunnerMemoryOpts): number { } if (logEachSample) { - // eslint-disable-next-line no-console console.log(i, memoryUsage.rss / maxRssBytes, {m}); } diff --git a/packages/beacon-node/test/memory/unfinalizedPubkey2Index.ts b/packages/beacon-node/test/memory/unfinalizedPubkey2Index.ts index b37967d16ca4..247f8a4ea95a 100644 --- a/packages/beacon-node/test/memory/unfinalizedPubkey2Index.ts +++ b/packages/beacon-node/test/memory/unfinalizedPubkey2Index.ts @@ -48,7 +48,6 @@ function testRunnerMemoryBpi(testCases: {getInstance: (bytes: number) => unknown sampleEvery: 5, }); - // eslint-disable-next-line no-console console.log(`${id.padEnd(longestId)} - ${bpi.toFixed(1)} bytes / instance`); } } diff --git a/packages/beacon-node/test/mocks/beaconSyncMock.ts b/packages/beacon-node/test/mocks/beaconSyncMock.ts index 00ef193fdf6e..4d9f11ba90fd 100644 --- a/packages/beacon-node/test/mocks/beaconSyncMock.ts +++ b/packages/beacon-node/test/mocks/beaconSyncMock.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {Mocked, vi} from "vitest"; import {BeaconSync} from "../../src/sync/index.js"; diff --git a/packages/beacon-node/test/mocks/mockedBeaconChain.ts b/packages/beacon-node/test/mocks/mockedBeaconChain.ts index 7a62e1a19630..a69efc55836c 100644 --- a/packages/beacon-node/test/mocks/mockedBeaconChain.ts +++ b/packages/beacon-node/test/mocks/mockedBeaconChain.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {vi, Mocked, Mock} from "vitest"; import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map"; import {config as defaultConfig} from "@lodestar/config/default"; @@ -121,12 +120,10 @@ vi.mock("../../src/chain/chain.js", async (importActual) => { getClientVersion: vi.fn(), }, executionBuilder: {}, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error eth1: new Eth1ForBlockProduction(), opPool: new OpPool(), aggregatedAttestationPool: new AggregatedAttestationPool(config), - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error beaconProposerCache: new BeaconProposerCache(), shufflingCache: new ShufflingCache(), @@ -173,7 +170,6 @@ export type MockedBeaconChainOptions = { export function getMockedBeaconChain(opts?: Partial): MockedBeaconChain { const {clock, genesisTime, config} = opts ?? {}; - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error return new BeaconChain({ clock: clock ?? "fake", diff --git a/packages/beacon-node/test/mocks/mockedBeaconDb.ts b/packages/beacon-node/test/mocks/mockedBeaconDb.ts index 8b99c85d2345..eb209c9b44fb 100644 --- a/packages/beacon-node/test/mocks/mockedBeaconDb.ts +++ b/packages/beacon-node/test/mocks/mockedBeaconDb.ts @@ -62,7 +62,6 @@ vi.mock("../../src/db/index.js", async (importActual) => { return { ...mod, - // eslint-disable-next-line @typescript-eslint/naming-convention BeaconDb: mockedBeaconDb, }; }); diff --git a/packages/beacon-node/test/mocks/mockedNetwork.ts b/packages/beacon-node/test/mocks/mockedNetwork.ts index ddf70aa1b5aa..9258acc9bc1b 100644 --- a/packages/beacon-node/test/mocks/mockedNetwork.ts +++ b/packages/beacon-node/test/mocks/mockedNetwork.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {vi, Mocked} from "vitest"; import {Network, INetwork} from "../../src/network/index.js"; diff --git a/packages/beacon-node/test/perf/api/impl/validator/attester.test.ts b/packages/beacon-node/test/perf/api/impl/validator/attester.test.ts index 803d6c84c408..807e29c55b52 100644 --- a/packages/beacon-node/test/perf/api/impl/validator/attester.test.ts +++ b/packages/beacon-node/test/perf/api/impl/validator/attester.test.ts @@ -1,5 +1,4 @@ import {itBench} from "@dapplion/benchmark"; -// eslint-disable-next-line import/no-relative-packages import {generatePerfTestCachedStatePhase0, numValidators} from "../../../../../../state-transition/test/perf/util.js"; import {getPubkeysForIndices} from "../../../../../src/api/impl/validator/utils.js"; import {linspace} from "../../../../../src/util/numpy.js"; diff --git a/packages/beacon-node/test/perf/chain/opPools/aggregatedAttestationPool.test.ts b/packages/beacon-node/test/perf/chain/opPools/aggregatedAttestationPool.test.ts index 45fc07281c3b..89bd76f34eb3 100644 --- a/packages/beacon-node/test/perf/chain/opPools/aggregatedAttestationPool.test.ts +++ b/packages/beacon-node/test/perf/chain/opPools/aggregatedAttestationPool.test.ts @@ -13,7 +13,6 @@ import {ExecutionStatus, ForkChoice, IForkChoiceStore, ProtoArray, DataAvailabil import {ssz} from "@lodestar/types"; import {createChainForkConfig, defaultChainConfig} from "@lodestar/config"; -// eslint-disable-next-line import/no-relative-packages import {generatePerfTestCachedStateAltair} from "../../../../../state-transition/test/perf/util.js"; import {AggregatedAttestationPool} from "../../../../src/chain/opPools/aggregatedAttestationPool.js"; diff --git a/packages/beacon-node/test/perf/chain/opPools/opPool.test.ts b/packages/beacon-node/test/perf/chain/opPools/opPool.test.ts index 6e420f0e1011..9d518c03eec9 100644 --- a/packages/beacon-node/test/perf/chain/opPools/opPool.test.ts +++ b/packages/beacon-node/test/perf/chain/opPools/opPool.test.ts @@ -7,7 +7,6 @@ import { } from "@lodestar/params"; import {CachedBeaconStateAltair} from "@lodestar/state-transition"; import {ssz} from "@lodestar/types"; -// eslint-disable-next-line import/no-relative-packages import {generatePerfTestCachedStateAltair} from "../../../../../state-transition/test/perf/util.js"; import {OpPool} from "../../../../src/chain/opPools/opPool.js"; import {generateBlsToExecutionChanges} from "../../../fixtures/capella.js"; diff --git a/packages/beacon-node/test/perf/chain/produceBlock/produceBlockBody.test.ts b/packages/beacon-node/test/perf/chain/produceBlock/produceBlockBody.test.ts index 7bf8c2f7252f..fdd6f60f5a47 100644 --- a/packages/beacon-node/test/perf/chain/produceBlock/produceBlockBody.test.ts +++ b/packages/beacon-node/test/perf/chain/produceBlock/produceBlockBody.test.ts @@ -5,7 +5,6 @@ import {LevelDbController} from "@lodestar/db"; import {SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY} from "@lodestar/params"; import {defaultOptions as defaultValidatorOptions} from "@lodestar/validator"; import {CachedBeaconStateAltair} from "@lodestar/state-transition"; -// eslint-disable-next-line import/no-relative-packages import {generatePerfTestCachedStateAltair} from "../../../../../state-transition/test/perf/util.js"; import {BeaconChain} from "../../../../src/chain/index.js"; import {BlockType, produceBlockBody} from "../../../../src/chain/produceBlock/produceBlockBody.js"; diff --git a/packages/beacon-node/test/perf/chain/validation/aggregateAndProof.test.ts b/packages/beacon-node/test/perf/chain/validation/aggregateAndProof.test.ts index 3fc7efe9d675..5e28a7c3b898 100644 --- a/packages/beacon-node/test/perf/chain/validation/aggregateAndProof.test.ts +++ b/packages/beacon-node/test/perf/chain/validation/aggregateAndProof.test.ts @@ -1,6 +1,5 @@ import {itBench} from "@dapplion/benchmark"; import {ssz} from "@lodestar/types"; -// eslint-disable-next-line import/no-relative-packages import {generateTestCachedBeaconStateOnlyValidators} from "../../../../../state-transition/test/perf/util.js"; import {validateApiAggregateAndProof, validateGossipAggregateAndProof} from "../../../../src/chain/validation/index.js"; import {getAggregateAndProofValidData} from "../../../utils/validationData/aggregateAndProof.js"; diff --git a/packages/beacon-node/test/perf/chain/validation/attestation.test.ts b/packages/beacon-node/test/perf/chain/validation/attestation.test.ts index e942e1ea17d0..696b6bdb1871 100644 --- a/packages/beacon-node/test/perf/chain/validation/attestation.test.ts +++ b/packages/beacon-node/test/perf/chain/validation/attestation.test.ts @@ -1,7 +1,6 @@ import {itBench, setBenchOpts} from "@dapplion/benchmark"; import {expect} from "chai"; import {ssz} from "@lodestar/types"; -// eslint-disable-next-line import/no-relative-packages import {generateTestCachedBeaconStateOnlyValidators} from "../../../../../state-transition/test/perf/util.js"; import {validateGossipAttestationsSameAttData} from "../../../../src/chain/validation/index.js"; import {getAttestationValidData} from "../../../utils/validationData/attestation.js"; diff --git a/packages/beacon-node/test/perf/chain/verifyImportBlocks.test.ts b/packages/beacon-node/test/perf/chain/verifyImportBlocks.test.ts index a21c28adaec0..6ae7112f5e3d 100644 --- a/packages/beacon-node/test/perf/chain/verifyImportBlocks.test.ts +++ b/packages/beacon-node/test/perf/chain/verifyImportBlocks.test.ts @@ -4,17 +4,9 @@ import {SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY, SLOTS_PER_EPOCH} from "@lodestar/pa import {LevelDbController} from "@lodestar/db"; import {sleep} from "@lodestar/utils"; import {defaultOptions as defaultValidatorOptions} from "@lodestar/validator"; -// eslint-disable-next-line import/no-relative-packages import {rangeSyncTest} from "../../../../state-transition/test/perf/params.js"; -import { - getNetworkCachedState, - getNetworkCachedBlock, - // eslint-disable-next-line import/no-relative-packages -} from "../../../../state-transition/test/utils/testFileCache.js"; -import { - beforeValue, - // eslint-disable-next-line import/no-relative-packages -} from "../../../../state-transition/test/utils/beforeValueMocha.js"; +import {getNetworkCachedState, getNetworkCachedBlock} from "../../../../state-transition/test/utils/testFileCache.js"; +import {beforeValue} from "../../../../state-transition/test/utils/beforeValueMocha.js"; import {BeaconChain} from "../../../src/chain/index.js"; import {ExecutionEngineDisabled} from "../../../src/execution/engine/index.js"; import {Eth1ForBlockProductionDisabled} from "../../../src/eth1/index.js"; diff --git a/packages/beacon-node/test/scripts/blsPubkeyBytesFrequency.ts b/packages/beacon-node/test/scripts/blsPubkeyBytesFrequency.ts index 1889cacf1496..aaf882a86bff 100644 --- a/packages/beacon-node/test/scripts/blsPubkeyBytesFrequency.ts +++ b/packages/beacon-node/test/scripts/blsPubkeyBytesFrequency.ts @@ -58,7 +58,6 @@ function analyzeBytesFrequencies(pubkeys: string[]): void { byte0Freq[byte0] = 1 + (byte0Freq[byte0] ?? 0); } - // eslint-disable-next-line no-console console.log( `Byte[${i}] frequency distribution`, JSON.stringify( @@ -95,7 +94,6 @@ function analyzeBytesCollisions(pubkeys: string[]): void { } } - // eslint-disable-next-line no-console console.log(`bytes ${i}, collision rate ${collisions.size / 256 ** i}`); } } @@ -120,7 +118,6 @@ async function writePubkeys(): Promise { } run().catch((e) => { - // eslint-disable-next-line no-console console.error(e); process.exit(1); }); diff --git a/packages/beacon-node/test/setupPreset.ts b/packages/beacon-node/test/setupPreset.ts index b25c1d87835e..968c6e12c668 100644 --- a/packages/beacon-node/test/setupPreset.ts +++ b/packages/beacon-node/test/setupPreset.ts @@ -7,6 +7,5 @@ if (process.env.LODESTAR_PRESET === undefined) { // Override FIELD_ELEMENTS_PER_BLOB if its a dev run, mostly to distinguish from // spec runs if (process.env.LODESTAR_PRESET === "minimal" && process.env.DEV_RUN) { - // eslint-disable-next-line @typescript-eslint/naming-convention setActivePreset(PresetName.minimal, {FIELD_ELEMENTS_PER_BLOB: 4096}); } diff --git a/packages/beacon-node/test/spec/bls/bls.ts b/packages/beacon-node/test/spec/bls/bls.ts index 5af15bcb8eb2..76c511215b61 100644 --- a/packages/beacon-node/test/spec/bls/bls.ts +++ b/packages/beacon-node/test/spec/bls/bls.ts @@ -10,8 +10,6 @@ import { } from "@chainsafe/blst"; import {fromHexString} from "@chainsafe/ssz"; -/* eslint-disable @typescript-eslint/naming-convention */ - export const testFnByType: Record any)> = { aggregate_verify, aggregate, @@ -44,7 +42,7 @@ function aggregate_verify(input: {pubkeys: string[]; messages: string[]; signatu pubkeys.map((pk) => PublicKey.fromHex(pk)), Signature.fromHex(signature) ); - } catch (e) { + } catch (_e) { return false; } } @@ -78,7 +76,7 @@ function fast_aggregate_verify(input: {pubkeys: string[]; message: string; signa pubkeys.map((hex) => PublicKey.fromHex(hex, true)), Signature.fromHex(signature, true) ); - } catch (e) { + } catch (_e) { return false; } } @@ -103,7 +101,7 @@ function batch_verify(input: {pubkeys: string[]; messages: string[]; signatures: sig: Signature.fromHex(signatures[i], true), })) ); - } catch (e) { + } catch (_e) { return false; } } @@ -137,7 +135,7 @@ function verify(input: {pubkey: string; message: string; signature: string}): bo const {pubkey, message, signature} = input; try { return _verify(fromHexString(message), PublicKey.fromHex(pubkey), Signature.fromHex(signature)); - } catch (e) { + } catch (_e) { return false; } } @@ -153,7 +151,7 @@ function deserialization_G1(input: {pubkey: string}): boolean { try { PublicKey.fromHex(input.pubkey, true); return true; - } catch (e) { + } catch (_e) { return false; } } @@ -169,7 +167,7 @@ function deserialization_G2(input: {signature: string}): boolean { try { Signature.fromHex(input.signature, true); return true; - } catch (e) { + } catch (_e) { return false; } } diff --git a/packages/beacon-node/test/spec/general/bls.ts b/packages/beacon-node/test/spec/general/bls.ts index 010a5b9be53d..fca8529e4e3b 100644 --- a/packages/beacon-node/test/spec/general/bls.ts +++ b/packages/beacon-node/test/spec/general/bls.ts @@ -12,8 +12,6 @@ import { import {InputType} from "@lodestar/spec-test-util"; import {TestRunnerFn} from "../utils/types.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - const testFnByType: Record any> = { aggregate, aggregate_verify, @@ -29,7 +27,7 @@ const G2_POINT_AT_INFINITY = const G1_POINT_AT_INFINITY = "0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; -export const blsTestRunner: TestRunnerFn = (fork, testName) => { +export const blsTestRunner: TestRunnerFn = (_fork, testName) => { return { testFunction: ({data}) => { const testFn = testFnByType[testName]; @@ -75,7 +73,7 @@ function aggregate(input: string[]): string | null { const pks = input.map((pkHex) => Signature.fromHex(pkHex)); const agg = aggregateSignatures(pks); return agg.toHex(); - } catch (e) { + } catch (_e) { return null; } } @@ -97,7 +95,7 @@ function aggregate_verify(input: {pubkeys: string[]; messages: string[]; signatu pubkeys.map((pk) => PublicKey.fromHex(pk)), Signature.fromHex(signature) ); - } catch (e) { + } catch (_e) { return false; } } @@ -116,7 +114,7 @@ function eth_aggregate_pubkeys(input: string[]): string | null { try { return aggregateSerializedPublicKeys(input.map((hex) => fromHexString(hex))).toHex(); - } catch (e) { + } catch (_e) { return null; } } @@ -148,7 +146,7 @@ function eth_fast_aggregate_verify(input: {pubkeys: string[]; message: string; s pubkeys.map((hex) => PublicKey.fromHex(hex)), Signature.fromHex(signature) ); - } catch (e) { + } catch (_e) { return false; } } @@ -170,7 +168,7 @@ function fast_aggregate_verify(input: {pubkeys: string[]; message: string; signa pubkeys.map((hex) => PublicKey.fromHex(hex, true)), Signature.fromHex(signature, true) ); - } catch (e) { + } catch (_e) { return false; } } @@ -185,7 +183,7 @@ function sign(input: {privkey: string; message: string}): string | null { const {privkey, message} = input; try { return SecretKey.fromHex(privkey).sign(fromHexString(message)).toHex(); - } catch (e) { + } catch (_e) { return null; } } @@ -201,7 +199,7 @@ function verify(input: {pubkey: string; message: string; signature: string}): bo const {pubkey, message, signature} = input; try { return _verify(fromHexString(message), PublicKey.fromHex(pubkey), Signature.fromHex(signature)); - } catch (e) { + } catch (_e) { return false; } } diff --git a/packages/beacon-node/test/spec/general/index.test.ts b/packages/beacon-node/test/spec/general/index.test.ts index f6bfb0b7b2a1..063f128c3142 100644 --- a/packages/beacon-node/test/spec/general/index.test.ts +++ b/packages/beacon-node/test/spec/general/index.test.ts @@ -5,8 +5,6 @@ import {ethereumConsensusSpecsTests} from "../specTestVersioning.js"; import {blsTestRunner} from "./bls.js"; import {sszGeneric} from "./ssz_generic.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - // NOTE: You MUST always provide a detailed reason of why a spec test is skipped plus link // to an issue marking it as pending to re-enable and an aproximate timeline of when it will // be fixed. diff --git a/packages/beacon-node/test/spec/general/ssz_generic.ts b/packages/beacon-node/test/spec/general/ssz_generic.ts index e791ca62eefe..64e6b4455941 100644 --- a/packages/beacon-node/test/spec/general/ssz_generic.ts +++ b/packages/beacon-node/test/spec/general/ssz_generic.ts @@ -15,7 +15,7 @@ import {getTestType} from "./ssz_generic_types.js"; export const sszGeneric = (skippedTypes: string[]): TestRunnerCustom => - (fork, typeName, testSuite, testSuiteDirpath) => { + (_fork, typeName, testSuite, testSuiteDirpath) => { if (testSuite === "invalid") { for (const testCase of fs.readdirSync(testSuiteDirpath)) { it(testCase, () => { diff --git a/packages/beacon-node/test/spec/general/ssz_generic_types.ts b/packages/beacon-node/test/spec/general/ssz_generic_types.ts index cd95a5dec79e..aa231c962ae3 100644 --- a/packages/beacon-node/test/spec/general/ssz_generic_types.ts +++ b/packages/beacon-node/test/spec/general/ssz_generic_types.ts @@ -20,8 +20,6 @@ const uint64 = new UintBigintType(8); const uint128 = new UintBigintType(16); const uint256 = new UintBigintType(32); -/* eslint-disable @typescript-eslint/naming-convention */ - // class SingleFieldTestStruct(Container): // A: byte const SingleFieldTestStruct = new ContainerType({ diff --git a/packages/beacon-node/test/spec/presets/epoch_processing.test.ts b/packages/beacon-node/test/spec/presets/epoch_processing.test.ts index 604243400aa0..17347269c6f6 100644 --- a/packages/beacon-node/test/spec/presets/epoch_processing.test.ts +++ b/packages/beacon-node/test/spec/presets/epoch_processing.test.ts @@ -20,8 +20,6 @@ import {specTestIterator} from "../utils/specTestIterator.js"; export type EpochTransitionFn = (state: CachedBeaconStateAllForks, epochTransitionCache: EpochTransitionCache) => void; -/* eslint-disable @typescript-eslint/naming-convention */ - const epochTransitionFns: Record = { effective_balance_updates: (state, epochTransitionCache) => { const fork = state.config.getForkSeq(state.slot); @@ -99,7 +97,7 @@ const epochProcessing = post: ssz[fork].BeaconState, }, getExpected: (testCase) => testCase.post, - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expectEqualBeaconState(fork, expected, actual); }, // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts diff --git a/packages/beacon-node/test/spec/presets/finality.test.ts b/packages/beacon-node/test/spec/presets/finality.test.ts index 0ec4017064f4..1dce91e360e5 100644 --- a/packages/beacon-node/test/spec/presets/finality.test.ts +++ b/packages/beacon-node/test/spec/presets/finality.test.ts @@ -15,8 +15,6 @@ import {assertCorrectProgressiveBalances} from "../config.js"; import {ethereumConsensusSpecsTests} from "../specTestVersioning.js"; import {specTestIterator} from "../utils/specTestIterator.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - const finality: TestRunnerFn = (fork) => { return { testFunction: (testcase) => { @@ -49,7 +47,7 @@ const finality: TestRunnerFn = (fork) => shouldError: (testCase) => !testCase.post, timeout: 10000, getExpected: (testCase) => testCase.post, - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expectEqualBeaconState(fork, expected, actual); }, // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts diff --git a/packages/beacon-node/test/spec/presets/fork.test.ts b/packages/beacon-node/test/spec/presets/fork.test.ts index c121e651fcea..626d6477bcb1 100644 --- a/packages/beacon-node/test/spec/presets/fork.test.ts +++ b/packages/beacon-node/test/spec/presets/fork.test.ts @@ -50,7 +50,7 @@ const fork: TestRunnerFn = (forkNext) => { timeout: 10000, shouldError: (testCase) => testCase.post === undefined, getExpected: (testCase) => testCase.post, - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expectEqualBeaconState(forkNext, expected, actual); }, // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts diff --git a/packages/beacon-node/test/spec/presets/fork_choice.test.ts b/packages/beacon-node/test/spec/presets/fork_choice.test.ts index 7cb6e3c3d692..72515e703582 100644 --- a/packages/beacon-node/test/spec/presets/fork_choice.test.ts +++ b/packages/beacon-node/test/spec/presets/fork_choice.test.ts @@ -46,8 +46,6 @@ import {initCKZG, loadEthereumTrustedSetup} from "../../../src/util/kzg.js"; import {ethereumConsensusSpecsTests} from "../specTestVersioning.js"; import {specTestIterator} from "../utils/specTestIterator.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - const ANCHOR_STATE_FILE_NAME = "anchor_state"; const ANCHOR_BLOCK_FILE_NAME = "anchor_block"; const BLOCK_FILE_NAME = "^(block)_([0-9a-zA-Z]+)$"; diff --git a/packages/beacon-node/test/spec/presets/genesis.test.ts b/packages/beacon-node/test/spec/presets/genesis.test.ts index 773debe3bb19..140fa3686e67 100644 --- a/packages/beacon-node/test/spec/presets/genesis.test.ts +++ b/packages/beacon-node/test/spec/presets/genesis.test.ts @@ -22,8 +22,6 @@ import {ethereumConsensusSpecsTests} from "../specTestVersioning.js"; // The aim of the genesis tests is to provide a baseline to test genesis-state initialization and test if the // proposed genesis-validity conditions are working. -/* eslint-disable @typescript-eslint/naming-convention */ - const genesis: TestRunnerFn = (fork, testName, testSuite) => { const testFn = genesisTestFns[testName]; if (testFn === undefined) { @@ -86,7 +84,7 @@ const genesisInitialization: TestRunnerFn testCase.state, - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expectEqualBeaconState(fork, expected, actual); }, // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts @@ -108,7 +106,7 @@ const genesisValidity: TestRunnerFn = (fork) = genesis: ssz[fork].BeaconState, }, getExpected: (testCase) => testCase.is_valid, - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expect(actual).toEqualWithMessage(expected, "isValidGenesisState is not" + expected); }, }, diff --git a/packages/beacon-node/test/spec/presets/light_client/index.test.ts b/packages/beacon-node/test/spec/presets/light_client/index.test.ts index 0a44772cab4b..a8cc12238675 100644 --- a/packages/beacon-node/test/spec/presets/light_client/index.test.ts +++ b/packages/beacon-node/test/spec/presets/light_client/index.test.ts @@ -7,8 +7,6 @@ import {singleMerkleProof} from "./single_merkle_proof.js"; import {sync} from "./sync.js"; import {updateRanking} from "./update_ranking.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - const lightClient: TestRunnerFn = (fork, testName, testSuite) => { const testFn = lightclientTestFns[testName]; if (testFn === undefined) { diff --git a/packages/beacon-node/test/spec/presets/light_client/single_merkle_proof.ts b/packages/beacon-node/test/spec/presets/light_client/single_merkle_proof.ts index d230bc926b0d..08dcd0ab8acf 100644 --- a/packages/beacon-node/test/spec/presets/light_client/single_merkle_proof.ts +++ b/packages/beacon-node/test/spec/presets/light_client/single_merkle_proof.ts @@ -7,8 +7,6 @@ import {ForkName} from "@lodestar/params"; import {toHex} from "@lodestar/utils"; import {TestRunnerFn} from "../../utils/types.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - // https://github.com/ethereum/consensus-specs/blob/da3f5af919be4abb5a6db5a80b235deb8b4b5cba/tests/formats/light_client/single_merkle_proof.md type SingleMerkleProofTestCase = { meta?: any; @@ -23,7 +21,11 @@ type SingleMerkleProofTestCase = { }; }; -export const singleMerkleProof: TestRunnerFn = (fork, testHandler, testSuite) => { +export const singleMerkleProof: TestRunnerFn = ( + fork, + _testHandler, + testSuite +) => { return { testFunction: (testcase) => { // Assert correct proof generation @@ -39,7 +41,7 @@ export const singleMerkleProof: TestRunnerFn testCase.proof.branch, - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expect(actual).deep.equals(expected); }, // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts diff --git a/packages/beacon-node/test/spec/presets/light_client/sync.ts b/packages/beacon-node/test/spec/presets/light_client/sync.ts index bfd3d0d0bb3d..d931a5f310a8 100644 --- a/packages/beacon-node/test/spec/presets/light_client/sync.ts +++ b/packages/beacon-node/test/spec/presets/light_client/sync.ts @@ -9,8 +9,6 @@ import {computeSyncPeriodAtSlot} from "@lodestar/state-transition"; import {TestRunnerFn} from "../../utils/types.js"; import {testLogger} from "../../../utils/logger.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - // https://github.com/ethereum/consensus-specs/blob/da3f5af919be4abb5a6db5a80b235deb8b4b5cba/tests/formats/light_client/single_merkle_proof.md type SyncTestCase = { meta: { diff --git a/packages/beacon-node/test/spec/presets/light_client/update_ranking.ts b/packages/beacon-node/test/spec/presets/light_client/update_ranking.ts index a2e60c1cc84a..b51219dd4e54 100644 --- a/packages/beacon-node/test/spec/presets/light_client/update_ranking.ts +++ b/packages/beacon-node/test/spec/presets/light_client/update_ranking.ts @@ -5,8 +5,6 @@ import {InputType} from "@lodestar/spec-test-util"; import {isBetterUpdate, LightClientUpdateSummary, toLightClientUpdateSummary} from "@lodestar/light-client/spec"; import {TestRunnerFn} from "../../utils/types.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - // https://github.com/ethereum/consensus-specs/blob/da3f5af919be4abb5a6db5a80b235deb8b4b5cba/tests/formats/light_client/update_ranking.md type UpdateRankingTestCase = { meta: { diff --git a/packages/beacon-node/test/spec/presets/merkle.test.ts b/packages/beacon-node/test/spec/presets/merkle.test.ts index d3f6890527e9..71cebdbd0b5b 100644 --- a/packages/beacon-node/test/spec/presets/merkle.test.ts +++ b/packages/beacon-node/test/spec/presets/merkle.test.ts @@ -11,8 +11,6 @@ import {RunnerType, TestRunnerFn} from "../utils/types.js"; import {ethereumConsensusSpecsTests} from "../specTestVersioning.js"; import {specTestIterator} from "../utils/specTestIterator.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - const merkle: TestRunnerFn = (fork) => { return { testFunction: (testcase) => { @@ -47,7 +45,7 @@ const merkle: TestRunnerFn = (fork) => { }), timeout: 10000, getExpected: (testCase) => testCase.proof, - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expect(actual).toEqualWithMessage(expected, "incorrect proof"); }, // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts diff --git a/packages/beacon-node/test/spec/presets/operations.test.ts b/packages/beacon-node/test/spec/presets/operations.test.ts index 7e2e9c1e9c5d..1ab8c19da5ef 100644 --- a/packages/beacon-node/test/spec/presets/operations.test.ts +++ b/packages/beacon-node/test/spec/presets/operations.test.ts @@ -20,8 +20,6 @@ import {BaseSpecTest, RunnerType, shouldVerify, TestRunnerFn} from "../utils/typ import {ethereumConsensusSpecsTests} from "../specTestVersioning.js"; import {specTestIterator} from "../utils/specTestIterator.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - // Define above to re-use in sync_aggregate and sync_aggregate_random const sync_aggregate: BlockProcessFn = ( state, @@ -156,7 +154,7 @@ const operations: TestRunnerFn = (fork, }, shouldError: (testCase) => testCase.post === undefined, getExpected: (testCase) => testCase.post, - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expectEqualBeaconState(fork, expected, actual); }, // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts diff --git a/packages/beacon-node/test/spec/presets/rewards.test.ts b/packages/beacon-node/test/spec/presets/rewards.test.ts index 426245242d84..df43c8ca612e 100644 --- a/packages/beacon-node/test/spec/presets/rewards.test.ts +++ b/packages/beacon-node/test/spec/presets/rewards.test.ts @@ -13,8 +13,6 @@ import {assertCorrectProgressiveBalances} from "../config.js"; import {ethereumConsensusSpecsTests} from "../specTestVersioning.js"; import {specTestIterator} from "../utils/specTestIterator.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - const deltasType = new VectorCompositeType(ssz.phase0.Balances, 2); const rewards: TestRunnerFn = (fork) => { @@ -57,7 +55,7 @@ const rewards: TestRunnerFn = (fork) => { ...(testCase.inclusion_delay_deltas ? [testCase.inclusion_delay_deltas] : []), testCase.inactivity_penalty_deltas, ]), - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expect(actual).toEqual(expected); }, // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts diff --git a/packages/beacon-node/test/spec/presets/sanity.test.ts b/packages/beacon-node/test/spec/presets/sanity.test.ts index 3ec1efb84fde..cd266483c7f8 100644 --- a/packages/beacon-node/test/spec/presets/sanity.test.ts +++ b/packages/beacon-node/test/spec/presets/sanity.test.ts @@ -18,8 +18,6 @@ import {assertCorrectProgressiveBalances} from "../config.js"; import {ethereumConsensusSpecsTests} from "../specTestVersioning.js"; import {specTestIterator} from "../utils/specTestIterator.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - const sanity: TestRunnerFn = (fork, testName, testSuite) => { switch (testName) { case "slots": @@ -50,7 +48,7 @@ const sanitySlots: TestRunnerFn = (for shouldError: (testCase) => !testCase.post, timeout: 10000, getExpected: (testCase) => testCase.post, - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expectEqualBeaconState(fork, expected, actual); }, // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts @@ -88,7 +86,7 @@ const sanityBlocks: TestRunnerFn = (f shouldError: (testCase) => testCase.post === undefined, timeout: 10000, getExpected: (testCase) => testCase.post, - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expectEqualBeaconState(fork, expected, actual); }, // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts diff --git a/packages/beacon-node/test/spec/presets/ssz_static.test.ts b/packages/beacon-node/test/spec/presets/ssz_static.test.ts index 6e43d851ef66..06c7aa1fd98d 100644 --- a/packages/beacon-node/test/spec/presets/ssz_static.test.ts +++ b/packages/beacon-node/test/spec/presets/ssz_static.test.ts @@ -32,7 +32,7 @@ type Types = Record>; const sszStatic = (skippedFork: string, skippedTypes?: string[]) => - (fork: ForkName, typeName: string, testSuite: string, testSuiteDirpath: string): void => { + (fork: ForkName, typeName: string, _testSuite: string, testSuiteDirpath: string): void => { if (fork === skippedFork) { return; } @@ -78,7 +78,6 @@ const sszStatic = }; specTestIterator(path.join(ethereumConsensusSpecsTests.outputDir, "tests", ACTIVE_PRESET), { - // eslint-disable-next-line @typescript-eslint/naming-convention ssz_static: { type: RunnerType.custom, // starting from v1.4.0-beta.6, there is "whisk" fork in ssz_static tests but we ignore them diff --git a/packages/beacon-node/test/spec/presets/transition.test.ts b/packages/beacon-node/test/spec/presets/transition.test.ts index cae7c667b590..df818f701c5d 100644 --- a/packages/beacon-node/test/spec/presets/transition.test.ts +++ b/packages/beacon-node/test/spec/presets/transition.test.ts @@ -78,7 +78,7 @@ const transition = shouldError: (testCase) => testCase.post === undefined, timeout: 10000, getExpected: (testCase) => testCase.post, - expectFunc: (testCase, expected, actual) => { + expectFunc: (_testCase, expected, actual) => { expectEqualBeaconState(forkNext, expected, actual); }, // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts @@ -88,8 +88,6 @@ const transition = }; }; -/* eslint-disable @typescript-eslint/naming-convention */ - function getTransitionConfig(fork: ForkName, forkEpoch: number): Partial { switch (fork) { case ForkName.phase0: diff --git a/packages/beacon-node/test/spec/specTestVersioning.ts b/packages/beacon-node/test/spec/specTestVersioning.ts index d4bc192f6cad..5e15b696e4a1 100644 --- a/packages/beacon-node/test/spec/specTestVersioning.ts +++ b/packages/beacon-node/test/spec/specTestVersioning.ts @@ -11,7 +11,6 @@ import {DownloadTestsOptions} from "@lodestar/spec-test-util/downloadTests"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); export const ethereumConsensusSpecsTests: DownloadTestsOptions = { diff --git a/packages/beacon-node/test/spec/utils/runValidSszTest.ts b/packages/beacon-node/test/spec/utils/runValidSszTest.ts index e5f249ab5257..7ca02cec2d1e 100644 --- a/packages/beacon-node/test/spec/utils/runValidSszTest.ts +++ b/packages/beacon-node/test/spec/utils/runValidSszTest.ts @@ -21,7 +21,7 @@ export function runValidSszTest(type: Type, testData: ValidTestCaseData console.log( JSON.stringify( testData.jsonValue, - (key, value: unknown) => (typeof value === "bigint" ? value.toString() : value), + (_key, value: unknown) => (typeof value === "bigint" ? value.toString() : value), 2 ) ); diff --git a/packages/beacon-node/test/spec/utils/types.ts b/packages/beacon-node/test/spec/utils/types.ts index 94ad7b73de3f..00bebffd7d7e 100644 --- a/packages/beacon-node/test/spec/utils/types.ts +++ b/packages/beacon-node/test/spec/utils/types.ts @@ -26,8 +26,6 @@ export type TestRunner = | {type: RunnerType.default; fn: TestRunnerFn} | {type: RunnerType.custom; fn: TestRunnerCustom}; -/* eslint-disable @typescript-eslint/naming-convention */ - export type BaseSpecTest = { meta?: { bls_setting?: bigint; diff --git a/packages/beacon-node/test/tsconfig.json b/packages/beacon-node/test/tsconfig.json index 7e6bad81b22f..f4241fc1fbcd 100644 --- a/packages/beacon-node/test/tsconfig.json +++ b/packages/beacon-node/test/tsconfig.json @@ -3,4 +3,4 @@ "compilerOptions": { "noEmit": false } -} \ No newline at end of file +} diff --git a/packages/beacon-node/test/unit/api/impl/events/events.test.ts b/packages/beacon-node/test/unit/api/impl/events/events.test.ts index e031c3ac9958..a5dd21d14fd3 100644 --- a/packages/beacon-node/test/unit/api/impl/events/events.test.ts +++ b/packages/beacon-node/test/unit/api/impl/events/events.test.ts @@ -11,7 +11,6 @@ vi.mock("../../../../../src/chain/index.js", async (importActual) => { return { ...mod, - // eslint-disable-next-line @typescript-eslint/naming-convention BeaconChain: vi.spyOn(mod, "BeaconChain").mockImplementation(() => { return { emitter: new ChainEventEmitter(), diff --git a/packages/beacon-node/test/unit/api/impl/validator/produceBlockV3.test.ts b/packages/beacon-node/test/unit/api/impl/validator/produceBlockV3.test.ts index a7299aa3b956..d8f1b9a317b9 100644 --- a/packages/beacon-node/test/unit/api/impl/validator/produceBlockV3.test.ts +++ b/packages/beacon-node/test/unit/api/impl/validator/produceBlockV3.test.ts @@ -12,7 +12,6 @@ import {CommonBlockBody} from "../../../../../src/chain/interface.js"; import {zeroProtoBlock} from "../../../../utils/state.js"; import {defaultApiOptions} from "../../../../../src/api/options.js"; -/* eslint-disable @typescript-eslint/naming-convention */ describe("api/validator - produceBlockV3", function () { let modules: ApiTestModules; let api: ReturnType; @@ -143,7 +142,7 @@ describe("api/validator - produceBlockV3", function () { }); const expectedBlock = finalSelection === "builder" ? blindedBlock : fullBlock; - const expectedExecution = finalSelection === "builder" ? true : false; + const expectedExecution = finalSelection === "builder"; expect(block).toEqual(expectedBlock); expect(meta.executionPayloadBlinded).toEqual(expectedExecution); diff --git a/packages/beacon-node/test/unit/chain/beaconProposerCache.ts b/packages/beacon-node/test/unit/chain/beaconProposerCache.ts index 4545ef0c94b2..538fe8518458 100644 --- a/packages/beacon-node/test/unit/chain/beaconProposerCache.ts +++ b/packages/beacon-node/test/unit/chain/beaconProposerCache.ts @@ -1,4 +1,4 @@ -import {expect} from "vitest"; +import {expect, describe, it, beforeEach} from "vitest"; import {BeaconProposerCache} from "../../../src/chain/beaconProposerCache.js"; const suggestedFeeRecipient = "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; diff --git a/packages/beacon-node/test/unit/chain/genesis/genesis.test.ts b/packages/beacon-node/test/unit/chain/genesis/genesis.test.ts index f836e3621cc9..5b48ca9fd953 100644 --- a/packages/beacon-node/test/unit/chain/genesis/genesis.test.ts +++ b/packages/beacon-node/test/unit/chain/genesis/genesis.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {toHexString} from "@chainsafe/ssz"; import {describe, it, expect} from "vitest"; import {PublicKey, SecretKey} from "@chainsafe/blst"; diff --git a/packages/beacon-node/test/unit/chain/lightclient/upgradeLightClientHeader.test.ts b/packages/beacon-node/test/unit/chain/lightclient/upgradeLightClientHeader.test.ts index 6da728be46e9..ab8f166076b9 100644 --- a/packages/beacon-node/test/unit/chain/lightclient/upgradeLightClientHeader.test.ts +++ b/packages/beacon-node/test/unit/chain/lightclient/upgradeLightClientHeader.test.ts @@ -8,7 +8,6 @@ describe("UpgradeLightClientHeader", function () { let lcHeaderByFork: Record; let testSlots: Record; - /* eslint-disable @typescript-eslint/naming-convention */ const chainConfig = createChainForkConfig({ ...defaultChainConfig, ALTAIR_FORK_EPOCH: 1, diff --git a/packages/beacon-node/test/unit/chain/opPools/attestationPool.test.ts b/packages/beacon-node/test/unit/chain/opPools/attestationPool.test.ts index 68efd0751585..eba01888fa7c 100644 --- a/packages/beacon-node/test/unit/chain/opPools/attestationPool.test.ts +++ b/packages/beacon-node/test/unit/chain/opPools/attestationPool.test.ts @@ -13,7 +13,6 @@ export const validSignature = fromHexString( ); describe("AttestationPool", function () { - /* eslint-disable @typescript-eslint/naming-convention */ const config = createChainForkConfig({ ...defaultChainConfig, ELECTRA_FORK_EPOCH: 5, diff --git a/packages/beacon-node/test/unit/chain/rewards/blockRewards.test.ts b/packages/beacon-node/test/unit/chain/rewards/blockRewards.test.ts index f0d85ce3220f..d417d83e2da9 100644 --- a/packages/beacon-node/test/unit/chain/rewards/blockRewards.test.ts +++ b/packages/beacon-node/test/unit/chain/rewards/blockRewards.test.ts @@ -10,9 +10,7 @@ import { import { generatePerfTestCachedStateAltair, cachedStateAltairPopulateCaches, - // eslint-disable-next-line import/no-relative-packages } from "../../../../../state-transition/test/perf/util.js"; -// eslint-disable-next-line import/no-relative-packages import {BlockAltairOpts, getBlockAltair} from "../../../../../state-transition/test/perf/block/util.js"; import {computeBlockRewards} from "../../../../src/chain/rewards/blockRewards.js"; diff --git a/packages/beacon-node/test/unit/chain/seenCache/seenGossipBlockInput.test.ts b/packages/beacon-node/test/unit/chain/seenCache/seenGossipBlockInput.test.ts index 2a3275536f22..27b5eadecf11 100644 --- a/packages/beacon-node/test/unit/chain/seenCache/seenGossipBlockInput.test.ts +++ b/packages/beacon-node/test/unit/chain/seenCache/seenGossipBlockInput.test.ts @@ -5,7 +5,6 @@ import {ssz} from "@lodestar/types"; import {SeenGossipBlockInput} from "../../../../src/chain/seenCache/seenGossipBlockInput.js"; import {BlockInputType, GossipedInputType, BlockInput} from "../../../../src/chain/blocks/types.js"; -/* eslint-disable @typescript-eslint/naming-convention */ describe("SeenGossipBlockInput", () => { const chainConfig = createChainForkConfig({ ...defaultChainConfig, diff --git a/packages/beacon-node/test/unit/chain/shufflingCache.test.ts b/packages/beacon-node/test/unit/chain/shufflingCache.test.ts index 62b02cbf2b12..3c1824b8c01d 100644 --- a/packages/beacon-node/test/unit/chain/shufflingCache.test.ts +++ b/packages/beacon-node/test/unit/chain/shufflingCache.test.ts @@ -1,5 +1,4 @@ import {describe, it, expect, beforeEach} from "vitest"; -// eslint-disable-next-line import/no-relative-packages import {generateTestCachedBeaconStateOnlyValidators} from "../../../../state-transition/test/perf/util.js"; import {ShufflingCache} from "../../../src/chain/shufflingCache.js"; diff --git a/packages/beacon-node/test/unit/chain/validation/aggregateAndProof.test.ts b/packages/beacon-node/test/unit/chain/validation/aggregateAndProof.test.ts index f2c20fd5cbe4..e2bc392b4ea2 100644 --- a/packages/beacon-node/test/unit/chain/validation/aggregateAndProof.test.ts +++ b/packages/beacon-node/test/unit/chain/validation/aggregateAndProof.test.ts @@ -2,7 +2,6 @@ import {BitArray, toHexString} from "@chainsafe/ssz"; import {describe, it} from "vitest"; import {SLOTS_PER_EPOCH} from "@lodestar/params"; import {phase0, ssz} from "@lodestar/types"; -// eslint-disable-next-line import/no-relative-packages import {generateTestCachedBeaconStateOnlyValidators} from "../../../../../state-transition/test/perf/util.js"; import {IBeaconChain} from "../../../../src/chain/index.js"; import {AttestationErrorCode} from "../../../../src/chain/errors/index.js"; @@ -24,7 +23,6 @@ describe("chain / validation / aggregateAndProof", () => { const getState = memoOnce(() => generateTestCachedBeaconStateOnlyValidators({vc, slot: stateSlot})); - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type function getValidData(opts?: Partial) { return getAggregateAndProofValidData({ currentSlot: stateSlot, diff --git a/packages/beacon-node/test/unit/chain/validation/attestation/getShufflingForAttestationVerification.test.ts b/packages/beacon-node/test/unit/chain/validation/attestation/getShufflingForAttestationVerification.test.ts index a0eb147db8e8..9aa7c29c7825 100644 --- a/packages/beacon-node/test/unit/chain/validation/attestation/getShufflingForAttestationVerification.test.ts +++ b/packages/beacon-node/test/unit/chain/validation/attestation/getShufflingForAttestationVerification.test.ts @@ -1,6 +1,5 @@ import {afterEach, beforeEach, describe, expect, it, vi} from "vitest"; // We need to import the mock before the packages -// eslint-disable-next-line import/order import {MockedBeaconChain, getMockedBeaconChain} from "../../../../mocks/mockedBeaconChain.js"; import {EpochShuffling, computeStartSlotAtEpoch} from "@lodestar/state-transition"; import {EpochDifference, ProtoBlock} from "@lodestar/fork-choice"; diff --git a/packages/beacon-node/test/unit/chain/validation/attestation/validateAttestation.test.ts b/packages/beacon-node/test/unit/chain/validation/attestation/validateAttestation.test.ts index 90d37a74289d..be9fd3587b7c 100644 --- a/packages/beacon-node/test/unit/chain/validation/attestation/validateAttestation.test.ts +++ b/packages/beacon-node/test/unit/chain/validation/attestation/validateAttestation.test.ts @@ -3,7 +3,6 @@ import {describe, expect, it} from "vitest"; import {ForkName, SLOTS_PER_EPOCH} from "@lodestar/params"; import {ssz} from "@lodestar/types"; import {LodestarError} from "@lodestar/utils"; -// eslint-disable-next-line import/no-relative-packages import {generateTestCachedBeaconStateOnlyValidators} from "../../../../../../state-transition/test/perf/util.js"; import {AttestationErrorCode, GossipErrorCode} from "../../../../../src/chain/errors/index.js"; import {IBeaconChain} from "../../../../../src/chain/index.js"; @@ -31,7 +30,6 @@ describe("validateAttestation", () => { const getState = memoOnce(() => generateTestCachedBeaconStateOnlyValidators({vc, slot: stateSlot})); - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type function getValidData(opts?: Partial) { return getAttestationValidData({ currentSlot: stateSlot, diff --git a/packages/beacon-node/test/unit/chain/validation/block.test.ts b/packages/beacon-node/test/unit/chain/validation/block.test.ts index d90ca4a54d24..28375f1625e1 100644 --- a/packages/beacon-node/test/unit/chain/validation/block.test.ts +++ b/packages/beacon-node/test/unit/chain/validation/block.test.ts @@ -33,7 +33,6 @@ describe("gossip block validation", function () { chain.forkChoice = forkChoice; regen = chain.regen; - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (chain as any).opts = {maxSkipSlots}; verifySignature = chain.bls.verifySignatureSets; diff --git a/packages/beacon-node/test/unit/chain/validation/lightClientFinalityUpdate.test.ts b/packages/beacon-node/test/unit/chain/validation/lightClientFinalityUpdate.test.ts index ef4364abc366..76eb18fc38eb 100644 --- a/packages/beacon-node/test/unit/chain/validation/lightClientFinalityUpdate.test.ts +++ b/packages/beacon-node/test/unit/chain/validation/lightClientFinalityUpdate.test.ts @@ -12,7 +12,6 @@ describe("Light Client Finality Update validation", function () { const afterEachCallbacks: (() => Promise | void)[] = []; const config = createChainForkConfig({ ...defaultChainConfig, - /* eslint-disable @typescript-eslint/naming-convention */ ALTAIR_FORK_EPOCH: 1, BELLATRIX_FORK_EPOCH: 3, CAPELLA_FORK_EPOCH: Infinity, diff --git a/packages/beacon-node/test/unit/chain/validation/lightClientOptimisticUpdate.test.ts b/packages/beacon-node/test/unit/chain/validation/lightClientOptimisticUpdate.test.ts index b63a08757380..7e35f1272ad6 100644 --- a/packages/beacon-node/test/unit/chain/validation/lightClientOptimisticUpdate.test.ts +++ b/packages/beacon-node/test/unit/chain/validation/lightClientOptimisticUpdate.test.ts @@ -12,7 +12,6 @@ describe("Light Client Optimistic Update validation", function () { const afterEachCallbacks: (() => Promise | void)[] = []; const config = createChainForkConfig({ ...defaultChainConfig, - /* eslint-disable @typescript-eslint/naming-convention */ ALTAIR_FORK_EPOCH: 1, BELLATRIX_FORK_EPOCH: 3, CAPELLA_FORK_EPOCH: Infinity, diff --git a/packages/beacon-node/test/unit/chain/validation/syncCommittee.test.ts b/packages/beacon-node/test/unit/chain/validation/syncCommittee.test.ts index b498333ae738..26571ab19a77 100644 --- a/packages/beacon-node/test/unit/chain/validation/syncCommittee.test.ts +++ b/packages/beacon-node/test/unit/chain/validation/syncCommittee.test.ts @@ -20,7 +20,6 @@ describe("Sync Committee Signature validation", function () { let altairForkEpochBk: Epoch; const altairForkEpoch = 2020; const currentSlot = SLOTS_PER_EPOCH * (altairForkEpoch + 1); - // eslint-disable-next-line @typescript-eslint/naming-convention const config = createChainForkConfig(Object.assign({}, defaultChainConfig, {ALTAIR_FORK_EPOCH: altairForkEpoch})); // all validators have same pubkey const validatorIndexInSyncCommittee = 15; diff --git a/packages/beacon-node/test/unit/db/api/repository.test.ts b/packages/beacon-node/test/unit/db/api/repository.test.ts index 07c199632125..28065c84c7ea 100644 --- a/packages/beacon-node/test/unit/db/api/repository.test.ts +++ b/packages/beacon-node/test/unit/db/api/repository.test.ts @@ -11,7 +11,6 @@ vi.mock("@lodestar/db", async (importOriginal) => { return { ...mod, - // eslint-disable-next-line @typescript-eslint/naming-convention LevelDbController: vi.spyOn(mod, "LevelDbController").mockImplementation(() => { return { get: vi.fn(), @@ -31,7 +30,6 @@ interface TestType { bytes: Bytes32; } -// eslint-disable-next-line @typescript-eslint/naming-convention const TestSSZType = new ContainerType({ bool: ssz.Boolean, bytes: ssz.Bytes32, diff --git a/packages/beacon-node/test/unit/eth1/eth1MergeBlockTracker.test.ts b/packages/beacon-node/test/unit/eth1/eth1MergeBlockTracker.test.ts index 151f3931cfde..edf571b905b3 100644 --- a/packages/beacon-node/test/unit/eth1/eth1MergeBlockTracker.test.ts +++ b/packages/beacon-node/test/unit/eth1/eth1MergeBlockTracker.test.ts @@ -8,8 +8,6 @@ import {Eth1MergeBlockTracker, StatusCode, toPowBlock} from "../../../src/eth1/e import {Eth1ProviderState, EthJsonRpcBlockRaw} from "../../../src/eth1/interface.js"; import {testLogger} from "../../utils/logger.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - describe("eth1 / Eth1MergeBlockTracker", () => { const logger = testLogger(); diff --git a/packages/beacon-node/test/unit/eth1/utils/deposits.test.ts b/packages/beacon-node/test/unit/eth1/utils/deposits.test.ts index 316f75efc5ce..88d2796a12de 100644 --- a/packages/beacon-node/test/unit/eth1/utils/deposits.test.ts +++ b/packages/beacon-node/test/unit/eth1/utils/deposits.test.ts @@ -99,7 +99,6 @@ describe("eth1 / util / deposits", function () { }, ]; - /* eslint-disable @typescript-eslint/naming-convention */ const postElectraConfig = createChainForkConfig({ ALTAIR_FORK_EPOCH: 1, BELLATRIX_FORK_EPOCH: 2, diff --git a/packages/beacon-node/test/unit/eth1/utils/optimizeNextBlockDiffForGenesis.test.ts b/packages/beacon-node/test/unit/eth1/utils/optimizeNextBlockDiffForGenesis.test.ts index cacfd7dc685f..0521823d1283 100644 --- a/packages/beacon-node/test/unit/eth1/utils/optimizeNextBlockDiffForGenesis.test.ts +++ b/packages/beacon-node/test/unit/eth1/utils/optimizeNextBlockDiffForGenesis.test.ts @@ -5,11 +5,8 @@ import {Eth1Block} from "../../../../src/eth1/interface.js"; describe("eth1 / utils / optimizeNextBlockDiffForGenesis", function () { it("should return optimized block diff to find genesis time", () => { const params = { - // eslint-disable-next-line @typescript-eslint/naming-convention MIN_GENESIS_TIME: 1578009600, - // eslint-disable-next-line @typescript-eslint/naming-convention GENESIS_DELAY: 172800, - // eslint-disable-next-line @typescript-eslint/naming-convention SECONDS_PER_ETH1_BLOCK: 14, }; const initialTimeDiff = params.GENESIS_DELAY * 2; diff --git a/packages/beacon-node/test/unit/monitoring/remoteService.ts b/packages/beacon-node/test/unit/monitoring/remoteService.ts index c5ce0e9ef0b3..bea50eee3bdd 100644 --- a/packages/beacon-node/test/unit/monitoring/remoteService.ts +++ b/packages/beacon-node/test/unit/monitoring/remoteService.ts @@ -77,7 +77,7 @@ function validateClientStats(data: ReceivedData, schema: ClientStatsSchema): voi schema.forEach((s) => { try { expect(data[s.key]).toBeInstanceOf(s.type); - } catch { + } catch (_e) { throw new Error( `Validation of property "${s.key}" failed. Expected type "${s.type}" but received "${typeof data[s.key]}".` ); diff --git a/packages/beacon-node/test/unit/monitoring/service.test.ts b/packages/beacon-node/test/unit/monitoring/service.test.ts index 43936ff1756d..0795a165538e 100644 --- a/packages/beacon-node/test/unit/monitoring/service.test.ts +++ b/packages/beacon-node/test/unit/monitoring/service.test.ts @@ -108,7 +108,6 @@ describe("monitoring / service", () => { expect(logger.info).toHaveBeenCalledWith( "Started monitoring service", // TODO: Debug why `expect.any` causing type error - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment expect.objectContaining({interval: expect.any(Number), machine: null, remote: expect.any(String)}) ); }); diff --git a/packages/beacon-node/test/unit/network/beaconBlocksMaybeBlobsByRange.test.ts b/packages/beacon-node/test/unit/network/beaconBlocksMaybeBlobsByRange.test.ts index d1dc7ba57fa9..dda4959c7b3e 100644 --- a/packages/beacon-node/test/unit/network/beaconBlocksMaybeBlobsByRange.test.ts +++ b/packages/beacon-node/test/unit/network/beaconBlocksMaybeBlobsByRange.test.ts @@ -17,7 +17,6 @@ describe("beaconBlocksMaybeBlobsByRange", () => { const peerId = "Qma9T5YraSnpRDZqRR4krcSJabThc8nwZuJV3LercPHufi"; - /* eslint-disable @typescript-eslint/naming-convention */ const chainConfig = createChainForkConfig({ ...defaultChainConfig, ALTAIR_FORK_EPOCH: 0, diff --git a/packages/beacon-node/test/unit/network/peers/priorization.test.ts b/packages/beacon-node/test/unit/network/peers/priorization.test.ts index 3ec770051275..cc9ef9b7d711 100644 --- a/packages/beacon-node/test/unit/network/peers/priorization.test.ts +++ b/packages/beacon-node/test/unit/network/peers/priorization.test.ts @@ -14,7 +14,6 @@ import {RequestedSubnet} from "../../../../src/network/peers/utils/index.js"; type Result = ReturnType; -// eslint-disable-next-line vitest/valid-describe-callback describe("network / peers / priorization", async () => { const peers: PeerId[] = []; for (let i = 0; i < 8; i++) { @@ -264,7 +263,6 @@ describe("network / peers / priorization", async () => { } }); -// eslint-disable-next-line vitest/valid-describe-callback describe("sortPeersToPrune", async function () { const peers: PeerId[] = []; for (let i = 0; i < 8; i++) { diff --git a/packages/beacon-node/test/unit/network/peers/score.test.ts b/packages/beacon-node/test/unit/network/peers/score.test.ts index df842f9a1310..54cb721a4c21 100644 --- a/packages/beacon-node/test/unit/network/peers/score.test.ts +++ b/packages/beacon-node/test/unit/network/peers/score.test.ts @@ -24,7 +24,6 @@ describe("simple block provider score tracking", function () { const MIN_SCORE = -100; const actionName = "test-action"; - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type function mockStore() { const scoreStore = new PeerRpcScoreStore(); const peerScores = scoreStore["scores"] as MapDef; diff --git a/packages/beacon-node/test/unit/network/subnets/attnetsService.test.ts b/packages/beacon-node/test/unit/network/subnets/attnetsService.test.ts index 0c7b3df98268..cf9345172083 100644 --- a/packages/beacon-node/test/unit/network/subnets/attnetsService.test.ts +++ b/packages/beacon-node/test/unit/network/subnets/attnetsService.test.ts @@ -26,7 +26,6 @@ describe("AttnetsService", () => { "be" ); const ALTAIR_FORK_EPOCH = 100; - // eslint-disable-next-line @typescript-eslint/naming-convention const config = createBeaconConfig({ALTAIR_FORK_EPOCH}, ZERO_HASH); // const {SECONDS_PER_SLOT} = config; let service: AttnetsService; diff --git a/packages/beacon-node/test/unit/sync/backfill/verify.test.ts b/packages/beacon-node/test/unit/sync/backfill/verify.test.ts index 08ffdc4c3b02..3d1a2cd7e7e5 100644 --- a/packages/beacon-node/test/unit/sync/backfill/verify.test.ts +++ b/packages/beacon-node/test/unit/sync/backfill/verify.test.ts @@ -12,7 +12,6 @@ import {BackfillSyncErrorCode, BackfillSyncError} from "./../../../../src/sync/b // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); describe("backfill sync - verify block sequence", function () { @@ -43,7 +42,9 @@ describe("backfill sync - verify block sequence", function () { const {error} = verifyBlockSequence( beaconConfig, // remove middle block - blocks.filter((b) => b.data.message.slot !== 2).slice(0, blocks.length - 2), + blocks + .filter((b) => b.data.message.slot !== 2) + .slice(0, blocks.length - 2), blocks[blocks.length - 1].data.message.parentRoot ); if (error != null) throw new BackfillSyncError({code: error}); diff --git a/packages/beacon-node/test/unit/sync/range/chain.test.ts b/packages/beacon-node/test/unit/sync/range/chain.test.ts index 44d5cc7c173a..658f950b2c18 100644 --- a/packages/beacon-node/test/unit/sync/range/chain.test.ts +++ b/packages/beacon-node/test/unit/sync/range/chain.test.ts @@ -72,7 +72,7 @@ describe("sync / range / chain", () => { } }; - const downloadBeaconBlocksByRange: SyncChainFns["downloadBeaconBlocksByRange"] = async (peerId, request) => { + const downloadBeaconBlocksByRange: SyncChainFns["downloadBeaconBlocksByRange"] = async (_peerId, request) => { const blocks: BlockInput[] = []; for (let i = request.startSlot; i < request.startSlot + request.count; i += request.step) { if (skippedSlots?.has(i)) { @@ -124,7 +124,7 @@ describe("sync / range / chain", () => { const peers = [peer]; const processChainSegment: SyncChainFns["processChainSegment"] = async () => {}; - const downloadBeaconBlocksByRange: SyncChainFns["downloadBeaconBlocksByRange"] = async (peer, request) => { + const downloadBeaconBlocksByRange: SyncChainFns["downloadBeaconBlocksByRange"] = async (_peer, request) => { const blocks: BlockInput[] = []; for (let i = request.startSlot; i < request.startSlot + request.count; i += request.step) { blocks.push( diff --git a/packages/beacon-node/test/unit/sync/unknownBlock.test.ts b/packages/beacon-node/test/unit/sync/unknownBlock.test.ts index f6791fc29e9c..4805bd123898 100644 --- a/packages/beacon-node/test/unit/sync/unknownBlock.test.ts +++ b/packages/beacon-node/test/unit/sync/unknownBlock.test.ts @@ -22,7 +22,6 @@ import {ZERO_HASH} from "../../../src/constants/constants.js"; describe("sync by UnknownBlockSync", () => { const logger = testLogger(); const slotSec = 0.3; - // eslint-disable-next-line @typescript-eslint/naming-convention const config = createChainForkConfig({...minimalConfig, SECONDS_PER_SLOT: slotSec}); beforeEach(() => { @@ -119,11 +118,13 @@ describe("sync by UnknownBlockSync", () => { ]); let reportPeerResolveFn: (value: Parameters) => void; - const reportPeerPromise = new Promise>((r) => (reportPeerResolveFn = r)); + const reportPeerPromise = new Promise>((r) => { + reportPeerResolveFn = r; + }); let sendBeaconBlocksByRootResolveFn: (value: Parameters) => void; - const sendBeaconBlocksByRootPromise = new Promise>( - (r) => (sendBeaconBlocksByRootResolveFn = r) - ); + const sendBeaconBlocksByRootPromise = new Promise>((r) => { + sendBeaconBlocksByRootResolveFn = r; + }); const network: Partial = { events: new NetworkEventBus(), @@ -157,8 +158,12 @@ describe("sync by UnknownBlockSync", () => { let blockAResolver: () => void; let blockCResolver: () => void; - const blockAProcessed = new Promise((resolve) => (blockAResolver = resolve)); - const blockCProcessed = new Promise((resolve) => (blockCResolver = resolve)); + const blockAProcessed = new Promise((resolve) => { + blockAResolver = resolve; + }); + const blockCProcessed = new Promise((resolve) => { + blockCResolver = resolve; + }); const chain: Partial = { clock: new ClockStopped(0), diff --git a/packages/beacon-node/test/unit/util/kzg.test.ts b/packages/beacon-node/test/unit/util/kzg.test.ts index e170aed1a2de..13cea96d87a6 100644 --- a/packages/beacon-node/test/unit/util/kzg.test.ts +++ b/packages/beacon-node/test/unit/util/kzg.test.ts @@ -31,7 +31,6 @@ describe("C-KZG", () => { expect(ckzg.verifyBlobKzgProofBatch(blobs, commitments, proofs)).toBe(true); }); - /* eslint-disable @typescript-eslint/naming-convention */ it("BlobSidecars", async () => { const chainConfig = createChainForkConfig({ ...defaultChainConfig, @@ -67,7 +66,7 @@ describe("C-KZG", () => { blobSidecars.forEach(async (blobSidecar) => { try { await validateGossipBlobSidecar(chain, blobSidecar, blobSidecar.index); - } catch (error) { + } catch (_e) { // We expect some error from here // console.log(error); } diff --git a/packages/beacon-node/test/utils/clock.ts b/packages/beacon-node/test/utils/clock.ts index ea14c866c1b0..390d7dd095dd 100644 --- a/packages/beacon-node/test/utils/clock.ts +++ b/packages/beacon-node/test/utils/clock.ts @@ -4,11 +4,14 @@ import {Slot, Epoch} from "@lodestar/types"; import {IClock} from "../../src/util/clock.js"; export class ClockStatic extends EventEmitter implements IClock { + genesisTime: number; + constructor( readonly currentSlot: Slot, - public genesisTime = 0 + genesisTime = 0 ) { super(); + this.genesisTime = genesisTime; } get currentEpoch(): Epoch { diff --git a/packages/beacon-node/test/utils/config.ts b/packages/beacon-node/test/utils/config.ts index 2aad1c14c03e..f5d566560b65 100644 --- a/packages/beacon-node/test/utils/config.ts +++ b/packages/beacon-node/test/utils/config.ts @@ -6,7 +6,6 @@ import {ZERO_HASH} from "../../src/constants/index.js"; /** default config with ZERO_HASH as genesisValidatorsRoot */ export const config = createBeaconConfig(chainConfig, ZERO_HASH); -/* eslint-disable @typescript-eslint/naming-convention */ export function getConfig(fork: ForkName, forkEpoch = 0): ChainForkConfig { switch (fork) { case ForkName.phase0: diff --git a/packages/beacon-node/test/utils/node/simTest.ts b/packages/beacon-node/test/utils/node/simTest.ts index e94c32cefb10..7b771b8534ed 100644 --- a/packages/beacon-node/test/utils/node/simTest.ts +++ b/packages/beacon-node/test/utils/node/simTest.ts @@ -112,7 +112,7 @@ function avg(arr: number[]): number { /** * Print a table grid of (Y) epoch / (X) slot_per_epoch */ -function printEpochSlotGrid(map: Map, config: BeaconConfig, title: string): void { +function printEpochSlotGrid(map: Map, _config: BeaconConfig, title: string): void { const lastSlot = Array.from(map.keys())[map.size - 1]; const lastEpoch = computeEpochAtSlot(lastSlot); const rowsByEpochBySlot = linspace(0, lastEpoch).map((epoch) => { @@ -132,7 +132,7 @@ function printEpochGrid(maps: Record>, title: string) return epoch > max ? epoch : max; }, 0); const epochGrid = linspace(0, lastEpoch).map((epoch) => - mapValues(maps, (val, key) => formatValue(maps[key].get(epoch))) + mapValues(maps, (_val, key) => formatValue(maps[key].get(epoch))) ); console.log(renderTitle(title)); console.table(epochGrid); diff --git a/packages/beacon-node/test/utils/runEl.ts b/packages/beacon-node/test/utils/runEl.ts index 9adf1a83c151..f7a2b2f52e58 100644 --- a/packages/beacon-node/test/utils/runEl.ts +++ b/packages/beacon-node/test/utils/runEl.ts @@ -7,7 +7,6 @@ import {Eth1Provider} from "../../src/index.js"; import {ZERO_HASH} from "../../src/constants/index.js"; import {shell} from "../sim/shell.js"; -/* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable no-console */ let txRpcId = 1; @@ -84,7 +83,7 @@ async function waitForELOnline(url: string, signal: AbortSignal): Promise console.log("Waiting for few seconds for EL to fully setup, for e.g. unlock the account..."); await sleep(5000, signal); return; // Done - } catch (e) { + } catch (_e) { await sleep(1000, signal); } } diff --git a/packages/beacon-node/test/utils/validationData/aggregateAndProof.ts b/packages/beacon-node/test/utils/validationData/aggregateAndProof.ts index 45adfec433e4..462502719134 100644 --- a/packages/beacon-node/test/utils/validationData/aggregateAndProof.ts +++ b/packages/beacon-node/test/utils/validationData/aggregateAndProof.ts @@ -1,7 +1,6 @@ import {computeSigningRoot} from "@lodestar/state-transition"; import {DOMAIN_AGGREGATE_AND_PROOF, DOMAIN_SELECTION_PROOF} from "@lodestar/params"; import {phase0, ssz} from "@lodestar/types"; -// eslint-disable-next-line import/no-relative-packages import {getSecretKeyFromIndexCached} from "../../../../state-transition/test/perf/util.js"; import {IBeaconChain} from "../../../src/chain/index.js"; import {SeenAggregators} from "../../../src/chain/seenCache/index.js"; diff --git a/packages/beacon-node/test/utils/validationData/attestation.ts b/packages/beacon-node/test/utils/validationData/attestation.ts index 22f551cbb663..6715512ac667 100644 --- a/packages/beacon-node/test/utils/validationData/attestation.ts +++ b/packages/beacon-node/test/utils/validationData/attestation.ts @@ -6,7 +6,6 @@ import {phase0, Slot, ssz} from "@lodestar/types"; import { generateTestCachedBeaconStateOnlyValidators, getSecretKeyFromIndexCached, - // eslint-disable-next-line import/no-relative-packages } from "../../../../state-transition/test/perf/util.js"; import {IBeaconChain} from "../../../src/chain/index.js"; import {IStateRegenerator} from "../../../src/chain/regen/index.js"; diff --git a/packages/cli/docsgen/markdown.ts b/packages/cli/docsgen/markdown.ts index 5c3033e9c0df..9c7a4d0ca279 100644 --- a/packages/cli/docsgen/markdown.ts +++ b/packages/cli/docsgen/markdown.ts @@ -117,7 +117,6 @@ function renderOption(optionName: string, option: CliOptionDefinition): string | defaultValue = `"${defaultValue}"`; } if (option.type === "array") { - // eslint-disable-next-line quotes if (!defaultValue.includes(`"`)) { defaultValue = `"${defaultValue}"`; } diff --git a/packages/cli/package.json b/packages/cli/package.json index a5527a8eee87..b4fc206e5a44 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -28,8 +28,8 @@ "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\" lodestar --help", "check-types": "tsc", "docs:build": "node --loader ts-node/esm ./docsgen/index.ts", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test:unit": "vitest --run --dir test/unit/", "test:e2e": "vitest --run --config vitest.e2e.config.ts --dir test/e2e/", "test:sim:multifork": "LODESTAR_PRESET=minimal DOTENV_CONFIG_PATH=../../.env.test node -r dotenv/config --loader ts-node/esm test/sim/multiFork.test.ts", diff --git a/packages/cli/src/applyPreset.ts b/packages/cli/src/applyPreset.ts index 25f78b7d32ac..e40ac98841c0 100644 --- a/packages/cli/src/applyPreset.ts +++ b/packages/cli/src/applyPreset.ts @@ -1,8 +1,6 @@ // MUST import this file first before anything and not import any Lodestar code. -// eslint-disable-next-line no-restricted-imports import {hasher} from "@chainsafe/persistent-merkle-tree/lib/hasher/as-sha256.js"; -// eslint-disable-next-line no-restricted-imports import {setHasher} from "@chainsafe/persistent-merkle-tree/lib/hasher/index.js"; // without setting this first, persistent-merkle-tree will use noble instead @@ -45,7 +43,6 @@ else if (network) { if (network === "dev") { process.env.LODESTAR_PRESET = "minimal"; // "c-kzg" has hardcoded the mainnet value, do not use presets - // eslint-disable-next-line @typescript-eslint/naming-convention setActivePreset(PresetName.minimal, {FIELD_ELEMENTS_PER_BLOB: 4096}); } else if (network === "gnosis" || network === "chiado") { process.env.LODESTAR_PRESET = "gnosis"; @@ -57,7 +54,6 @@ else if (process.argv[2] === "dev") { process.env.LODESTAR_PRESET = "minimal"; process.env.LODESTAR_NETWORK = "dev"; // "c-kzg" has hardcoded the mainnet value, do not use presets - // eslint-disable-next-line @typescript-eslint/naming-convention setActivePreset(PresetName.minimal, {FIELD_ELEMENTS_PER_BLOB: 4096}); } diff --git a/packages/cli/src/cmds/beacon/handler.ts b/packages/cli/src/cmds/beacon/handler.ts index d51af66e37d0..ea424e04824a 100644 --- a/packages/cli/src/cmds/beacon/handler.ts +++ b/packages/cli/src/cmds/beacon/handler.ts @@ -158,7 +158,6 @@ export async function beaconHandler(args: BeaconArgs & GlobalArgs): Promise = { string: true, coerce: (urls: string[]): string[] => // Parse ["url1,url2"] to ["url1", "url2"] - urls.map((item) => item.split(",")).flat(1), + urls + .map((item) => item.split(",")) + .flat(1), alias: ["server"], // for backwards compatibility }, diff --git a/packages/cli/src/cmds/validator/voluntaryExit.ts b/packages/cli/src/cmds/validator/voluntaryExit.ts index 02f1591b59ed..c3982d8d45ee 100644 --- a/packages/cli/src/cmds/validator/voluntaryExit.ts +++ b/packages/cli/src/cmds/validator/voluntaryExit.ts @@ -203,7 +203,6 @@ function selectSignersToExit(args: VoluntaryExitArgs, signers: Signer[]): Signer } } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type async function resolveValidatorIndexes(client: ApiClient, signersToExit: SignerPubkey[]) { const pubkeys = signersToExit.map(({pubkey}) => pubkey); diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 5cdccbacfeec..0d509af17ab0 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -14,7 +14,6 @@ void lodestar // Show command help message when no command is provided if (msg.includes("Not enough non-option arguments")) { yarg.showHelp(); - // eslint-disable-next-line no-console console.log("\n"); } } @@ -22,7 +21,6 @@ void lodestar const errorMessage = err !== undefined ? (err instanceof YargsError ? err.message : err.stack) : msg || "Unknown error"; - // eslint-disable-next-line no-console console.error(` ✖ ${errorMessage}\n`); process.exit(1); }) diff --git a/packages/cli/src/networks/index.ts b/packages/cli/src/networks/index.ts index 0831b78cd2f6..ba42cf4c7798 100644 --- a/packages/cli/src/networks/index.ts +++ b/packages/cli/src/networks/index.ts @@ -109,7 +109,6 @@ export async function getNetworkBootnodes(network: NetworkName): Promise persistInvalidSszObjectsDir: undefined as any, proposerBoost: args["chain.proposerBoost"], proposerBoostReorg: args["chain.proposerBoostReorg"], diff --git a/packages/cli/src/options/beaconNodeOptions/eth1.ts b/packages/cli/src/options/beaconNodeOptions/eth1.ts index 46654cca6b2e..c558bda61b4e 100644 --- a/packages/cli/src/options/beaconNodeOptions/eth1.ts +++ b/packages/cli/src/options/beaconNodeOptions/eth1.ts @@ -59,7 +59,9 @@ export const options: CliCommandOptions = { string: true, coerce: (urls: string[]): string[] => // Parse ["url1,url2"] to ["url1", "url2"] - urls.map((item) => item.split(",")).flat(1), + urls + .map((item) => item.split(",")) + .flat(1), group: "eth1", }, diff --git a/packages/cli/src/options/beaconNodeOptions/execution.ts b/packages/cli/src/options/beaconNodeOptions/execution.ts index 85b81a5e708b..d60a621d1cdb 100644 --- a/packages/cli/src/options/beaconNodeOptions/execution.ts +++ b/packages/cli/src/options/beaconNodeOptions/execution.ts @@ -45,7 +45,9 @@ export const options: CliCommandOptions = { string: true, coerce: (urls: string[]): string[] => // Parse ["url1,url2"] to ["url1", "url2"] - urls.map((item) => item.split(",")).flat(1), + urls + .map((item) => item.split(",")) + .flat(1), group: "execution", }, diff --git a/packages/cli/src/options/beaconNodeOptions/network.ts b/packages/cli/src/options/beaconNodeOptions/network.ts index bfe9c7710e86..fc13f3293c29 100644 --- a/packages/cli/src/options/beaconNodeOptions/network.ts +++ b/packages/cli/src/options/beaconNodeOptions/network.ts @@ -57,18 +57,17 @@ function validateMultiaddrArg>(args } } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function parseListenArgs(args: NetworkArgs) { // If listenAddress is explicitly set, use it // If listenAddress6 is not set, use defaultListenAddress const listenAddress = args.listenAddress ?? (args.listenAddress6 ? undefined : defaultListenAddress); - const port = listenAddress ? args.port ?? defaultP2pPort : undefined; - const discoveryPort = listenAddress ? args.discoveryPort ?? args.port ?? defaultP2pPort : undefined; + const port = listenAddress ? (args.port ?? defaultP2pPort) : undefined; + const discoveryPort = listenAddress ? (args.discoveryPort ?? args.port ?? defaultP2pPort) : undefined; // Only use listenAddress6 if it is explicitly set const listenAddress6 = args.listenAddress6; - const port6 = listenAddress6 ? args.port6 ?? defaultP2pPort6 : undefined; - const discoveryPort6 = listenAddress6 ? args.discoveryPort6 ?? args.port6 ?? defaultP2pPort6 : undefined; + const port6 = listenAddress6 ? (args.port6 ?? defaultP2pPort6) : undefined; + const discoveryPort6 = listenAddress6 ? (args.discoveryPort6 ?? args.port6 ?? defaultP2pPort6) : undefined; return {listenAddress, port, discoveryPort, listenAddress6, port6, discoveryPort6}; } @@ -115,7 +114,7 @@ export function parseArgs(args: NetworkArgs): IBeaconNodeOptions["network"] { for (const enrStr of bootEnrs) { try { ENR.decodeTxt(enrStr); - } catch (e) { + } catch (_e) { throw new YargsError(`Provided ENR in bootnodes is invalid:\n ${enrStr}`); } } @@ -129,7 +128,7 @@ export function parseArgs(args: NetworkArgs): IBeaconNodeOptions["network"] { ip6: bindMu6, }, bootEnrs, - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: enr: undefined as any, } : null, diff --git a/packages/cli/src/util/file.ts b/packages/cli/src/util/file.ts index 99e93a96dc59..5415cf2affa6 100644 --- a/packages/cli/src/util/file.ts +++ b/packages/cli/src/util/file.ts @@ -13,7 +13,6 @@ export const yamlSchema = FAILSAFE_SCHEMA.extend({ new Type("tag:yaml.org,2002:str", { kind: "scalar", construct: function construct(data) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return return data !== null ? data : ""; }, }), diff --git a/packages/cli/src/util/gitData/gitDataPath.ts b/packages/cli/src/util/gitData/gitDataPath.ts index e243ca433f2d..1ad3104aafc6 100644 --- a/packages/cli/src/util/gitData/gitDataPath.ts +++ b/packages/cli/src/util/gitData/gitDataPath.ts @@ -4,7 +4,6 @@ import {fileURLToPath} from "node:url"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); // Persist git data and distribute through NPM so CLI consumers can know exactly diff --git a/packages/cli/src/util/gitData/index.ts b/packages/cli/src/util/gitData/index.ts index 96c5e4bbaef2..0720d39d9e30 100644 --- a/packages/cli/src/util/gitData/index.ts +++ b/packages/cli/src/util/gitData/index.ts @@ -11,7 +11,7 @@ export function readAndGetGitData(): GitData { let persistedGitData: Partial; try { persistedGitData = readGitDataFile(); - } catch (e) { + } catch (_e) { persistedGitData = {}; } @@ -23,13 +23,13 @@ export function readAndGetGitData(): GitData { branch: currentGitData.branch && currentGitData.branch.length > 0 ? currentGitData.branch - : persistedGitData.branch ?? "", + : (persistedGitData.branch ?? ""), commit: currentGitData.commit && currentGitData.commit.length > 0 ? currentGitData.commit - : persistedGitData.commit ?? "", + : (persistedGitData.commit ?? ""), }; - } catch (e) { + } catch (_e) { return { branch: "", commit: "", @@ -49,7 +49,7 @@ export function getGitData(): GitData { function getBranch(): string { try { return shellSilent("git rev-parse --abbrev-ref HEAD"); - } catch (e) { + } catch (_e) { return ""; } } @@ -58,7 +58,7 @@ function getBranch(): string { function getCommit(): string { try { return shellSilent("git rev-parse --verify HEAD"); - } catch (e) { + } catch (_e) { return ""; } } diff --git a/packages/cli/src/util/object.ts b/packages/cli/src/util/object.ts index d37f41ea6655..7f2e8a49d6c8 100644 --- a/packages/cli/src/util/object.ts +++ b/packages/cli/src/util/object.ts @@ -3,10 +3,10 @@ import {RecursivePartial} from "@lodestar/utils"; /** * Removes (mutates) all properties with a value === undefined, recursively */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any + +// biome-ignore lint/suspicious/noExplicitAny: export function removeUndefinedRecursive(obj: T): RecursivePartial { for (const key of Object.keys(obj)) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const value = obj[key]; if (value && typeof value === "object") removeUndefinedRecursive(value); else if (value === undefined) delete obj[key]; diff --git a/packages/cli/src/util/process.ts b/packages/cli/src/util/process.ts index cd040bdffb55..e274d782b8ba 100644 --- a/packages/cli/src/util/process.ts +++ b/packages/cli/src/util/process.ts @@ -8,7 +8,6 @@ const exitSignals = ["SIGTERM", "SIGINT"] as NodeJS.Signals[]; */ export function onGracefulShutdown( cleanUpFunction: () => Promise, - // eslint-disable-next-line no-console logFn: (msg: string) => void = console.log ): void { for (const signal of exitSignals) { diff --git a/packages/cli/src/util/proposerConfig.ts b/packages/cli/src/util/proposerConfig.ts index 509dc8213df1..2c12ce8f8524 100644 --- a/packages/cli/src/util/proposerConfig.ts +++ b/packages/cli/src/util/proposerConfig.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ - import fs from "node:fs"; import path from "node:path"; import {ValidatorProposerConfig} from "@lodestar/validator"; diff --git a/packages/cli/src/util/types.ts b/packages/cli/src/util/types.ts index ced3bf34b1f6..bf194170f3e2 100644 --- a/packages/cli/src/util/types.ts +++ b/packages/cli/src/util/types.ts @@ -1,7 +1,8 @@ /** * Typed `Object.keys(o: T)` function, returning `(keyof T)[]` */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/naming-convention + +// biome-ignore lint/suspicious/noExplicitAny: export function ObjectKeys(o: T): (keyof T)[] { return Object.keys(o); } diff --git a/packages/cli/src/util/version.ts b/packages/cli/src/util/version.ts index 4752856e5b1d..624412107603 100644 --- a/packages/cli/src/util/version.ts +++ b/packages/cli/src/util/version.ts @@ -6,7 +6,6 @@ import {readAndGetGitData} from "./gitData/index.js"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); type VersionJson = { diff --git a/packages/cli/test/e2e/importKeystoresFromApi.test.ts b/packages/cli/test/e2e/importKeystoresFromApi.test.ts index b7abe1e8d293..584ded47bfdd 100644 --- a/packages/cli/test/e2e/importKeystoresFromApi.test.ts +++ b/packages/cli/test/e2e/importKeystoresFromApi.test.ts @@ -30,7 +30,6 @@ describe("import keystores from api", function () { const genesisValidatorsRoot = "0x0000000000000000000000000000000000000000000000000000000000000000"; const slashingProtection: Interchange = { - /* eslint-disable @typescript-eslint/naming-convention */ metadata: { interchange_format_version: "5", genesis_validators_root: genesisValidatorsRoot, diff --git a/packages/cli/test/e2e/propserConfigfromKeymanager.test.ts b/packages/cli/test/e2e/propserConfigfromKeymanager.test.ts index ffeb40460f40..6a6c391b4014 100644 --- a/packages/cli/test/e2e/propserConfigfromKeymanager.test.ts +++ b/packages/cli/test/e2e/propserConfigfromKeymanager.test.ts @@ -39,7 +39,6 @@ describe("import keystores from api, test DefaultProposerConfig", function () { const genesisValidatorsRoot = "0x0000000000000000000000000000000000000000000000000000000000000000"; const slashingProtection: Interchange = { - /* eslint-disable @typescript-eslint/naming-convention */ metadata: { interchange_format_version: "5", genesis_validators_root: genesisValidatorsRoot, diff --git a/packages/cli/test/e2e/voluntaryExit.test.ts b/packages/cli/test/e2e/voluntaryExit.test.ts index 49499e891731..25d4ab345aa7 100644 --- a/packages/cli/test/e2e/voluntaryExit.test.ts +++ b/packages/cli/test/e2e/voluntaryExit.test.ts @@ -79,7 +79,6 @@ describe("voluntaryExit cmd", function () { if (validator.status !== "active_exiting") { throw Error("Validator not exiting"); } else { - // eslint-disable-next-line no-console console.log(`Confirmed validator ${pubkey} = ${validator.status}`); } }, diff --git a/packages/cli/test/e2e/voluntaryExitFromApi.test.ts b/packages/cli/test/e2e/voluntaryExitFromApi.test.ts index 664091d5c520..21a9c0fc6872 100644 --- a/packages/cli/test/e2e/voluntaryExitFromApi.test.ts +++ b/packages/cli/test/e2e/voluntaryExitFromApi.test.ts @@ -86,7 +86,6 @@ describe("voluntary exit from api", function () { if (validator.status !== "active_exiting") { throw Error("Validator not exiting"); } else { - // eslint-disable-next-line no-console console.log(`Confirmed validator ${pubkeyToExit} = ${validator.status}`); } }, diff --git a/packages/cli/test/e2e/voluntaryExitRemoteSigner.test.ts b/packages/cli/test/e2e/voluntaryExitRemoteSigner.test.ts index a9cf2f48a168..8cb5f0d44d95 100644 --- a/packages/cli/test/e2e/voluntaryExitRemoteSigner.test.ts +++ b/packages/cli/test/e2e/voluntaryExitRemoteSigner.test.ts @@ -101,7 +101,6 @@ describe("voluntaryExit using remote signer", function () { if (validator.status !== "active_exiting") { throw Error("Validator not exiting"); } else { - // eslint-disable-next-line no-console console.log(`Confirmed validator ${pubkey} = ${validator.status}`); } }, diff --git a/packages/cli/test/scripts/e2e_test_env.ts b/packages/cli/test/scripts/e2e_test_env.ts index 24d0142827a8..fcecfac5e1c7 100644 --- a/packages/cli/test/scripts/e2e_test_env.ts +++ b/packages/cli/test/scripts/e2e_test_env.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import path from "node:path"; import {BeaconClient, ExecutionClient} from "../utils/crucible/interfaces.js"; import {Simulation} from "../utils/crucible/simulation.js"; diff --git a/packages/cli/test/sim/backupEthProvider.test.ts b/packages/cli/test/sim/backupEthProvider.test.ts index 1310119c9c3e..4ccc131a58bc 100644 --- a/packages/cli/test/sim/backupEthProvider.test.ts +++ b/packages/cli/test/sim/backupEthProvider.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import path from "node:path"; import {activePreset} from "@lodestar/params"; import {Simulation} from "../utils/crucible/simulation.js"; diff --git a/packages/cli/test/sim/deneb.test.ts b/packages/cli/test/sim/deneb.test.ts index b9c30a5ff523..865540ae7635 100644 --- a/packages/cli/test/sim/deneb.test.ts +++ b/packages/cli/test/sim/deneb.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import path from "node:path"; import {Simulation} from "../utils/crucible/simulation.js"; import {BeaconClient, ExecutionClient, ValidatorClient} from "../utils/crucible/interfaces.js"; diff --git a/packages/cli/test/sim/endpoints.test.ts b/packages/cli/test/sim/endpoints.test.ts index 6a119fc219d7..308ac6a0053c 100644 --- a/packages/cli/test/sim/endpoints.test.ts +++ b/packages/cli/test/sim/endpoints.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import path from "node:path"; import assert from "node:assert"; import {toHexString} from "@chainsafe/ssz"; diff --git a/packages/cli/test/sim/mixedClient.test.ts b/packages/cli/test/sim/mixedClient.test.ts index bfb2a5a99b1b..45029a1b26b4 100644 --- a/packages/cli/test/sim/mixedClient.test.ts +++ b/packages/cli/test/sim/mixedClient.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import path from "node:path"; import {Simulation} from "../utils/crucible/simulation.js"; import {nodeAssertion} from "../utils/crucible/assertions/nodeAssertion.js"; diff --git a/packages/cli/test/sim/multiFork.test.ts b/packages/cli/test/sim/multiFork.test.ts index 47ad59a165b6..047d9196239d 100644 --- a/packages/cli/test/sim/multiFork.test.ts +++ b/packages/cli/test/sim/multiFork.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import path from "node:path"; import {Match, BeaconClient, ExecutionClient, ValidatorClient} from "../utils/crucible/interfaces.js"; import {Simulation} from "../utils/crucible/simulation.js"; diff --git a/packages/cli/test/unit/cmds/beacon.test.ts b/packages/cli/test/unit/cmds/beacon.test.ts index fc1f50ad1251..6e7b7f389a29 100644 --- a/packages/cli/test/unit/cmds/beacon.test.ts +++ b/packages/cli/test/unit/cmds/beacon.test.ts @@ -186,7 +186,6 @@ describe("initPeerIdAndEnr", () => { }); }); -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type async function runBeaconHandlerInit(args: Partial) { return beaconHandlerInit({ logLevel: LogLevel.info, diff --git a/packages/cli/test/unit/config/beaconParams.test.ts b/packages/cli/test/unit/config/beaconParams.test.ts index a7ce463200d0..2a78d498bf89 100644 --- a/packages/cli/test/unit/config/beaconParams.test.ts +++ b/packages/cli/test/unit/config/beaconParams.test.ts @@ -16,7 +16,6 @@ describe("config / beaconParams", () => { const testCases: { id: string; kwargs: Parameters[0]; - // eslint-disable-next-line @typescript-eslint/naming-convention GENESIS_FORK_VERSION: string; }[] = [ { @@ -24,7 +23,6 @@ describe("config / beaconParams", () => { kwargs: { additionalParamsCli: {}, }, - // eslint-disable-next-line @typescript-eslint/naming-convention GENESIS_FORK_VERSION: GENESIS_FORK_VERSION_MAINNET, }, { @@ -33,7 +31,6 @@ describe("config / beaconParams", () => { network: networkName, additionalParamsCli: {}, }, - // eslint-disable-next-line @typescript-eslint/naming-convention GENESIS_FORK_VERSION: GENESIS_FORK_VERSION_HOLESKY, }, { @@ -43,7 +40,6 @@ describe("config / beaconParams", () => { paramsFile: paramsFilepath, additionalParamsCli: {}, }, - // eslint-disable-next-line @typescript-eslint/naming-convention GENESIS_FORK_VERSION: GENESIS_FORK_VERSION_FILE, }, { @@ -51,16 +47,13 @@ describe("config / beaconParams", () => { kwargs: { network: networkName, paramsFile: paramsFilepath, - // eslint-disable-next-line @typescript-eslint/naming-convention additionalParamsCli: {GENESIS_FORK_VERSION: GENESIS_FORK_VERSION_CLI}, }, - // eslint-disable-next-line @typescript-eslint/naming-convention GENESIS_FORK_VERSION: GENESIS_FORK_VERSION_CLI, }, ]; beforeAll(() => { - // eslint-disable-next-line @typescript-eslint/naming-convention fs.writeFileSync(paramsFilepath, yaml.dump({GENESIS_FORK_VERSION: GENESIS_FORK_VERSION_FILE})); }); @@ -68,7 +61,6 @@ describe("config / beaconParams", () => { if (fs.existsSync(paramsFilepath)) fs.unlinkSync(paramsFilepath); }); - // eslint-disable-next-line @typescript-eslint/naming-convention it.each(testCases)("$id", ({kwargs, GENESIS_FORK_VERSION}) => { const params = getBeaconParams(kwargs); expect(toHexString(params.GENESIS_FORK_VERSION)).toBe(GENESIS_FORK_VERSION); diff --git a/packages/cli/test/unit/db.test.ts b/packages/cli/test/unit/db.test.ts index 1e19e514e9e5..b39c9492c9cb 100644 --- a/packages/cli/test/unit/db.test.ts +++ b/packages/cli/test/unit/db.test.ts @@ -1,7 +1,5 @@ import {describe, it} from "vitest"; -// eslint-disable-next-line import/no-relative-packages import {Bucket as BeaconBucket} from "../../../beacon-node/src/db/buckets.js"; -// eslint-disable-next-line import/no-relative-packages import {Bucket as ValidatorBucket} from "../../../validator/src/buckets.js"; describe("no db bucket overlap", () => { diff --git a/packages/cli/test/unit/options/paramsOptions.test.ts b/packages/cli/test/unit/options/paramsOptions.test.ts index a08c70008612..d6563203e652 100644 --- a/packages/cli/test/unit/options/paramsOptions.test.ts +++ b/packages/cli/test/unit/options/paramsOptions.test.ts @@ -11,9 +11,7 @@ describe("options / paramsOptions", () => { }; const expectedBeaconParams: Partial = { - // eslint-disable-next-line @typescript-eslint/naming-convention GENESIS_FORK_VERSION: "0x00000001", - // eslint-disable-next-line @typescript-eslint/naming-convention DEPOSIT_CONTRACT_ADDRESS: "0x1234567890123456789012345678901234567890", }; diff --git a/packages/cli/test/unit/util/format.test.ts b/packages/cli/test/unit/util/format.test.ts index c06259cc1842..194cc1dcbde7 100644 --- a/packages/cli/test/unit/util/format.test.ts +++ b/packages/cli/test/unit/util/format.test.ts @@ -17,8 +17,7 @@ describe("util / format / parseRange", () => { describe("util / format / isValidatePubkeyHex", () => { const testCases: Record = { - "../../malicious_link/0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95": - false, + "../../malicious_link/0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95": false, "0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95": true, "0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c9": false, "0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95f": false, diff --git a/packages/cli/test/unit/util/gitData.test.ts b/packages/cli/test/unit/util/gitData.test.ts index 206dd070b545..12a6b5b18339 100644 --- a/packages/cli/test/unit/util/gitData.test.ts +++ b/packages/cli/test/unit/util/gitData.test.ts @@ -8,7 +8,6 @@ import {getGitData} from "../../../src/util/index.js"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); describe("util / gitData", function () { diff --git a/packages/cli/test/unit/validator/parseProposerConfig.test.ts b/packages/cli/test/unit/validator/parseProposerConfig.test.ts index 66220ca3329a..83c8c63ef877 100644 --- a/packages/cli/test/unit/validator/parseProposerConfig.test.ts +++ b/packages/cli/test/unit/validator/parseProposerConfig.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import path from "node:path"; import {fileURLToPath} from "node:url"; import {describe, it, expect} from "vitest"; @@ -27,6 +26,7 @@ const testValue = { builder: { gasLimit: 35000000, selection: routes.validator.BuilderSelection.BuilderAlways, + // biome-ignore lint/correctness/noPrecisionLoss: boostFactor: BigInt(18446744073709551616), }, }, diff --git a/packages/cli/test/utils/crucible/clients/beacon/lighthouse.ts b/packages/cli/test/utils/crucible/clients/beacon/lighthouse.ts index 89802149024a..515418f7e558 100644 --- a/packages/cli/test/utils/crucible/clients/beacon/lighthouse.ts +++ b/packages/cli/test/utils/crucible/clients/beacon/lighthouse.ts @@ -109,7 +109,6 @@ export const generateLighthouseBeaconNode: BeaconNodeGenerator { - // eslint-disable-next-line no-console if (!silent) console.log("Waiting for start of slot", {target: slot, current: this.currentSlot}); const slotTime = this.getSlotTime(slot) * MS_IN_SEC - Date.now(); await sleep(slotTime, this.signal); diff --git a/packages/cli/test/utils/crucible/externalSignerServer.ts b/packages/cli/test/utils/crucible/externalSignerServer.ts index bd8576d214c2..4282f1761db9 100644 --- a/packages/cli/test/utils/crucible/externalSignerServer.ts +++ b/packages/cli/test/utils/crucible/externalSignerServer.ts @@ -29,7 +29,6 @@ export class ExternalSignerServer { return [...this.secretKeyMap.keys()]; }); - /* eslint-disable @typescript-eslint/naming-convention */ this.server.post<{ Params: { /** BLS public key as a hex string. */ diff --git a/packages/cli/test/utils/crucible/interfaces.ts b/packages/cli/test/utils/crucible/interfaces.ts index db4b1f3b8901..84b5043ba983 100644 --- a/packages/cli/test/utils/crucible/interfaces.ts +++ b/packages/cli/test/utils/crucible/interfaces.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {ChildProcess} from "node:child_process"; import {Web3} from "web3"; import {SecretKey} from "@chainsafe/blst"; diff --git a/packages/cli/test/utils/crucible/runner/dockerRunner.ts b/packages/cli/test/utils/crucible/runner/dockerRunner.ts index cfa52c9b9ebf..bc5b97811cf4 100644 --- a/packages/cli/test/utils/crucible/runner/dockerRunner.ts +++ b/packages/cli/test/utils/crucible/runner/dockerRunner.ts @@ -22,7 +22,7 @@ export class DockerRunner implements RunnerEnv { await execChildProcess(`docker network create --subnet ${dockerNetworkIpRange}.0/24 ${dockerNetworkName}`, { logger: this.logger, }); - } catch { + } catch (_e) { // During multiple sim tests files the network might already exist } } @@ -35,7 +35,7 @@ export class DockerRunner implements RunnerEnv { logger: this.logger, }); return; - } catch { + } catch (_e) { await sleep(5000); } } diff --git a/packages/cli/test/utils/crucible/simulationTracker.ts b/packages/cli/test/utils/crucible/simulationTracker.ts index e374d3b6c328..778a7ad2a771 100644 --- a/packages/cli/test/utils/crucible/simulationTracker.ts +++ b/packages/cli/test/utils/crucible/simulationTracker.ts @@ -68,7 +68,7 @@ async function pathExists(filePath: string): Promise { try { await fs.access(filePath); return true; - } catch { + } catch (_e) { return false; } } diff --git a/packages/cli/test/utils/crucible/utils/index.ts b/packages/cli/test/utils/crucible/utils/index.ts index 0b6ae1bba1e5..0e016778cdce 100644 --- a/packages/cli/test/utils/crucible/utils/index.ts +++ b/packages/cli/test/utils/crucible/utils/index.ts @@ -73,7 +73,6 @@ export function defineSimTestConfig( additionalSlots: opts.additionalSlotsForTTD ?? 2, }); - /* eslint-disable @typescript-eslint/naming-convention */ const forkConfig = createChainForkConfig({ ...opts, GENESIS_DELAY: genesisDelaySeconds, @@ -157,7 +156,7 @@ export const arrayGroupBy = ( ): Record => array.reduce( (acc, value, index, array) => { - (acc[predicate(value, index, array)] ||= []).push(value); + acc[predicate(value, index, array)]?.push(value); return acc; }, {} as {[key: string]: T[]} diff --git a/packages/cli/test/utils/crucible/utils/keys.ts b/packages/cli/test/utils/crucible/utils/keys.ts index 27983c04cd38..8915e85b529e 100644 --- a/packages/cli/test/utils/crucible/utils/keys.ts +++ b/packages/cli/test/utils/crucible/utils/keys.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {readFile, writeFile} from "node:fs/promises"; import path from "node:path"; import yaml from "js-yaml"; diff --git a/packages/cli/test/utils/crucible/utils/network.ts b/packages/cli/test/utils/crucible/utils/network.ts index e3555fc149b9..7f41b87aff04 100644 --- a/packages/cli/test/utils/crucible/utils/network.ts +++ b/packages/cli/test/utils/crucible/utils/network.ts @@ -74,7 +74,6 @@ export async function waitForNodeSync( } export async function waitForNodeSyncStatus(env: Simulation, node: NodePair): Promise { - // eslint-disable-next-line no-constant-condition while (true) { const result = (await node.beacon.api.node.getSyncingStatus()).value(); if (!result.isSyncing) { diff --git a/packages/cli/test/utils/crucible/utils/syncing.ts b/packages/cli/test/utils/crucible/utils/syncing.ts index 4a8913105335..d31575e74e5d 100644 --- a/packages/cli/test/utils/crucible/utils/syncing.ts +++ b/packages/cli/test/utils/crucible/utils/syncing.ts @@ -148,7 +148,9 @@ export async function assertUnknownBlockSync(env: Simulation): Promise { } catch (error) { if (!(error as Error).message.includes("BLOCK_ERROR_PARENT_UNKNOWN")) { env.tracker.record({ - message: `Publishing unknown block should return "BLOCK_ERROR_PARENT_UNKNOWN" got "${(error as Error).message}"`, + message: `Publishing unknown block should return "BLOCK_ERROR_PARENT_UNKNOWN" got "${ + (error as Error).message + }"`, slot: env.clock.currentSlot, assertionId: "unknownBlockParent", }); @@ -178,7 +180,6 @@ export async function waitForNodeSync( } export async function waitForNodeSyncStatus(env: Simulation, node: NodePair): Promise { - // eslint-disable-next-line no-constant-condition while (true) { const result = (await node.beacon.api.node.getSyncingStatus()).value(); if (!result.isSyncing) { diff --git a/packages/cli/test/utils/mockBeaconApiServer.ts b/packages/cli/test/utils/mockBeaconApiServer.ts index 80ce282e102c..e7e80338686f 100644 --- a/packages/cli/test/utils/mockBeaconApiServer.ts +++ b/packages/cli/test/utils/mockBeaconApiServer.ts @@ -5,7 +5,6 @@ import {ChainForkConfig} from "@lodestar/config"; import {config} from "@lodestar/config/default"; import {ssz} from "@lodestar/types"; import {fromHex, toHex} from "@lodestar/utils"; -// eslint-disable-next-line import/no-relative-packages import {testLogger} from "../../../beacon-node/test/utils/logger.js"; const ZERO_HASH_HEX = toHex(Buffer.alloc(32, 0)); diff --git a/packages/config/package.json b/packages/config/package.json index f257db65cf6e..434000db2a0f 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -47,8 +47,8 @@ "build:watch": "yarn run build --watch", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit", "test:unit": "yarn vitest --run --dir test/unit/", "check-readme": "typescript-docs-verifier" diff --git a/packages/config/src/chainConfig/configs/mainnet.ts b/packages/config/src/chainConfig/configs/mainnet.ts index e5792a87ac70..5da5f8d2acb0 100644 --- a/packages/config/src/chainConfig/configs/mainnet.ts +++ b/packages/config/src/chainConfig/configs/mainnet.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {fromHex as b} from "@lodestar/utils"; import {PresetName} from "@lodestar/params"; import {ChainConfig} from "../types.js"; diff --git a/packages/config/src/chainConfig/configs/minimal.ts b/packages/config/src/chainConfig/configs/minimal.ts index 53229d283511..f1a52e956f4d 100644 --- a/packages/config/src/chainConfig/configs/minimal.ts +++ b/packages/config/src/chainConfig/configs/minimal.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {fromHex as b} from "@lodestar/utils"; import {PresetName} from "@lodestar/params"; import {ChainConfig} from "../types.js"; diff --git a/packages/config/src/chainConfig/default.ts b/packages/config/src/chainConfig/default.ts index d778c9b82447..ef2b9743a1d2 100644 --- a/packages/config/src/chainConfig/default.ts +++ b/packages/config/src/chainConfig/default.ts @@ -10,9 +10,10 @@ switch (ACTIVE_PRESET) { defaultChainConfig = minimal; break; case PresetName.mainnet: - default: defaultChainConfig = mainnet; break; + default: + defaultChainConfig = mainnet; } export {defaultChainConfig}; diff --git a/packages/config/src/chainConfig/networks/chiado.ts b/packages/config/src/chainConfig/networks/chiado.ts index d96bd7510c65..096942af672c 100644 --- a/packages/config/src/chainConfig/networks/chiado.ts +++ b/packages/config/src/chainConfig/networks/chiado.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {fromHex as b} from "@lodestar/utils"; import {ChainConfig} from "../types.js"; import {gnosisChainConfig as gnosis} from "./gnosis.js"; diff --git a/packages/config/src/chainConfig/networks/ephemery.ts b/packages/config/src/chainConfig/networks/ephemery.ts index 6fefc1800bfc..d1c17c36f0ab 100644 --- a/packages/config/src/chainConfig/networks/ephemery.ts +++ b/packages/config/src/chainConfig/networks/ephemery.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {fromHex as b} from "@lodestar/utils"; import {ChainConfig} from "../types.js"; import {chainConfig as mainnet} from "../configs/mainnet.js"; diff --git a/packages/config/src/chainConfig/networks/gnosis.ts b/packages/config/src/chainConfig/networks/gnosis.ts index 2f58ffd4d045..a25162ae5028 100644 --- a/packages/config/src/chainConfig/networks/gnosis.ts +++ b/packages/config/src/chainConfig/networks/gnosis.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {fromHex as b} from "@lodestar/utils"; import {PresetName} from "@lodestar/params"; import {ChainConfig} from "../types.js"; diff --git a/packages/config/src/chainConfig/networks/holesky.ts b/packages/config/src/chainConfig/networks/holesky.ts index 16c462a9468e..46c32606931f 100644 --- a/packages/config/src/chainConfig/networks/holesky.ts +++ b/packages/config/src/chainConfig/networks/holesky.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {fromHex as b} from "@lodestar/utils"; import {ChainConfig} from "../types.js"; import {chainConfig as mainnet} from "../configs/mainnet.js"; diff --git a/packages/config/src/chainConfig/networks/mainnet.ts b/packages/config/src/chainConfig/networks/mainnet.ts index c137c578fc0e..13225b463da9 100644 --- a/packages/config/src/chainConfig/networks/mainnet.ts +++ b/packages/config/src/chainConfig/networks/mainnet.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {fromHex as b} from "@lodestar/utils"; import {ChainConfig} from "../types.js"; import {chainConfig as mainnet} from "../configs/mainnet.js"; diff --git a/packages/config/src/chainConfig/networks/sepolia.ts b/packages/config/src/chainConfig/networks/sepolia.ts index 39e72a24f3f6..e7e5dc76f691 100644 --- a/packages/config/src/chainConfig/networks/sepolia.ts +++ b/packages/config/src/chainConfig/networks/sepolia.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {fromHex as b} from "@lodestar/utils"; import {ChainConfig} from "../types.js"; import {chainConfig as mainnet} from "../configs/mainnet.js"; diff --git a/packages/config/src/chainConfig/types.ts b/packages/config/src/chainConfig/types.ts index 05fff02f2eaf..5c06b205c2f6 100644 --- a/packages/config/src/chainConfig/types.ts +++ b/packages/config/src/chainConfig/types.ts @@ -1,7 +1,5 @@ import {PresetName} from "@lodestar/params"; -/* eslint-disable @typescript-eslint/naming-convention */ - /** * Run-time chain configuration */ diff --git a/packages/config/test/unit/index.test.ts b/packages/config/test/unit/index.test.ts index a6fca7ad643a..bde31f6b1477 100644 --- a/packages/config/test/unit/index.test.ts +++ b/packages/config/test/unit/index.test.ts @@ -31,7 +31,6 @@ describe("forks", () => { }); it("correctly handle pre-genesis", () => { - // eslint-disable-next-line @typescript-eslint/naming-convention const postMergeTestnet = createForkConfig({...chainConfig, ALTAIR_FORK_EPOCH: 0, BELLATRIX_FORK_EPOCH: 0}); expect(postMergeTestnet.getForkName(-1)).toBe(ForkName.bellatrix); }); diff --git a/packages/db/package.json b/packages/db/package.json index 0e3a2c847d4b..2a10d36766bf 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -28,8 +28,8 @@ "build:release": "yarn clean && yarn run build", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit", "test:unit": "vitest --run --dir test/unit/", "check-readme": "typescript-docs-verifier" diff --git a/packages/db/src/abstractRepository.ts b/packages/db/src/abstractRepository.ts index e0462d162ddc..5d5b0763ba26 100644 --- a/packages/db/src/abstractRepository.ts +++ b/packages/db/src/abstractRepository.ts @@ -142,7 +142,7 @@ export abstract class Repository { async batchRemove(values: T[]): Promise { // handle single value in batchDelete - await this.batchDelete(Array.from({length: values.length}, (ignored, i) => this.getId(values[i]))); + await this.batchDelete(Array.from({length: values.length}, (_ignored, i) => this.getId(values[i]))); } async keys(opts?: FilterOptions): Promise { diff --git a/packages/db/test/unit/controller/level.test.ts b/packages/db/test/unit/controller/level.test.ts index 11ef0f929fda..16f20e770c93 100644 --- a/packages/db/test/unit/controller/level.test.ts +++ b/packages/db/test/unit/controller/level.test.ts @@ -137,7 +137,7 @@ describe("LevelDB controller", () => { if (res?.startsWith("Usage: gdu ")) { return "gdu"; } - } catch { + } catch (_e) { /* eslint-disable no-console */ console.error("Cannot find gdu command, falling back to du"); } diff --git a/packages/flare/package.json b/packages/flare/package.json index 3a11e9b49ebf..a08e5fe0edc1 100644 --- a/packages/flare/package.json +++ b/packages/flare/package.json @@ -41,8 +41,8 @@ "build:watch": "yarn run build --watch", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\" flare --help", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit", "test:unit": "vitest --run --dir test/unit/", "check-readme": "typescript-docs-verifier" diff --git a/packages/flare/src/index.ts b/packages/flare/src/index.ts index bc10fff9181c..5f3b85b459c1 100644 --- a/packages/flare/src/index.ts +++ b/packages/flare/src/index.ts @@ -12,7 +12,6 @@ void flare // Show command help message when no command is provided if (msg.includes("Not enough non-option arguments")) { yarg.showHelp(); - // eslint-disable-next-line no-console console.log("\n"); } } @@ -20,7 +19,6 @@ void flare const errorMessage = err !== undefined ? (err instanceof YargsError ? err.message : err.stack) : msg || "Unknown error"; - // eslint-disable-next-line no-console console.error(` ✖ ${errorMessage}\n`); process.exit(1); }) diff --git a/packages/fork-choice/package.json b/packages/fork-choice/package.json index 728036b365d3..2197ad90a9fd 100644 --- a/packages/fork-choice/package.json +++ b/packages/fork-choice/package.json @@ -29,8 +29,8 @@ "build:release": "yarn clean && yarn run build", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit", "test:unit": "vitest --run --dir test/unit/", "check-readme": "typescript-docs-verifier" diff --git a/packages/fork-choice/src/forkChoice/errors.ts b/packages/fork-choice/src/forkChoice/errors.ts index ea0c6305ba42..43d209106eed 100644 --- a/packages/fork-choice/src/forkChoice/errors.ts +++ b/packages/fork-choice/src/forkChoice/errors.ts @@ -95,8 +95,4 @@ export type ForkChoiceErrorType = | {code: ForkChoiceErrorCode.UNABLE_TO_SET_JUSTIFIED_CHECKPOINT; error: Error} | {code: ForkChoiceErrorCode.AFTER_BLOCK_FAILED; error: Error}; -export class ForkChoiceError extends LodestarError { - constructor(type: ForkChoiceErrorType) { - super(type); - } -} +export class ForkChoiceError extends LodestarError {} diff --git a/packages/fork-choice/src/forkChoice/forkChoice.ts b/packages/fork-choice/src/forkChoice/forkChoice.ts index 6ae3f52e7d3a..828a16725444 100644 --- a/packages/fork-choice/src/forkChoice/forkChoice.ts +++ b/packages/fork-choice/src/forkChoice/forkChoice.ts @@ -198,6 +198,7 @@ export class ForkChoice implements IForkChoice { return {head, isHeadTimely, notReorgedReason}; } case UpdateHeadOpt.GetCanonicialHead: + return {head: canonicialHeadBlock}; default: return {head: canonicialHeadBlock}; } @@ -413,7 +414,8 @@ export class ForkChoice implements IForkChoice { }); } - return (this.head = headNode); + this.head = headNode; + return this.head; } /** diff --git a/packages/fork-choice/src/forkChoice/store.ts b/packages/fork-choice/src/forkChoice/store.ts index d16e021529db..2cd4da512870 100644 --- a/packages/fork-choice/src/forkChoice/store.ts +++ b/packages/fork-choice/src/forkChoice/store.ts @@ -55,18 +55,22 @@ export class ForkChoiceStore implements IForkChoiceStore { private _finalizedCheckpoint: CheckpointWithHex; unrealizedFinalizedCheckpoint: CheckpointWithHex; equivocatingIndices = new Set(); + justifiedBalancesGetter: JustifiedBalancesGetter; + currentSlot: Slot; constructor( - public currentSlot: Slot, + currentSlot: Slot, justifiedCheckpoint: phase0.Checkpoint, finalizedCheckpoint: phase0.Checkpoint, justifiedBalances: EffectiveBalanceIncrements, - public justifiedBalancesGetter: JustifiedBalancesGetter, + justifiedBalancesGetter: JustifiedBalancesGetter, private readonly events?: { onJustified: (cp: CheckpointWithHex) => void; onFinalized: (cp: CheckpointWithHex) => void; } ) { + this.justifiedBalancesGetter = justifiedBalancesGetter; + this.currentSlot = currentSlot; const justified = { checkpoint: toCheckpointWithHex(justifiedCheckpoint), balances: justifiedBalances, diff --git a/packages/fork-choice/src/protoArray/errors.ts b/packages/fork-choice/src/protoArray/errors.ts index 2e044de154e1..650fd1c0b244 100644 --- a/packages/fork-choice/src/protoArray/errors.ts +++ b/packages/fork-choice/src/protoArray/errors.ts @@ -56,8 +56,4 @@ export type ProtoArrayErrorType = | {code: ProtoArrayErrorCode.INVALID_JUSTIFIED_EXECUTION_STATUS; root: RootHex} | ({code: ProtoArrayErrorCode.INVALID_LVH_EXECUTION_RESPONSE} & LVHExecError); -export class ProtoArrayError extends LodestarError { - constructor(type: ProtoArrayErrorType) { - super(type); - } -} +export class ProtoArrayError extends LodestarError {} diff --git a/packages/fork-choice/src/protoArray/protoArray.ts b/packages/fork-choice/src/protoArray/protoArray.ts index 0b793d2be099..b8bb63837e36 100644 --- a/packages/fork-choice/src/protoArray/protoArray.ts +++ b/packages/fork-choice/src/protoArray/protoArray.ts @@ -964,7 +964,6 @@ export class ProtoArray { * Returns a common ancestor for nodeA or nodeB or null if there's none */ getCommonAncestor(nodeA: ProtoNode, nodeB: ProtoNode): ProtoNode | null { - // eslint-disable-next-line no-constant-condition while (true) { // If nodeA is higher than nodeB walk up nodeA tree if (nodeA.slot > nodeB.slot) { diff --git a/packages/fork-choice/test/unit/forkChoice/utils.test.ts b/packages/fork-choice/test/unit/forkChoice/utils.test.ts index 3f315d079842..d8793206f4ba 100644 --- a/packages/fork-choice/test/unit/forkChoice/utils.test.ts +++ b/packages/fork-choice/test/unit/forkChoice/utils.test.ts @@ -4,7 +4,6 @@ import {ssz} from "@lodestar/types"; import {assertValidTerminalPowBlock, ExecutionStatus} from "../../../src/index.js"; describe("assertValidTerminalPowBlock", function () { - // eslint-disable-next-line @typescript-eslint/naming-convention const config = createChainForkConfig({TERMINAL_TOTAL_DIFFICULTY: BigInt(10)}); const block = ssz.bellatrix.BeaconBlock.defaultValue(); const executionStatus = ExecutionStatus.Valid; diff --git a/packages/fork-choice/test/unit/protoArray/getCommonAncestor.test.ts b/packages/fork-choice/test/unit/protoArray/getCommonAncestor.test.ts index fdf1a1f3bae4..9c06682ca351 100644 --- a/packages/fork-choice/test/unit/protoArray/getCommonAncestor.test.ts +++ b/packages/fork-choice/test/unit/protoArray/getCommonAncestor.test.ts @@ -77,7 +77,7 @@ describe("getCommonAncestor", () => { for (const {nodeA, nodeB, ancestor} of testCases) { it(`${nodeA} & ${nodeB} -> ${ancestor}`, () => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + // biome-ignore lint/style/noNonNullAssertion: const ancestorNode = fc.getCommonAncestor(fc.getNode(nodeA)!, fc.getNode(nodeB)!); expect(ancestorNode && ancestorNode.blockRoot).toBe(ancestor); }); diff --git a/packages/light-client/package.json b/packages/light-client/package.json index 2eda3a45d455..a503d6bc510e 100644 --- a/packages/light-client/package.json +++ b/packages/light-client/package.json @@ -62,8 +62,8 @@ "check-bundle": "node -e \"(async function() { await import('./dist/lightclient.min.mjs') })()\"", "build:release": "yarn clean && yarn run build && yarn run build:bundle", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit", "test:unit": "vitest --run --dir test/unit/", "test:browsers": "yarn test:browsers:chrome && yarn test:browsers:firefox && yarn test:browsers:electron", diff --git a/packages/light-client/src/events.ts b/packages/light-client/src/events.ts index 5b561718e89e..7c01843d8ad0 100644 --- a/packages/light-client/src/events.ts +++ b/packages/light-client/src/events.ts @@ -15,7 +15,7 @@ export type LightclientEmitterEvents = { export type LightclientEmitter = MittEmitter; -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: export type MittEmitter void>> = { on(type: K, handler: T[K]): void; off(type: K, handler: T[K]): void; diff --git a/packages/light-client/src/index.ts b/packages/light-client/src/index.ts index 5ec0dd73b469..098ea18adc31 100644 --- a/packages/light-client/src/index.ts +++ b/packages/light-client/src/index.ts @@ -224,7 +224,6 @@ export class Lightclient { } private async runLoop(): Promise { - // eslint-disable-next-line no-constant-condition while (true) { const currentPeriod = computeSyncPeriodAtSlot(this.currentSlot); // Check if we have a sync committee for the current clock period diff --git a/packages/light-client/src/spec/utils.ts b/packages/light-client/src/spec/utils.ts index 408412464606..d80b9bb7d9a1 100644 --- a/packages/light-client/src/spec/utils.ts +++ b/packages/light-client/src/spec/utils.ts @@ -106,7 +106,6 @@ export function upgradeLightClientHeader( // Break if no further upgradation is required else fall through if (ForkSeq[targetFork] <= ForkSeq.bellatrix) break; - // eslint-disable-next-line no-fallthrough case ForkName.capella: (upgradedHeader as LightClientHeader).execution = ssz.capella.LightClientHeader.fields.execution.defaultValue(); @@ -116,7 +115,6 @@ export function upgradeLightClientHeader( // Break if no further upgradation is required else fall through if (ForkSeq[targetFork] <= ForkSeq.capella) break; - // eslint-disable-next-line no-fallthrough case ForkName.deneb: (upgradedHeader as LightClientHeader).execution.blobGasUsed = ssz.deneb.LightClientHeader.fields.execution.fields.blobGasUsed.defaultValue(); @@ -126,7 +124,6 @@ export function upgradeLightClientHeader( // Break if no further upgradation is required else fall through if (ForkSeq[targetFork] <= ForkSeq.deneb) break; - // eslint-disable-next-line no-fallthrough case ForkName.electra: // No changes to LightClientHeader in Electra diff --git a/packages/light-client/src/utils/logger.ts b/packages/light-client/src/utils/logger.ts index afdbf7da7d3d..1f13b98bd6c6 100644 --- a/packages/light-client/src/utils/logger.ts +++ b/packages/light-client/src/utils/logger.ts @@ -1,4 +1,4 @@ -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: export type LogHandler = (message: string, context?: any, error?: Error) => void; export type ILcLogger = { diff --git a/packages/light-client/test/unit/isValidLightClientHeader.test.ts b/packages/light-client/test/unit/isValidLightClientHeader.test.ts index db27a8266103..8181c6a5def4 100644 --- a/packages/light-client/test/unit/isValidLightClientHeader.test.ts +++ b/packages/light-client/test/unit/isValidLightClientHeader.test.ts @@ -5,7 +5,6 @@ import {createBeaconConfig, createChainForkConfig, defaultChainConfig} from "@lo import {isValidLightClientHeader} from "../../src/spec/utils.js"; describe("isValidLightClientHeader", function () { - /* eslint-disable @typescript-eslint/naming-convention */ const chainConfig = createChainForkConfig({ ...defaultChainConfig, ALTAIR_FORK_EPOCH: 0, diff --git a/packages/light-client/test/unit/sync.node.test.ts b/packages/light-client/test/unit/sync.node.test.ts index bcd1d0f25d0b..52afd05760d7 100644 --- a/packages/light-client/test/unit/sync.node.test.ts +++ b/packages/light-client/test/unit/sync.node.test.ts @@ -45,7 +45,6 @@ describe("sync", () => { const targetSlot = firstHeadSlot + slotsIntoPeriod; // Genesis data such that targetSlot is at the current clock slot - // eslint-disable-next-line @typescript-eslint/naming-convention const chainConfig: ChainConfig = {...chainConfigDef, SECONDS_PER_SLOT, ALTAIR_FORK_EPOCH}; const genesisTime = Math.floor(Date.now() / 1000) - chainConfig.SECONDS_PER_SLOT * targetSlot; const genesisValidatorsRoot = Buffer.alloc(32, 0xaa); diff --git a/packages/logger/package.json b/packages/logger/package.json index 196fb306a8b0..3d6ee5a0d874 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -53,8 +53,8 @@ "build:release": "yarn clean && yarn build", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit && yarn test:e2e", "test:unit": "vitest --run --dir test/unit/", "test:browsers": "yarn test:browsers:chrome && yarn test:browsers:firefox && yarn test:browsers:electron", diff --git a/packages/logger/src/browser.ts b/packages/logger/src/browser.ts index fc91fcfcd2a3..65a0c2a6a64b 100644 --- a/packages/logger/src/browser.ts +++ b/packages/logger/src/browser.ts @@ -70,9 +70,7 @@ class BrowserConsole extends Transport { const message = info[MESSAGE]; if (val <= this.levels[this.level as LogLevel]) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error - // eslint-disable-next-line @typescript-eslint/no-unsafe-call, no-console console[mappedMethod](message); } diff --git a/packages/logger/src/interface.ts b/packages/logger/src/interface.ts index 8f270b0dc4ee..e3ba8483a458 100644 --- a/packages/logger/src/interface.ts +++ b/packages/logger/src/interface.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-extraneous-dependencies import {LEVEL, MESSAGE} from "triple-beam"; import {LogLevel, Logger, LogHandler, LogData} from "@lodestar/utils"; @@ -15,7 +14,6 @@ export const logLevelNum: {[K in LogLevel]: number} = { [LogLevel.trace]: 5, }; -// eslint-disable-next-line @typescript-eslint/naming-convention export const LogLevels = Object.values(LogLevel); export type LogFormat = "human" | "json"; diff --git a/packages/logger/src/utils/consoleTransport.ts b/packages/logger/src/utils/consoleTransport.ts index 41a1084b4b83..6bfd62b2ecd8 100644 --- a/packages/logger/src/utils/consoleTransport.ts +++ b/packages/logger/src/utils/consoleTransport.ts @@ -26,6 +26,7 @@ export class ConsoleDynamicLevel extends transports.Console { return this.levelByModule.delete(module); } + // biome-ignore lint/correctness/noUndeclaredVariables: BufferEncoding is not been identified by the biomejs _write(info: WinstonLogInfo, enc: BufferEncoding, callback: (error?: Error | null | undefined) => void): void { const moduleLevel = this.levelByModule.get(info.module) ?? this.defaultLevel; diff --git a/packages/logger/src/utils/format.ts b/packages/logger/src/utils/format.ts index 651dc56ce687..4e657c0040af 100644 --- a/packages/logger/src/utils/format.ts +++ b/packages/logger/src/utils/format.ts @@ -21,8 +21,8 @@ export function getFormat(opts: LoggerOptions): Format { switch (opts.format) { case "json": return jsonLogFormat(opts); - case "human": + return humanReadableLogFormat(opts); default: return humanReadableLogFormat(opts); } @@ -49,6 +49,7 @@ function formatTimestamp(opts: LoggerOptions): Format { }; case TimestampFormatCode.DateRegular: + return format.timestamp({format: "MMM-DD HH:mm:ss.SSS"}); default: return format.timestamp({format: "MMM-DD HH:mm:ss.SSS"}); } @@ -70,7 +71,8 @@ function jsonLogFormat(opts: LoggerOptions): Format { /** * Winston template function print a human readable string given a log object */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any + +// biome-ignore lint/suspicious/noExplicitAny: function humanReadableTemplateFn(_info: {[key: string]: any; level: string; message: string}): string { const info = _info as WinstonInfoArg; diff --git a/packages/logger/src/utils/json.ts b/packages/logger/src/utils/json.ts index 7408de582dd1..f1919a38da8b 100644 --- a/packages/logger/src/utils/json.ts +++ b/packages/logger/src/utils/json.ts @@ -127,6 +127,7 @@ export function logCtxToString(arg: unknown, depth = 0, fromError = false): stri case "string": case "undefined": case "boolean": + return String(arg); default: return String(arg); } diff --git a/packages/logger/test/e2e/logger/workerLogger.js b/packages/logger/test/e2e/logger/workerLogger.js index 9608336c433f..83d1c857631f 100644 --- a/packages/logger/test/e2e/logger/workerLogger.js +++ b/packages/logger/test/e2e/logger/workerLogger.js @@ -9,7 +9,6 @@ if (!parentPort) throw Error("parentPort must be defined"); const file = fs.createWriteStream(workerData.logFilepath, {flags: "a"}); parentPort.on("message", (data) => { - // eslint-disable-next-line no-console console.log(data); file.write(data); }); diff --git a/packages/logger/test/e2e/logger/workerLogs.test.ts b/packages/logger/test/e2e/logger/workerLogs.test.ts index 3c81cbf92c57..969cd84bc5ff 100644 --- a/packages/logger/test/e2e/logger/workerLogs.test.ts +++ b/packages/logger/test/e2e/logger/workerLogs.test.ts @@ -7,7 +7,6 @@ import {LoggerWorker, getLoggerWorker} from "./workerLoggerHandler.js"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); describe("worker logs", function () { diff --git a/packages/logger/test/unit/node.node.test.ts b/packages/logger/test/unit/node.node.test.ts index 12782fa49af8..da1245fa37f1 100644 --- a/packages/logger/test/unit/node.node.test.ts +++ b/packages/logger/test/unit/node.node.test.ts @@ -6,7 +6,6 @@ import {formatsTestCases} from "../fixtures/loggerFormats.js"; // Node.js maps `process.stdout` to `console._stdout`. // spy does not work on `process.stdout` directly. -// eslint-disable-next-line @typescript-eslint/naming-convention type TestConsole = typeof console & {_stdout: {write: Mock}}; describe("node logger", () => { diff --git a/packages/logger/test/unit/utils/json.test.ts b/packages/logger/test/unit/utils/json.test.ts index 912f15fa958b..4b91fd1995b5 100644 --- a/packages/logger/test/unit/utils/json.test.ts +++ b/packages/logger/test/unit/utils/json.test.ts @@ -113,7 +113,6 @@ describe("Json helper", () => { // Circular references () => { const circularReference: any = {}; - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access circularReference.myself = circularReference; return { id: "circular reference", @@ -161,7 +160,6 @@ describe("Json helper", () => { // Objects {id: "object of basic types", json: {a: 1, b: "a", c: root}, output: `a=1, b=a, c=${rootHex}`}, - // eslint-disable-next-line quotes {id: "object of objects", json: {a: {b: 1}}, output: `a=[object]`}, { id: "error metadata", @@ -175,7 +173,6 @@ describe("Json helper", () => { // Circular references () => { const circularReference: any = {}; - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access circularReference.myself = circularReference; return { id: "circular reference", diff --git a/packages/logger/test/unit/winston.node.test.ts b/packages/logger/test/unit/winston.node.test.ts index 8ef49da4e02d..6763cc667afd 100644 --- a/packages/logger/test/unit/winston.node.test.ts +++ b/packages/logger/test/unit/winston.node.test.ts @@ -8,7 +8,6 @@ import {readFileWhenExists} from "../utils/files.js"; // Node.js maps `process.stdout` to `console._stdout`. // spy does not work on `process.stdout` directly. -// eslint-disable-next-line @typescript-eslint/naming-convention type TestConsole = typeof console & {_stdout: {write: Mock}}; describe("winston logger", () => { diff --git a/packages/params/package.json b/packages/params/package.json index c281f97a41ec..33b8415170f1 100644 --- a/packages/params/package.json +++ b/packages/params/package.json @@ -50,8 +50,8 @@ "build:watch": "yarn run build --watch", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit", "test:unit": "vitest --run --dir test/unit/", "test:browsers": "yarn test:browsers:chrome && yarn test:browsers:firefox && yarn test:browsers:electron", diff --git a/packages/params/src/presets/gnosis.ts b/packages/params/src/presets/gnosis.ts index 412c38a6eb82..5a4a2eac4113 100644 --- a/packages/params/src/presets/gnosis.ts +++ b/packages/params/src/presets/gnosis.ts @@ -4,7 +4,6 @@ import {mainnetPreset} from "./mainnet.js"; // Gnosis preset // https://github.com/gnosischain/specs/tree/master/consensus/preset/gnosis -/* eslint-disable @typescript-eslint/naming-convention */ export const gnosisPreset: BeaconPreset = { ...mainnetPreset, diff --git a/packages/params/src/presets/mainnet.ts b/packages/params/src/presets/mainnet.ts index ca599e990df4..a7225739037f 100644 --- a/packages/params/src/presets/mainnet.ts +++ b/packages/params/src/presets/mainnet.ts @@ -3,7 +3,6 @@ import {BeaconPreset} from "../types.js"; // Mainnet preset // https://github.com/ethereum/consensus-specs/tree/dev/presets/mainnet -/* eslint-disable @typescript-eslint/naming-convention */ export const mainnetPreset: BeaconPreset = { // Misc // --------------------------------------------------------------- diff --git a/packages/params/src/presets/minimal.ts b/packages/params/src/presets/minimal.ts index 5dc8fc10d803..d7ab2c27f342 100644 --- a/packages/params/src/presets/minimal.ts +++ b/packages/params/src/presets/minimal.ts @@ -3,7 +3,6 @@ import {BeaconPreset} from "../types.js"; // Minimal preset // https://github.com/ethereum/consensus-specs/tree/dev/presets/minimal -/* eslint-disable @typescript-eslint/naming-convention */ export const minimalPreset: BeaconPreset = { // Misc // --------------------------------------------------------------- diff --git a/packages/params/src/types.ts b/packages/params/src/types.ts index e867b4a3cf71..2fd88da9fde3 100644 --- a/packages/params/src/types.ts +++ b/packages/params/src/types.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ - /** * Compile-time chain configuration */ diff --git a/packages/params/test/e2e/ensure-config-is-synced.test.ts b/packages/params/test/e2e/ensure-config-is-synced.test.ts index 38168fa02bae..12e4c2a35e55 100644 --- a/packages/params/test/e2e/ensure-config-is-synced.test.ts +++ b/packages/params/test/e2e/ensure-config-is-synced.test.ts @@ -44,7 +44,6 @@ async function downloadRemoteConfig(preset: "mainnet" | "minimal", commit: strin ); // Merge all the fetched yamls for the different forks - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const beaconPresetRaw: Record = Object.assign( ...(downloadedParams as unknown as [input: Record]) ); diff --git a/packages/params/test/e2e/overridePreset.test.ts b/packages/params/test/e2e/overridePreset.test.ts index 24995cbaa042..12fa1fb095c6 100644 --- a/packages/params/test/e2e/overridePreset.test.ts +++ b/packages/params/test/e2e/overridePreset.test.ts @@ -13,7 +13,6 @@ const exec = util.promisify(child.exec); // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); describe("Override preset", function () { diff --git a/packages/params/test/e2e/overridePresetError.ts b/packages/params/test/e2e/overridePresetError.ts index d5a665bece1f..869f521d33b5 100644 --- a/packages/params/test/e2e/overridePresetError.ts +++ b/packages/params/test/e2e/overridePresetError.ts @@ -5,5 +5,4 @@ import "../../lib/index.js"; import {setActivePreset, PresetName} from "../../lib/setPreset.js"; // This line should throw -// eslint-disable-next-line @typescript-eslint/naming-convention setActivePreset(PresetName.minimal, {SLOTS_PER_EPOCH: 2}); diff --git a/packages/params/test/e2e/overridePresetOk.ts b/packages/params/test/e2e/overridePresetOk.ts index 7373ecee7fff..8887155b5400 100644 --- a/packages/params/test/e2e/overridePresetOk.ts +++ b/packages/params/test/e2e/overridePresetOk.ts @@ -6,7 +6,6 @@ import assert from "node:assert"; // 1. Import from @lodestar/params/setPreset only import {setActivePreset, PresetName} from "../../src/setPreset.js"; -// eslint-disable-next-line @typescript-eslint/naming-convention setActivePreset(PresetName.minimal, {SLOTS_PER_EPOCH: 2}); // 2. Import from any other @lodestar/params paths diff --git a/packages/params/test/e2e/setPreset.test.ts b/packages/params/test/e2e/setPreset.test.ts index 844239d56bab..1e236b8f2d85 100644 --- a/packages/params/test/e2e/setPreset.test.ts +++ b/packages/params/test/e2e/setPreset.test.ts @@ -13,7 +13,6 @@ const exec = util.promisify(child.exec); // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); describe("setPreset", function () { diff --git a/packages/params/test/yaml.ts b/packages/params/test/yaml.ts index 162d48bc4084..d1bc72125923 100644 --- a/packages/params/test/yaml.ts +++ b/packages/params/test/yaml.ts @@ -9,7 +9,6 @@ export const schema = FAILSAFE_SCHEMA.extend({ new Type("tag:yaml.org,2002:str", { kind: "scalar", construct: function (data) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return return data !== null ? data : ""; }, }), diff --git a/packages/prover/package.json b/packages/prover/package.json index 6a31b5b1baa0..9bfe7f21e480 100644 --- a/packages/prover/package.json +++ b/packages/prover/package.json @@ -48,8 +48,8 @@ "build:release": "yarn clean && yarn run build", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit && yarn test:e2e", "test:unit": "vitest --run --dir test/unit/", "test:browsers": "yarn test:browsers:chrome && yarn test:browsers:firefox && yarn test:browsers:electron", diff --git a/packages/prover/scripts/generate_fixtures.ts b/packages/prover/scripts/generate_fixtures.ts index 70ab31fed5c1..b5d1d18d89f1 100644 --- a/packages/prover/scripts/generate_fixtures.ts +++ b/packages/prover/scripts/generate_fixtures.ts @@ -2,9 +2,7 @@ import {writeFile, mkdir} from "node:fs/promises"; import path from "node:path"; import url from "node:url"; -// eslint-disable-next-line import/no-extraneous-dependencies import axios from "axios"; -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); type JSONRequest = {method: string; params: unknown[]}; @@ -95,17 +93,14 @@ async function generateFixture(label: string, generator: Generator, network: NET } const beacon = { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any - executionPayload: ((await rawBeacon(network, `eth/v2/beacon/blocks/${slot}`)) as any).data.message.body + executionPayload: ((await rawBeacon(network, `eth/v2/beacon/blocks/${slot}`)) as any).data.message.body .execution_payload, - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any - headers: ((await rawBeacon(network, `eth/v1/beacon/headers/${slot}`)) as any).data, + headers: ((await rawBeacon(network, `eth/v1/beacon/headers/${slot}`)) as any).data, }; const payloadBlock = await getBlockByHash( network, - // eslint-disable-next-line @typescript-eslint/naming-convention - (beacon.executionPayload as {block_hash: string}).block_hash, + (beacon.executionPayload as {block_hash: string}).block_hash, true ); diff --git a/packages/prover/src/cli/applyPreset.ts b/packages/prover/src/cli/applyPreset.ts index 158e05243ec7..4a79a1a4417b 100644 --- a/packages/prover/src/cli/applyPreset.ts +++ b/packages/prover/src/cli/applyPreset.ts @@ -1,8 +1,6 @@ // MUST import this file first before anything and not import any Lodestar code. -// eslint-disable-next-line no-restricted-imports, import/no-extraneous-dependencies import {hasher} from "@chainsafe/persistent-merkle-tree/lib/hasher/as-sha256.js"; -// eslint-disable-next-line no-restricted-imports, import/no-extraneous-dependencies import {setHasher} from "@chainsafe/persistent-merkle-tree/lib/hasher/index.js"; // without setting this first, persistent-merkle-tree will use noble instead @@ -45,7 +43,6 @@ else if (network) { if (network === "dev") { process.env.LODESTAR_PRESET = "minimal"; // "c-kzg" has hardcoded the mainnet value, do not use presets - // eslint-disable-next-line @typescript-eslint/naming-convention setActivePreset(PresetName.minimal, {FIELD_ELEMENTS_PER_BLOB: 4096}); } else if (network === "gnosis" || network === "chiado") { process.env.LODESTAR_PRESET = "gnosis"; diff --git a/packages/prover/src/cli/cmds/start/options.ts b/packages/prover/src/cli/cmds/start/options.ts index f63ee974be44..bdf0670771ef 100644 --- a/packages/prover/src/cli/cmds/start/options.ts +++ b/packages/prover/src/cli/cmds/start/options.ts @@ -57,7 +57,9 @@ export const startOptions: CliCommandOptions = { string: true, coerce: (urls: string[]): string[] => // Parse ["url1,url2"] to ["url1", "url2"] - urls.map((item) => item.split(",")).flat(), + urls + .map((item) => item.split(",")) + .flat(), demandOption: true, group: "beacon", }, diff --git a/packages/prover/src/cli/index.ts b/packages/prover/src/cli/index.ts index 845831b32cb0..5bd071642c96 100644 --- a/packages/prover/src/cli/index.ts +++ b/packages/prover/src/cli/index.ts @@ -14,7 +14,7 @@ void prover // Show command help message when no command is provided if (msg.includes("Not enough non-option arguments")) { yarg.showHelp(); - // eslint-disable-next-line no-console + // biome-ignore lint/suspicious/noConsoleLog: This code will run only in browser so console will be available. console.log("\n"); } } @@ -22,7 +22,6 @@ void prover const errorMessage = err !== undefined ? (err instanceof YargsError ? err.message : err.stack) : msg || "Unknown error"; - // eslint-disable-next-line no-console console.error(` ✖ ${errorMessage}\n`); process.exit(1); }) diff --git a/packages/prover/src/interfaces.ts b/packages/prover/src/interfaces.ts index 36222c1476d3..9a67b47ea3b3 100644 --- a/packages/prover/src/interfaces.ts +++ b/packages/prover/src/interfaces.ts @@ -27,7 +27,7 @@ export type ELRequestHandler = ( payload: JsonRpcRequestOrBatch ) => Promise | undefined>; -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: export type ELRequestHandlerAny = ELRequestHandler; /** diff --git a/packages/prover/src/types.ts b/packages/prover/src/types.ts index 781ba1f7b207..d404cd96d4d8 100644 --- a/packages/prover/src/types.ts +++ b/packages/prover/src/types.ts @@ -45,17 +45,17 @@ export interface JsonRpcResponseWithErrorPayload { } // Make the very flexible el response type to match different libraries easily -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: export type JsonRpcResponse = | JsonRpcResponseWithResultPayload | JsonRpcResponseWithErrorPayload; -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: export type JsonRpcBatchResponse = JsonRpcResponse[]; // Response can be a single response or an array of responses in case of batch request // Make the very flexible el response type to match different libraries easily -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: export type JsonRpcResponseOrBatch = JsonRpcResponse | JsonRpcBatchResponse; export type HexString = string; @@ -145,7 +145,6 @@ export interface ELAccessListResponse { export type ELStorageProof = Pick; -/* eslint-disable @typescript-eslint/naming-convention */ export type ELApi = { eth_getBalance: (address: string, block?: number | string) => string; eth_createAccessList: (transaction: ELTransaction, block?: ELBlockNumberOrTag) => ELAccessListResponse; diff --git a/packages/prover/src/utils/conversion.ts b/packages/prover/src/utils/conversion.ts index c809de5c4555..77c3141f828a 100644 --- a/packages/prover/src/utils/conversion.ts +++ b/packages/prover/src/utils/conversion.ts @@ -58,7 +58,6 @@ export function headerDataFromELBlock(blockInfo: ELBlock): HeaderData { }; } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function txDataFromELBlock(txInfo: ELTransaction) { return { ...txInfo, diff --git a/packages/prover/src/utils/evm.ts b/packages/prover/src/utils/evm.ts index 19f43d9584c8..40950647b8f3 100644 --- a/packages/prover/src/utils/evm.ts +++ b/packages/prover/src/utils/evm.ts @@ -20,7 +20,7 @@ export async function createVM({proofProvider}: {proofProvider: ProofProvider}): const blockchain = await Blockchain.create({common}); // Connect blockchain object with existing proof provider for block history - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: (blockchain as any).getBlock = async (blockId: number) => { const payload = await proofProvider.getExecutionPayload(blockId); return { diff --git a/packages/prover/src/utils/file.ts b/packages/prover/src/utils/file.ts index d236d2d5dc95..acc62033010f 100644 --- a/packages/prover/src/utils/file.ts +++ b/packages/prover/src/utils/file.ts @@ -15,7 +15,6 @@ const yamlSchema = FAILSAFE_SCHEMA.extend({ new Type("tag:yaml.org,2002:str", { kind: "scalar", construct: function construct(data) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return return data !== null ? data : ""; }, }), diff --git a/packages/prover/src/utils/gitData/gitDataPath.ts b/packages/prover/src/utils/gitData/gitDataPath.ts index e243ca433f2d..1ad3104aafc6 100644 --- a/packages/prover/src/utils/gitData/gitDataPath.ts +++ b/packages/prover/src/utils/gitData/gitDataPath.ts @@ -4,7 +4,6 @@ import {fileURLToPath} from "node:url"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); // Persist git data and distribute through NPM so CLI consumers can know exactly diff --git a/packages/prover/src/utils/gitData/index.ts b/packages/prover/src/utils/gitData/index.ts index 96c5e4bbaef2..0720d39d9e30 100644 --- a/packages/prover/src/utils/gitData/index.ts +++ b/packages/prover/src/utils/gitData/index.ts @@ -11,7 +11,7 @@ export function readAndGetGitData(): GitData { let persistedGitData: Partial; try { persistedGitData = readGitDataFile(); - } catch (e) { + } catch (_e) { persistedGitData = {}; } @@ -23,13 +23,13 @@ export function readAndGetGitData(): GitData { branch: currentGitData.branch && currentGitData.branch.length > 0 ? currentGitData.branch - : persistedGitData.branch ?? "", + : (persistedGitData.branch ?? ""), commit: currentGitData.commit && currentGitData.commit.length > 0 ? currentGitData.commit - : persistedGitData.commit ?? "", + : (persistedGitData.commit ?? ""), }; - } catch (e) { + } catch (_e) { return { branch: "", commit: "", @@ -49,7 +49,7 @@ export function getGitData(): GitData { function getBranch(): string { try { return shellSilent("git rev-parse --abbrev-ref HEAD"); - } catch (e) { + } catch (_e) { return ""; } } @@ -58,7 +58,7 @@ function getBranch(): string { function getCommit(): string { try { return shellSilent("git rev-parse --verify HEAD"); - } catch (e) { + } catch (_e) { return ""; } } diff --git a/packages/prover/src/utils/process.ts b/packages/prover/src/utils/process.ts index 26768ffce1fb..80748544302c 100644 --- a/packages/prover/src/utils/process.ts +++ b/packages/prover/src/utils/process.ts @@ -13,7 +13,7 @@ import {getResponseForRequest, isBatchRequest, isRequest} from "./json_rpc.js"; import {isNullish} from "./validation.js"; import {ELRpcProvider} from "./rpc_provider.js"; -/* eslint-disable @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any */ +// biome-ignore lint/suspicious/noExplicitAny: export const verifiableMethodHandlers: Record> = { eth_getBalance: eth_getBalance, eth_getTransactionCount: eth_getTransactionCount, diff --git a/packages/prover/src/utils/version.ts b/packages/prover/src/utils/version.ts index 4752856e5b1d..624412107603 100644 --- a/packages/prover/src/utils/version.ts +++ b/packages/prover/src/utils/version.ts @@ -6,7 +6,6 @@ import {readAndGetGitData} from "./gitData/index.js"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); type VersionJson = { diff --git a/packages/prover/src/verified_requests/eth_call.ts b/packages/prover/src/verified_requests/eth_call.ts index b28bd222c568..eea7ba146c3f 100644 --- a/packages/prover/src/verified_requests/eth_call.ts +++ b/packages/prover/src/verified_requests/eth_call.ts @@ -8,7 +8,6 @@ import { getVerificationFailedMessage, } from "../utils/json_rpc.js"; -// eslint-disable-next-line @typescript-eslint/naming-convention export const eth_call: ELVerifiedRequestHandler = async ({ rpc, payload, diff --git a/packages/prover/src/verified_requests/eth_estimateGas.ts b/packages/prover/src/verified_requests/eth_estimateGas.ts index fee446aadb5b..4ac4c3ccb6bc 100644 --- a/packages/prover/src/verified_requests/eth_estimateGas.ts +++ b/packages/prover/src/verified_requests/eth_estimateGas.ts @@ -8,7 +8,6 @@ import { getVerificationFailedMessage, } from "../utils/json_rpc.js"; -// eslint-disable-next-line @typescript-eslint/naming-convention export const eth_estimateGas: ELVerifiedRequestHandler< ELApiParams["eth_estimateGas"], ELApiReturn["eth_estimateGas"] diff --git a/packages/prover/src/verified_requests/eth_getBalance.ts b/packages/prover/src/verified_requests/eth_getBalance.ts index b5b7e63dcb64..0c03b23be788 100644 --- a/packages/prover/src/verified_requests/eth_getBalance.ts +++ b/packages/prover/src/verified_requests/eth_getBalance.ts @@ -6,7 +6,6 @@ import { getVerificationFailedMessage, } from "../utils/json_rpc.js"; -// eslint-disable-next-line @typescript-eslint/naming-convention export const eth_getBalance: ELVerifiedRequestHandler<[address: string, block?: number | string], string> = async ({ rpc, payload, diff --git a/packages/prover/src/verified_requests/eth_getBlockByHash.ts b/packages/prover/src/verified_requests/eth_getBlockByHash.ts index cb5fa1711c0f..00a110c01e9a 100644 --- a/packages/prover/src/verified_requests/eth_getBlockByHash.ts +++ b/packages/prover/src/verified_requests/eth_getBlockByHash.ts @@ -7,7 +7,6 @@ import { getVerificationFailedMessage, } from "../utils/json_rpc.js"; -// eslint-disable-next-line @typescript-eslint/naming-convention export const eth_getBlockByHash: ELVerifiedRequestHandler<[block: string, hydrated: boolean], ELBlock> = async ({ rpc, payload, diff --git a/packages/prover/src/verified_requests/eth_getBlockByNumber.ts b/packages/prover/src/verified_requests/eth_getBlockByNumber.ts index a08703881cc0..23e0fa2ca863 100644 --- a/packages/prover/src/verified_requests/eth_getBlockByNumber.ts +++ b/packages/prover/src/verified_requests/eth_getBlockByNumber.ts @@ -7,7 +7,6 @@ import { getVerificationFailedMessage, } from "../utils/json_rpc.js"; -// eslint-disable-next-line @typescript-eslint/naming-convention export const eth_getBlockByNumber: ELVerifiedRequestHandler< [block: string | number, hydrated: boolean], ELBlock diff --git a/packages/prover/src/verified_requests/eth_getCode.ts b/packages/prover/src/verified_requests/eth_getCode.ts index 9cb3362c4e50..f94ae8c1c8bd 100644 --- a/packages/prover/src/verified_requests/eth_getCode.ts +++ b/packages/prover/src/verified_requests/eth_getCode.ts @@ -6,7 +6,6 @@ import { getVerificationFailedMessage, } from "../utils/json_rpc.js"; -// eslint-disable-next-line @typescript-eslint/naming-convention export const eth_getCode: ELVerifiedRequestHandler<[address: string, block?: number | string], string> = async ({ rpc, payload, diff --git a/packages/prover/src/verified_requests/eth_getTransactionCount.ts b/packages/prover/src/verified_requests/eth_getTransactionCount.ts index 4cafd9b2b271..aeef67e96e74 100644 --- a/packages/prover/src/verified_requests/eth_getTransactionCount.ts +++ b/packages/prover/src/verified_requests/eth_getTransactionCount.ts @@ -6,7 +6,6 @@ import { getVerificationFailedMessage, } from "../utils/json_rpc.js"; -// eslint-disable-next-line @typescript-eslint/naming-convention export const eth_getTransactionCount: ELVerifiedRequestHandler< [address: string, block?: number | string], string @@ -15,7 +14,6 @@ export const eth_getTransactionCount: ELVerifiedRequestHandler< params: [address, block], } = payload; const result = await verifyAccount({proofProvider, logger, rpc, address, block}); - if (result.valid) { return getResponseForRequest(payload, result.data.nonce); } diff --git a/packages/prover/test/fixtures/mainnet/eth_call.json b/packages/prover/test/fixtures/mainnet/eth_call.json index 92e9ee557bc2..a3fe44880626 100644 --- a/packages/prover/test/fixtures/mainnet/eth_call.json +++ b/packages/prover/test/fixtures/mainnet/eth_call.json @@ -5226,4 +5226,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/packages/prover/test/fixtures/mainnet/eth_estimateGas_contract_call.json b/packages/prover/test/fixtures/mainnet/eth_estimateGas_contract_call.json index eaae6bc7190d..a8be70662e2b 100644 --- a/packages/prover/test/fixtures/mainnet/eth_estimateGas_contract_call.json +++ b/packages/prover/test/fixtures/mainnet/eth_estimateGas_contract_call.json @@ -5226,4 +5226,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/packages/prover/test/fixtures/mainnet/eth_estimateGas_simple_transfer.json b/packages/prover/test/fixtures/mainnet/eth_estimateGas_simple_transfer.json index f9b654b1a6fa..606e520a441c 100644 --- a/packages/prover/test/fixtures/mainnet/eth_estimateGas_simple_transfer.json +++ b/packages/prover/test/fixtures/mainnet/eth_estimateGas_simple_transfer.json @@ -5227,4 +5227,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/packages/prover/test/fixtures/sepolia/eth_getBalance_contract.json b/packages/prover/test/fixtures/sepolia/eth_getBalance_contract.json index f6e2a31b2b87..660889c259d7 100644 --- a/packages/prover/test/fixtures/sepolia/eth_getBalance_contract.json +++ b/packages/prover/test/fixtures/sepolia/eth_getBalance_contract.json @@ -2704,4 +2704,4 @@ } } ] -} \ No newline at end of file +} diff --git a/packages/prover/test/fixtures/sepolia/eth_getBalance_eoa.json b/packages/prover/test/fixtures/sepolia/eth_getBalance_eoa.json index 03627b534159..a2489403db5b 100644 --- a/packages/prover/test/fixtures/sepolia/eth_getBalance_eoa.json +++ b/packages/prover/test/fixtures/sepolia/eth_getBalance_eoa.json @@ -2703,4 +2703,4 @@ } } ] -} \ No newline at end of file +} diff --git a/packages/prover/test/fixtures/sepolia/eth_getBlock_with_contractCreation.json b/packages/prover/test/fixtures/sepolia/eth_getBlock_with_contractCreation.json index 6b0471a182cf..c61d0e58e35e 100644 --- a/packages/prover/test/fixtures/sepolia/eth_getBlock_with_contractCreation.json +++ b/packages/prover/test/fixtures/sepolia/eth_getBlock_with_contractCreation.json @@ -5,10 +5,7 @@ "id": 809166, "jsonrpc": "2.0", "method": "eth_getBlockByHash", - "params": [ - "0x3a0225b38d5927a37cc95fd48254e83c4e9b70115918a103d9fd7e36464030d4", - true - ] + "params": ["0x3a0225b38d5927a37cc95fd48254e83c4e9b70115918a103d9fd7e36464030d4", true] }, "response": { "jsonrpc": "2.0", @@ -571,4 +568,4 @@ } }, "dependentRequests": [] -} \ No newline at end of file +} diff --git a/packages/prover/test/fixtures/sepolia/eth_getBlock_with_no_accessList.json b/packages/prover/test/fixtures/sepolia/eth_getBlock_with_no_accessList.json index 59bb888450d1..c6c1f9c8d675 100644 --- a/packages/prover/test/fixtures/sepolia/eth_getBlock_with_no_accessList.json +++ b/packages/prover/test/fixtures/sepolia/eth_getBlock_with_no_accessList.json @@ -5,10 +5,7 @@ "id": 809162, "jsonrpc": "2.0", "method": "eth_getBlockByHash", - "params": [ - "0x75b10426177f0f4bd8683999e2c7c597007c6e7c4551d6336c0f880b12c6f3bf", - true - ] + "params": ["0x75b10426177f0f4bd8683999e2c7c597007c6e7c4551d6336c0f880b12c6f3bf", true] }, "response": { "jsonrpc": "2.0", @@ -2381,4 +2378,4 @@ } }, "dependentRequests": [] -} \ No newline at end of file +} diff --git a/packages/prover/test/fixtures/sepolia/eth_getCode.json b/packages/prover/test/fixtures/sepolia/eth_getCode.json index 1787e8cfd2ce..a15c15698420 100644 --- a/packages/prover/test/fixtures/sepolia/eth_getCode.json +++ b/packages/prover/test/fixtures/sepolia/eth_getCode.json @@ -2704,4 +2704,4 @@ } } ] -} \ No newline at end of file +} diff --git a/packages/prover/test/fixtures/sepolia/eth_getTransactionCount.json b/packages/prover/test/fixtures/sepolia/eth_getTransactionCount.json index ff45a5e8a776..486c44698c16 100644 --- a/packages/prover/test/fixtures/sepolia/eth_getTransactionCount.json +++ b/packages/prover/test/fixtures/sepolia/eth_getTransactionCount.json @@ -2703,4 +2703,4 @@ } } ] -} \ No newline at end of file +} diff --git a/packages/prover/test/mocks/request_handler.ts b/packages/prover/test/mocks/request_handler.ts index bbe4f24057de..edde1e59a3fe 100644 --- a/packages/prover/test/mocks/request_handler.ts +++ b/packages/prover/test/mocks/request_handler.ts @@ -116,7 +116,6 @@ export function generateReqHandlerOptionsMock( getExecutionPayload: vi.fn().mockResolvedValue(executionPayload), config: { ...config, - // eslint-disable-next-line @typescript-eslint/naming-convention PRESET_BASE: data.network as unknown as PresetName, }, network: data.network, diff --git a/packages/prover/test/tsconfig.json b/packages/prover/test/tsconfig.json index 7e6bad81b22f..f4241fc1fbcd 100644 --- a/packages/prover/test/tsconfig.json +++ b/packages/prover/test/tsconfig.json @@ -3,4 +3,4 @@ "compilerOptions": { "noEmit": false } -} \ No newline at end of file +} diff --git a/packages/prover/test/unit/verified_requests/eth_getBlockByHash.test.ts b/packages/prover/test/unit/verified_requests/eth_getBlockByHash.test.ts index fca484657c01..3175bdd6d60c 100644 --- a/packages/prover/test/unit/verified_requests/eth_getBlockByHash.test.ts +++ b/packages/prover/test/unit/verified_requests/eth_getBlockByHash.test.ts @@ -3,8 +3,12 @@ import {createForkConfig} from "@lodestar/config"; import {NetworkName, networksChainConfig} from "@lodestar/config/networks"; import {VERIFICATION_FAILED_RESPONSE_CODE} from "../../../src/constants.js"; import {eth_getBlockByHash} from "../../../src/verified_requests/eth_getBlockByHash.js"; -import ethGetBlockWithContractCreation from "../../fixtures/sepolia/eth_getBlock_with_contractCreation.json" assert {type: "json"}; -import ethGetBlockWithNoAccessList from "../../fixtures/sepolia/eth_getBlock_with_no_accessList.json" assert {type: "json"}; +import ethGetBlockWithContractCreation from "../../fixtures/sepolia/eth_getBlock_with_contractCreation.json" assert { + type: "json", +}; +import ethGetBlockWithNoAccessList from "../../fixtures/sepolia/eth_getBlock_with_no_accessList.json" assert { + type: "json", +}; import {TestFixture, cloneTestFixture, generateReqHandlerOptionsMock} from "../../mocks/request_handler.js"; import {ELBlock} from "../../../src/types.js"; import {getVerificationFailedMessage} from "../../../src/utils/json_rpc.js"; diff --git a/packages/prover/test/unit/verified_requests/eth_getBlockByNumber.test.ts b/packages/prover/test/unit/verified_requests/eth_getBlockByNumber.test.ts index 81f644a46024..cc1389128ec0 100644 --- a/packages/prover/test/unit/verified_requests/eth_getBlockByNumber.test.ts +++ b/packages/prover/test/unit/verified_requests/eth_getBlockByNumber.test.ts @@ -4,8 +4,12 @@ import {NetworkName, networksChainConfig} from "@lodestar/config/networks"; import {VERIFICATION_FAILED_RESPONSE_CODE} from "../../../src/constants.js"; import {ELBlock} from "../../../src/types.js"; import {eth_getBlockByNumber} from "../../../src/verified_requests/eth_getBlockByNumber.js"; -import ethGetBlockWithContractCreation from "../../fixtures/sepolia/eth_getBlock_with_contractCreation.json" assert {type: "json"}; -import ethGetBlockWithNoAccessList from "../../fixtures/sepolia/eth_getBlock_with_no_accessList.json" assert {type: "json"}; +import ethGetBlockWithContractCreation from "../../fixtures/sepolia/eth_getBlock_with_contractCreation.json" assert { + type: "json", +}; +import ethGetBlockWithNoAccessList from "../../fixtures/sepolia/eth_getBlock_with_no_accessList.json" assert { + type: "json", +}; import {TestFixture, cloneTestFixture, generateReqHandlerOptionsMock} from "../../mocks/request_handler.js"; import {getVerificationFailedMessage} from "../../../src/utils/json_rpc.js"; @@ -88,7 +92,6 @@ describe("verified_requests / eth_getBlockByNumber", () => { // Temper the execution payload const testCase = cloneTestFixture(t, { beacon: { - // eslint-disable-next-line @typescript-eslint/naming-convention executionPayload: {parent_hash: "0xbdbd90ab601a073c3d128111eafb12fa7ece4af239abdc8be60184a08c6d7ef4"}, }, }); diff --git a/packages/prover/test/utils/e2e_env.ts b/packages/prover/test/utils/e2e_env.ts index b63d276daa5f..17af3739569a 100644 --- a/packages/prover/test/utils/e2e_env.ts +++ b/packages/prover/test/utils/e2e_env.ts @@ -1,6 +1,5 @@ import {waitForEndpoint} from "@lodestar/test-utils"; -/* eslint-disable @typescript-eslint/naming-convention */ export const rpcUrl = "http://0.0.0.0:8001"; export const beaconUrl = "http://0.0.0.0:5001"; export const proxyPort = 8888; diff --git a/packages/reqresp/package.json b/packages/reqresp/package.json index 44dcb8048f99..9bd9775ba2c0 100644 --- a/packages/reqresp/package.json +++ b/packages/reqresp/package.json @@ -45,8 +45,8 @@ "build:release": "yarn clean && yarn run build", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit", "test:unit": "vitest --run --dir test/unit/", "check-readme": "typescript-docs-verifier" diff --git a/packages/reqresp/src/encoders/responseDecode.ts b/packages/reqresp/src/encoders/responseDecode.ts index 93ebff674ec6..d55b283df5e6 100644 --- a/packages/reqresp/src/encoders/responseDecode.ts +++ b/packages/reqresp/src/encoders/responseDecode.ts @@ -125,9 +125,8 @@ export async function readErrorMessage(bufferedSource: BufferedSource): Promise< try { return decodeErrorMessage(bytes); - } catch { + } catch (_e) { // Error message is optional and may not be included in the response stream - // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call return Buffer.prototype.toString.call(bytes, "hex"); } } diff --git a/packages/reqresp/src/encodingStrategies/sszSnappy/decode.ts b/packages/reqresp/src/encodingStrategies/sszSnappy/decode.ts index 1bf9fc815e28..9ebe52876cfe 100644 --- a/packages/reqresp/src/encodingStrategies/sszSnappy/decode.ts +++ b/packages/reqresp/src/encodingStrategies/sszSnappy/decode.ts @@ -35,7 +35,7 @@ export async function readSszSnappyHeader(bufferedSource: BufferedSource, type: let sszDataLength: number; try { sszDataLength = varintDecode(buffer.subarray()); - } catch (e) { + } catch (_e) { throw new SszSnappyError({code: SszSnappyErrorCode.INVALID_VARINT_BYTES_COUNT, bytes: Infinity}); } diff --git a/packages/reqresp/src/encodingStrategies/sszSnappy/errors.ts b/packages/reqresp/src/encodingStrategies/sszSnappy/errors.ts index 12113ceb42fb..f9d6c4a8e9b5 100644 --- a/packages/reqresp/src/encodingStrategies/sszSnappy/errors.ts +++ b/packages/reqresp/src/encodingStrategies/sszSnappy/errors.ts @@ -28,8 +28,4 @@ type SszSnappyErrorType = | {code: SszSnappyErrorCode.TOO_MANY_BYTES; sszDataLength: number} | {code: SszSnappyErrorCode.SOURCE_ABORTED}; -export class SszSnappyError extends LodestarError { - constructor(type: SszSnappyErrorType) { - super(type); - } -} +export class SszSnappyError extends LodestarError {} diff --git a/packages/reqresp/src/encodingStrategies/sszSnappy/snappyFrames/uncompress.ts b/packages/reqresp/src/encodingStrategies/sszSnappy/snappyFrames/uncompress.ts index e97260989082..69d9ea44d834 100644 --- a/packages/reqresp/src/encodingStrategies/sszSnappy/snappyFrames/uncompress.ts +++ b/packages/reqresp/src/encodingStrategies/sszSnappy/snappyFrames/uncompress.ts @@ -35,7 +35,6 @@ export class SnappyFramesUncompress { } if (type === ChunkType.IDENTIFIER) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call if (!Buffer.prototype.equals.call(data, IDENTIFIER)) { throw "malformed input: bad identifier"; } diff --git a/packages/reqresp/src/metrics.ts b/packages/reqresp/src/metrics.ts index 4af18a782322..faf4b7cf65ae 100644 --- a/packages/reqresp/src/metrics.ts +++ b/packages/reqresp/src/metrics.ts @@ -5,7 +5,6 @@ export type Metrics = ReturnType; /** * A collection of metrics used throughout the Gossipsub behaviour. */ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function getMetrics(register: MetricsRegister) { // Using function style instead of class to prevent having to re-declare all MetricsPrometheus types. diff --git a/packages/reqresp/src/request/index.ts b/packages/reqresp/src/request/index.ts index 4920a32eb221..b79df24e2adf 100644 --- a/packages/reqresp/src/request/index.ts +++ b/packages/reqresp/src/request/index.ts @@ -98,7 +98,6 @@ export async function* sendRequest( async (timeoutAndParentSignal) => { const protocolIds = Array.from(protocolsMap.keys()); const conn = await libp2p.dialProtocol(peerId, protocolIds, {signal: timeoutAndParentSignal}); - // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (!conn) throw Error("dialProtocol timeout"); return conn; }, diff --git a/packages/reqresp/src/response/index.ts b/packages/reqresp/src/response/index.ts index 27758caa3f24..ad13ba8b9359 100644 --- a/packages/reqresp/src/response/index.ts +++ b/packages/reqresp/src/response/index.ts @@ -76,7 +76,7 @@ export async function handleRequest({ signal ).catch((e: unknown) => { if (e instanceof TimeoutError) { - throw e; // Let outter catch {} re-type the error as SERVER_ERROR + throw e; // Let outter catch (_e) {} re-type the error as SERVER_ERROR } else { throw new ResponseError(RespStatus.INVALID_REQUEST, (e as Error).message); } diff --git a/packages/reqresp/src/utils/bufferedSource.ts b/packages/reqresp/src/utils/bufferedSource.ts index ac31a62ba29c..569cc217ea23 100644 --- a/packages/reqresp/src/utils/bufferedSource.ts +++ b/packages/reqresp/src/utils/bufferedSource.ts @@ -18,7 +18,6 @@ export class BufferedSource { } [Symbol.asyncIterator](): AsyncIterator { - // eslint-disable-next-line @typescript-eslint/no-this-alias const that = this; let firstNext = true; @@ -32,7 +31,6 @@ export class BufferedSource { return {done: false, value: that.buffer}; } - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const {done, value: chunk} = await that.source.next(); if (done === true) { that.isDone = true; diff --git a/packages/reqresp/test/fixtures/encodingStrategies.ts b/packages/reqresp/test/fixtures/encodingStrategies.ts index c7705bb9493b..7bf183d8714c 100644 --- a/packages/reqresp/test/fixtures/encodingStrategies.ts +++ b/packages/reqresp/test/fixtures/encodingStrategies.ts @@ -15,7 +15,6 @@ import { // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); type SszSnappyTestBlockData = { diff --git a/packages/reqresp/test/fixtures/messages.ts b/packages/reqresp/test/fixtures/messages.ts index 5558e7c3e13a..a243a05b221b 100644 --- a/packages/reqresp/test/fixtures/messages.ts +++ b/packages/reqresp/test/fixtures/messages.ts @@ -14,7 +14,6 @@ type MessageFixture = { }; const phase0Metadata = ssz.phase0.Metadata.fromJson({ - // eslint-disable-next-line @typescript-eslint/naming-convention seq_number: "9", attnets: "0x0000000000000000", }); @@ -37,7 +36,6 @@ export const sszSnappyPhase0Metadata: MessageFixture = { }; const altairMetadata = ssz.altair.Metadata.fromJson({ - // eslint-disable-next-line @typescript-eslint/naming-convention seq_number: "8", attnets: "0x0000000000000000", syncnets: "0x00", @@ -178,7 +176,6 @@ if (slotBlockAltair - slotBlockPhase0 < SLOTS_PER_EPOCH) { throw Error("phase0 block slot must be an epoch apart from altair block slot"); } const ALTAIR_FORK_EPOCH = Math.floor(slotBlockAltair / SLOTS_PER_EPOCH); -// eslint-disable-next-line @typescript-eslint/naming-convention export const beaconConfig = createBeaconConfig({...chainConfig, ALTAIR_FORK_EPOCH}, ZERO_HASH); export const getEmptyHandler = () => async function* emptyHandler(): AsyncGenerator {}; diff --git a/packages/reqresp/test/fixtures/protocols.ts b/packages/reqresp/test/fixtures/protocols.ts index f20d891781ef..19e8936fc376 100644 --- a/packages/reqresp/test/fixtures/protocols.ts +++ b/packages/reqresp/test/fixtures/protocols.ts @@ -5,7 +5,6 @@ import {ContextBytesType, DialOnlyProtocol, Encoding, ProtocolHandler, Protocol} import {getEmptyHandler} from "./messages.js"; import {beaconConfig} from "./messages.js"; -// eslint-disable-next-line @typescript-eslint/naming-convention const NumToStrReq = new ContainerType( { value: new UintNumberType(4), @@ -15,7 +14,6 @@ const NumToStrReq = new ContainerType( export type NumToStrReqType = ValueOf; -// eslint-disable-next-line @typescript-eslint/naming-convention const NumToStrResp = new ContainerType( { value: new ListBasicType(new UintNumberType(1), 4), diff --git a/packages/spec-test-util/package.json b/packages/spec-test-util/package.json index b4aabf0140e8..501d13024159 100644 --- a/packages/spec-test-util/package.json +++ b/packages/spec-test-util/package.json @@ -44,8 +44,8 @@ "build:watch": "yarn run build --watch", "check-build": "node -e \"(async function() { await import('./lib/downloadTests.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit && yarn test:e2e", "test:unit": "vitest --run --passWithNoTests --dir test/unit/", "test:e2e": "vitest --run --config vitest.e2e.config.ts --dir test/e2e/", diff --git a/packages/spec-test-util/src/single.ts b/packages/spec-test-util/src/single.ts index 47bf8d0a0742..af77d45f6242 100644 --- a/packages/spec-test-util/src/single.ts +++ b/packages/spec-test-util/src/single.ts @@ -68,6 +68,7 @@ export interface SpecTestOptions { * Optionally pass function to transform loaded values * (values from input files) */ + inputProcessing?: {[K: string]: (value: any) => any}; shouldError?: (testCase: TestCase) => boolean; @@ -86,7 +87,7 @@ const defaultOptions: SpecTestOptions = { getExpected: (testCase) => testCase, shouldError: () => false, shouldSkip: () => false, - expectFunc: (testCase, expected, actual) => expect(actual).to.be.deep.equal(expected), + expectFunc: (_testCase, expected, actual) => expect(actual).to.be.deep.equal(expected), timeout: 10 * 60 * 1000, }; @@ -101,7 +102,7 @@ export function describeDirectorySpecTest throw new Error(`${testCaseDirectoryPath} is not directory`); } - describe(name, function () { + describe(name, () => { if (options.timeout !== undefined) { vi.setConfig({testTimeout: options.timeout ?? 10 * 60 * 1000}); } @@ -114,7 +115,7 @@ export function describeDirectorySpecTest // Use full path here, not just `testSubDirname` to allow usage of `vitest -t` const testName = `${name}/${testSubDirname}`; - it(testName, async function (context) { + it(testName, async (context) => { // some tests require to load meta.yaml first in order to know respective ssz types. const metaFilePath = path.join(testSubDirPath, "meta.yaml"); const meta: TestCase["meta"] = fs.existsSync(metaFilePath) @@ -131,7 +132,7 @@ export function describeDirectorySpecTest if (options.shouldError?.(testCase)) { try { await testFunction(testCase, name); - } catch (e) { + } catch (_e) { return; } } else { diff --git a/packages/spec-test-util/test/e2e/single/index.test.ts b/packages/spec-test-util/test/e2e/single/index.test.ts index 849b0cead30d..2dbefbb9cd22 100644 --- a/packages/spec-test-util/test/e2e/single/index.test.ts +++ b/packages/spec-test-util/test/e2e/single/index.test.ts @@ -8,11 +8,8 @@ import {describeDirectorySpecTest, InputType, loadYamlFile} from "../../../src/s // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); -/* eslint-disable @typescript-eslint/naming-convention */ - export type SimpleStruct = { test: boolean; number: number; diff --git a/packages/state-transition/package.json b/packages/state-transition/package.json index 6816e5679cf5..e743ece013d9 100644 --- a/packages/state-transition/package.json +++ b/packages/state-transition/package.json @@ -50,8 +50,8 @@ "build:release": "yarn clean && yarn build", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit", "test:unit": "vitest --run --dir test/unit/", "check-readme": "typescript-docs-verifier" diff --git a/packages/state-transition/src/block/processDeposit.ts b/packages/state-transition/src/block/processDeposit.ts index ee75dff0dfd1..fd671dc5f6f6 100644 --- a/packages/state-transition/src/block/processDeposit.ts +++ b/packages/state-transition/src/block/processDeposit.ts @@ -173,7 +173,7 @@ function isValidDepositSignature( const signature = Signature.fromBytes(depositSignature, true); return verify(signingRoot, publicKey, signature); - } catch (e) { + } catch (_e) { return false; // Catch all BLS errors: failed key validation, failed signature validation, invalid signature } } diff --git a/packages/state-transition/src/util/balance.ts b/packages/state-transition/src/util/balance.ts index e9b7a06e4130..c6b196846ec9 100644 --- a/packages/state-transition/src/util/balance.ts +++ b/packages/state-transition/src/util/balance.ts @@ -2,7 +2,7 @@ import {EFFECTIVE_BALANCE_INCREMENT} from "@lodestar/params"; import {Gwei, ValidatorIndex} from "@lodestar/types"; import {bigIntMax} from "@lodestar/utils"; import {EffectiveBalanceIncrements} from "../cache/effectiveBalanceIncrements.js"; -import {BeaconStateAllForks} from ".."; +import {BeaconStateAllForks} from "../index.js"; import {CachedBeaconStateAllForks} from "../types.js"; /** diff --git a/packages/state-transition/src/util/blindedBlock.ts b/packages/state-transition/src/util/blindedBlock.ts index 2e4e4d590817..ceda91c94bb1 100644 --- a/packages/state-transition/src/util/blindedBlock.ts +++ b/packages/state-transition/src/util/blindedBlock.ts @@ -25,9 +25,13 @@ export function blindedOrFullBlockHashTreeRoot( ): Root { return isBlindedBeaconBlock(blindedOrFull) ? // Blinded - config.getExecutionForkTypes(blindedOrFull.slot).BlindedBeaconBlock.hashTreeRoot(blindedOrFull) + config + .getExecutionForkTypes(blindedOrFull.slot) + .BlindedBeaconBlock.hashTreeRoot(blindedOrFull) : // Full - config.getForkTypes(blindedOrFull.slot).BeaconBlock.hashTreeRoot(blindedOrFull); + config + .getForkTypes(blindedOrFull.slot) + .BeaconBlock.hashTreeRoot(blindedOrFull); } export function blindedOrFullBlockToHeader( @@ -36,9 +40,13 @@ export function blindedOrFullBlockToHeader( ): BeaconBlockHeader { const bodyRoot = isBlindedBeaconBlock(blindedOrFull) ? // Blinded - config.getExecutionForkTypes(blindedOrFull.slot).BlindedBeaconBlockBody.hashTreeRoot(blindedOrFull.body) + config + .getExecutionForkTypes(blindedOrFull.slot) + .BlindedBeaconBlockBody.hashTreeRoot(blindedOrFull.body) : // Full - config.getForkTypes(blindedOrFull.slot).BeaconBlockBody.hashTreeRoot(blindedOrFull.body); + config + .getForkTypes(blindedOrFull.slot) + .BeaconBlockBody.hashTreeRoot(blindedOrFull.body); return { slot: blindedOrFull.slot, diff --git a/packages/state-transition/src/util/seed.ts b/packages/state-transition/src/util/seed.ts index a5a0028d6c17..4131d4d9481f 100644 --- a/packages/state-transition/src/util/seed.ts +++ b/packages/state-transition/src/util/seed.ts @@ -155,7 +155,7 @@ export function computeShuffledIndex(index: number, indexCount: number, seed: By const position = Math.max(permuted, flip); const source = digest(Buffer.concat([_seed, intToBytes(i, 1), intToBytes(Math.floor(position / 256), 4)])); const byte = source[Math.floor((position % 256) / 8)]; - const bit = (byte >> position % 8) % 2; + const bit = (byte >> (position % 8)) % 2; permuted = bit ? flip : permuted; } return permuted; diff --git a/packages/state-transition/src/util/shuffle.ts b/packages/state-transition/src/util/shuffle.ts index 39137bca69d0..a87f22cae43e 100644 --- a/packages/state-transition/src/util/shuffle.ts +++ b/packages/state-transition/src/util/shuffle.ts @@ -108,7 +108,6 @@ function innerShuffleList(input: Shuffleable, seed: Bytes32, dir: boolean): void let source = seed; // just setting it to a Bytes32 let byteV = 0; - // eslint-disable-next-line no-constant-condition while (true) { // spec: pivot = bytes_to_int(hash(seed + int_to_bytes1(round))[0:8]) % list_size // This is the "int_to_bytes1(round)", appended to the seed. diff --git a/packages/state-transition/src/util/weakSubjectivity.ts b/packages/state-transition/src/util/weakSubjectivity.ts index 0e606e66340f..8d7c82842496 100644 --- a/packages/state-transition/src/util/weakSubjectivity.ts +++ b/packages/state-transition/src/util/weakSubjectivity.ts @@ -80,7 +80,6 @@ export function computeWeakSubjectivityPeriodFromConstituents( const t = Math.floor(totalBalanceByIncrement / N); const T = MAX_EFFECTIVE_BALANCE / ETH_TO_GWEI; const delta = churnLimit; - // eslint-disable-next-line @typescript-eslint/naming-convention const Delta = MAX_DEPOSITS * SLOTS_PER_EPOCH; const D = SAFETY_DECAY; diff --git a/packages/state-transition/test/cache.ts b/packages/state-transition/test/cache.ts index 9ca7ea25201c..59ddfe40b7c1 100644 --- a/packages/state-transition/test/cache.ts +++ b/packages/state-transition/test/cache.ts @@ -3,7 +3,6 @@ import {fileURLToPath} from "node:url"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); export const testCachePath = path.join(__dirname, "../test-cache"); diff --git a/packages/state-transition/test/perf/analyzeEpochs.ts b/packages/state-transition/test/perf/analyzeEpochs.ts index deb0861427bf..9fe04bf7c522 100644 --- a/packages/state-transition/test/perf/analyzeEpochs.ts +++ b/packages/state-transition/test/perf/analyzeEpochs.ts @@ -123,7 +123,6 @@ async function analyzeEpochs(network: NetworkName, fromEpoch?: number): Promise< const {previousEpochAttestations, currentEpochAttestations} = state as phase0.BeaconState; - // eslint-disable-next-line no-console console.log(`Processed epoch ${epoch}`); writeToCsv({ epoch, @@ -182,7 +181,6 @@ if (!network) { } analyzeEpochs(network as NetworkName, fromEpoch).catch((e: Error) => { - // eslint-disable-next-line no-console console.error(e); process.exit(1); }); diff --git a/packages/state-transition/test/perf/dataStructures/arrayish.memory.ts b/packages/state-transition/test/perf/dataStructures/arrayish.memory.ts index 7e10f447181f..f37421ce2a89 100644 --- a/packages/state-transition/test/perf/dataStructures/arrayish.memory.ts +++ b/packages/state-transition/test/perf/dataStructures/arrayish.memory.ts @@ -110,7 +110,6 @@ for (let i = 0; i < 1e8; i++) { const heapUsedM = linearRegression(xs, heapUsed).m; const rssM = linearRegression(xs, rss).m; - // eslint-disable-next-line no-console console.log(i, {arrayBuffersM, externalM, heapTotalM, heapUsedM, rssM}); } } diff --git a/packages/state-transition/test/perf/epoch/processRegistryUpdates.test.ts b/packages/state-transition/test/perf/epoch/processRegistryUpdates.test.ts index 2d57de44f8ee..588fe9ec0213 100644 --- a/packages/state-transition/test/perf/epoch/processRegistryUpdates.test.ts +++ b/packages/state-transition/test/perf/epoch/processRegistryUpdates.test.ts @@ -78,7 +78,7 @@ type IndicesLengths = { * Create a state that causes `changeRatio` fraction (0,1) of validators to change their effective balance. */ function getRegistryUpdatesTestData( - vc: number, + _vc: number, lengths: IndicesLengths ): { state: CachedBeaconStateAllForks; diff --git a/packages/state-transition/test/perf/misc/arrayCreation.test.ts b/packages/state-transition/test/perf/misc/arrayCreation.test.ts index 8fd52ff99e27..c6a3cf29ed8e 100644 --- a/packages/state-transition/test/perf/misc/arrayCreation.test.ts +++ b/packages/state-transition/test/perf/misc/arrayCreation.test.ts @@ -36,7 +36,6 @@ describe.skip("array creation", function () { } const to = process.hrtime.bigint(); const diffMs = Number(to - from) / 1e6; - // eslint-disable-next-line no-console console.log(`${id}: ${diffMs / opsRun} ms`); }); } diff --git a/packages/state-transition/test/perf/misc/bitopts.test.ts b/packages/state-transition/test/perf/misc/bitopts.test.ts index 93df681bb3e2..38677002a969 100644 --- a/packages/state-transition/test/perf/misc/bitopts.test.ts +++ b/packages/state-transition/test/perf/misc/bitopts.test.ts @@ -14,7 +14,6 @@ describe.skip("bit opts", function () { } const to = process.hrtime.bigint(); const diffMs = Number(to - from) / 1e6; - // eslint-disable-next-line no-console console.log(`Time spent on OR in getAttestationDeltas: ${diffMs * ((orOptsPerRun * validators) / opsRun)} ms`); }); }); diff --git a/packages/state-transition/test/perf/shuffle/shuffle.test.ts b/packages/state-transition/test/perf/shuffle/shuffle.test.ts index ea1a9d606184..55f7875e69dd 100644 --- a/packages/state-transition/test/perf/shuffle/shuffle.test.ts +++ b/packages/state-transition/test/perf/shuffle/shuffle.test.ts @@ -10,7 +10,8 @@ describe("shuffle list", () => { const seed = new Uint8Array([42, 32]); for (const listSize of [ - 16384, 250000, + 16384, + 250000, // Don't run 4_000_000 since it's very slow and not testnet has gotten there yet // 4e6, ]) { diff --git a/packages/state-transition/test/perf/util.ts b/packages/state-transition/test/perf/util.ts index c764e2d039f9..7a0bfb29efb3 100644 --- a/packages/state-transition/test/perf/util.ts +++ b/packages/state-transition/test/perf/util.ts @@ -61,7 +61,6 @@ const secretKeyByModIndex = new Map(); const epoch = 23638; export const perfStateEpoch = epoch; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function getPubkeys(vc = numValidators) { const pubkeysMod = interopPubkeysCached(keypairsMod); const pubkeysModObj = pubkeysMod.map((pk) => PublicKey.fromBytes(pk)); @@ -85,7 +84,6 @@ export function getSecretKeyFromIndexCached(validatorIndex: number): SecretKey { return sk; } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type function getPubkeyCaches({pubkeysMod, pubkeysModObj}: ReturnType) { // Manually sync pubkeys to prevent doing BLS opts 110_000 times const pubkey2index = new PubkeyIndexMap(); @@ -223,7 +221,6 @@ export function generatePerfTestCachedStateAltair(opts?: { const {pubkeys, pubkeysMod, pubkeysModObj} = getPubkeys(opts?.vc); const {pubkey2index, index2pubkey} = getPubkeyCaches({pubkeys, pubkeysMod, pubkeysModObj}); - // eslint-disable-next-line @typescript-eslint/naming-convention const altairConfig = createChainForkConfig({ALTAIR_FORK_EPOCH: 0}); const origState = generatePerformanceStateAltair(pubkeys); diff --git a/packages/state-transition/test/unit/cachedBeaconState.test.ts b/packages/state-transition/test/unit/cachedBeaconState.test.ts index 96c026340143..668f22e13a1e 100644 --- a/packages/state-transition/test/unit/cachedBeaconState.test.ts +++ b/packages/state-transition/test/unit/cachedBeaconState.test.ts @@ -52,7 +52,6 @@ describe("CachedBeaconState", () => { expect(state2.epochCtx.getValidatorIndex(pubkey2)).toBe(index2); }); - /* eslint-disable @typescript-eslint/naming-convention */ it("Clone and mutate cache post-Electra", () => { const stateView = ssz.electra.BeaconState.defaultViewDU(); const state1 = createCachedBeaconStateTest( diff --git a/packages/state-transition/test/unit/upgradeState.test.ts b/packages/state-transition/test/unit/upgradeState.test.ts index 301cb105dc98..19a7d5c186f8 100644 --- a/packages/state-transition/test/unit/upgradeState.test.ts +++ b/packages/state-transition/test/unit/upgradeState.test.ts @@ -46,7 +46,6 @@ const ZERO_HASH = Buffer.alloc(32, 0); /** default config with ZERO_HASH as genesisValidatorsRoot */ const config = createBeaconConfig(chainConfig, ZERO_HASH); -/* eslint-disable @typescript-eslint/naming-convention */ function getConfig(fork: ForkName, forkEpoch = 0): ChainForkConfig { switch (fork) { case ForkName.phase0: diff --git a/packages/state-transition/test/unit/util/aggregator.test.ts b/packages/state-transition/test/unit/util/aggregator.test.ts index 07fd3172926c..6a9d0a45a2c7 100644 --- a/packages/state-transition/test/unit/util/aggregator.test.ts +++ b/packages/state-transition/test/unit/util/aggregator.test.ts @@ -8,8 +8,6 @@ import { } from "@lodestar/params"; import {isAggregatorFromCommitteeLength, isSyncCommitteeAggregator} from "../../../src/util/aggregator.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - describe("isAttestationAggregator", function () { const committeeLength = 130; diff --git a/packages/state-transition/test/unit/util/deposit.test.ts b/packages/state-transition/test/unit/util/deposit.test.ts index 3cfa4abb3409..a682b4e993ed 100644 --- a/packages/state-transition/test/unit/util/deposit.test.ts +++ b/packages/state-transition/test/unit/util/deposit.test.ts @@ -29,7 +29,6 @@ describe("getEth1DepositCount", () => { const postElectraState = createCachedBeaconStateTest( stateView, createChainForkConfig({ - /* eslint-disable @typescript-eslint/naming-convention */ ALTAIR_FORK_EPOCH: 0, BELLATRIX_FORK_EPOCH: 0, CAPELLA_FORK_EPOCH: 0, @@ -63,7 +62,6 @@ describe("getEth1DepositCount", () => { const postElectraState = createCachedBeaconStateTest( stateView, createChainForkConfig({ - /* eslint-disable @typescript-eslint/naming-convention */ ALTAIR_FORK_EPOCH: 0, BELLATRIX_FORK_EPOCH: 0, CAPELLA_FORK_EPOCH: 0, diff --git a/packages/state-transition/test/utils/beforeValue.ts b/packages/state-transition/test/utils/beforeValue.ts index f50520372e17..6a2f5ee86945 100644 --- a/packages/state-transition/test/utils/beforeValue.ts +++ b/packages/state-transition/test/utils/beforeValue.ts @@ -21,7 +21,7 @@ export function beforeValue(fn: () => T | Promise, timeout?: number): Lazy return new Proxy<{value: T}>( {value}, { - get: function (target, prop) { + get: function (_target, prop) { if (prop === "value") { if (value === null) { throw Error("beforeValue has not yet run the before() block"); diff --git a/packages/state-transition/test/utils/beforeValueMocha.ts b/packages/state-transition/test/utils/beforeValueMocha.ts index 0d5f8f77d203..d078357bd3b4 100644 --- a/packages/state-transition/test/utils/beforeValueMocha.ts +++ b/packages/state-transition/test/utils/beforeValueMocha.ts @@ -20,7 +20,7 @@ export function beforeValue(fn: () => T | Promise, timeout?: number): Lazy return new Proxy<{value: T}>( {value}, { - get: function (target, prop) { + get: function (_target, prop) { if (prop === "value") { if (value === null) { throw Error("beforeValue has not yet run the before() block"); diff --git a/packages/state-transition/test/utils/rand.ts b/packages/state-transition/test/utils/rand.ts index 11a0efaffe10..988146ac4bf4 100644 --- a/packages/state-transition/test/utils/rand.ts +++ b/packages/state-transition/test/utils/rand.ts @@ -4,7 +4,8 @@ */ export function mulberry32(a: number) { return function () { - let t = (a += 0x6d2b79f5); + a += 0x6d2b79f5; + let t = a; t = Math.imul(t ^ (t >>> 15), t | 1); t ^= t + Math.imul(t ^ (t >>> 7), t | 61); return ((t ^ (t >>> 14)) >>> 0) / 4294967296; diff --git a/packages/state-transition/test/utils/specTestCases.ts b/packages/state-transition/test/utils/specTestCases.ts index 6c038d202d74..ed3776d868d0 100644 --- a/packages/state-transition/test/utils/specTestCases.ts +++ b/packages/state-transition/test/utils/specTestCases.ts @@ -3,7 +3,6 @@ import {fileURLToPath} from "node:url"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); export const SPEC_TEST_LOCATION = path.join(__dirname, "../../../../node_modules/@chainsafe/eth2-spec-tests"); diff --git a/packages/state-transition/test/utils/testFileCache.ts b/packages/state-transition/test/utils/testFileCache.ts index b894674f54f6..28741bf932c5 100644 --- a/packages/state-transition/test/utils/testFileCache.ts +++ b/packages/state-transition/test/utils/testFileCache.ts @@ -96,7 +96,6 @@ export async function getNetworkCachedBlock( async function downloadTestFile(fileId: string): Promise { const fileUrl = `${TEST_FILES_BASE_URL}/${fileId}`; - // eslint-disable-next-line no-console console.log(`Downloading file ${fileUrl}`); const res = await got(fileUrl, {responseType: "buffer"}).catch((e: Error) => { diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 5bf61891a9d5..b2a589581055 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -42,8 +42,8 @@ "build:watch": "yarn run build --watch", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/", + "lint:fix": "yarn run lint --write", "check-readme": "typescript-docs-verifier" }, "repository": { diff --git a/packages/test-utils/src/childProcess.ts b/packages/test-utils/src/childProcess.ts index cd6983cca467..d8b86b83ee48 100644 --- a/packages/test-utils/src/childProcess.ts +++ b/packages/test-utils/src/childProcess.ts @@ -86,7 +86,7 @@ export function isPidRunning(pid: number): boolean { // Signal 0 is a special signal that checks if the process exists process.kill(pid, 0); return true; - } catch { + } catch (_e) { return false; } } @@ -304,7 +304,7 @@ export async function spawnChildProcess( }); proc.removeAllListeners("exit"); resolve(proc); - } catch (error) { + } catch (_e) { reject( new Error( `Health check timeout. logPrefix=${logPrefix} pid=${proc.pid} healthTimeout=${prettyMsToTime(healthTimeoutMs ?? 0)}` diff --git a/packages/test-utils/src/cli.ts b/packages/test-utils/src/cli.ts index 8b4a84ec467a..c081a65e03c2 100644 --- a/packages/test-utils/src/cli.ts +++ b/packages/test-utils/src/cli.ts @@ -28,7 +28,6 @@ export async function runCliCommand( opts: CommandRunOptions = {timeoutMs: 1000} ): Promise { return wrapTimeout( - // eslint-disable-next-line no-async-promise-executor new Promise(async (resolve, reject) => { try { await cli diff --git a/packages/test-utils/src/doubles.ts b/packages/test-utils/src/doubles.ts index c61c10ea6099..171c55824996 100644 --- a/packages/test-utils/src/doubles.ts +++ b/packages/test-utils/src/doubles.ts @@ -37,7 +37,6 @@ function wrapLogWriter(...writers: [writer: object, ...keys: string[]][]): { for (const key of keys) { originals[index][key] = writer[key as keyof typeof writer]; - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error writer[key as keyof typeof writer] = function mockedWriter(data: string) { // Our fixtures does not include the new line character @@ -51,7 +50,6 @@ function wrapLogWriter(...writers: [writer: object, ...keys: string[]][]): { restore: () => { for (const [index, [writer, ...keys]] of writers.entries()) { for (const key of keys) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error writer[key as keyof typeof writer] = originals[index][key]; } diff --git a/packages/test-utils/src/externalSigner.ts b/packages/test-utils/src/externalSigner.ts index dbcb6bee1dc5..1e48e6af8d40 100644 --- a/packages/test-utils/src/externalSigner.ts +++ b/packages/test-utils/src/externalSigner.ts @@ -69,7 +69,6 @@ export async function startExternalSigner({ stream .on("data", (line) => process.stdout.write(line)) .on("err", (line) => process.stderr.write(line)) - // eslint-disable-next-line no-console .on("end", () => console.log("Stream closed")); return { diff --git a/packages/test-utils/src/http.ts b/packages/test-utils/src/http.ts index b4dd16390483..85b64c110cab 100644 --- a/packages/test-utils/src/http.ts +++ b/packages/test-utils/src/http.ts @@ -42,7 +42,6 @@ export async function matchReqSuccess(url: string, method: Method = "GET"): Prom * Wait for a given endpoint to return a given status code */ export async function waitForEndpoint(url: string, statusCode = 200): Promise { - // eslint-disable-next-line no-constant-condition while (true) { const status = await getReqStatus(url); diff --git a/packages/types/package.json b/packages/types/package.json index f3e034ec1b35..1c020b409071 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -59,8 +59,8 @@ "build:release": "yarn clean && yarn build", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test": "yarn test:unit", "test:constants:minimal": "LODESTAR_PRESET=minimal vitest --run --dir test/constants/", "test:constants:mainnet": "LODESTAR_PRESET=mainnet vitest --run --dir test/constants/", diff --git a/packages/types/src/sszTypes.ts b/packages/types/src/sszTypes.ts index 4399904a94bc..55218574be76 100644 --- a/packages/types/src/sszTypes.ts +++ b/packages/types/src/sszTypes.ts @@ -26,7 +26,8 @@ const typesByFork = { /** * A type of union of forks must accept as any parameter the UNION of all fork types. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any + +// biome-ignore lint/suspicious/noExplicitAny: type UnionSSZForksTypeOf> = CompositeType< ValueOf, CompositeView, @@ -41,11 +42,9 @@ type SSZTypesByFork = { export type SSZTypesFor = K extends void ? // It compiles fine, need to debug the error - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error {[K2 in keyof SSZTypesByFork[F]]: UnionSSZForksTypeOf} : // It compiles fine, need to debug the error - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error UnionSSZForksTypeOf]>; diff --git a/packages/utils/package.json b/packages/utils/package.json index 0723f5f1815c..6c8218741e30 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -28,8 +28,8 @@ "build:release": "yarn clean && yarn build", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc && vitest --run --typecheck --dir test/types/", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test:unit": "vitest --run --dir test/unit", "test:browsers": "yarn test:browsers:chrome && yarn test:browsers:firefox && yarn test:browsers:electron", "test:browsers:chrome": "vitest --run --browser chrome --config ./vitest.browser.config.ts --dir test/unit", diff --git a/packages/utils/src/assert.ts b/packages/utils/src/assert.ts index 91612b0e6407..7b6af1f00f97 100644 --- a/packages/utils/src/assert.ts +++ b/packages/utils/src/assert.ts @@ -16,7 +16,6 @@ export const assert = { */ equal(actual: T, expected: T, message?: string): void { if (!(actual === expected)) { - // eslint-disable-next-line @typescript-eslint/restrict-template-expressions throw new AssertionError(`${message || "Expected values to be equal"}: ${actual} === ${expected}`); } }, diff --git a/packages/utils/src/command.ts b/packages/utils/src/command.ts index 89929a6c41ef..2e62ba5a9648 100644 --- a/packages/utils/src/command.ts +++ b/packages/utils/src/command.ts @@ -6,7 +6,7 @@ export interface CliExample { description?: string; } -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: export interface CliOptionDefinition extends Options { example?: Omit; // Ensure `type` property matches type of `T` @@ -28,7 +28,7 @@ export type CliCommandOptions = Required<{ CliOptionDefinition & (Required> | {demandOption: true}); }>; -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: export interface CliCommand, ParentArgs = Record, R = any> { command: string; describe: string; @@ -41,7 +41,7 @@ export interface CliCommand, ParentArgs = Record< options?: CliCommandOptions; // 1st arg: any = free own sub command options // 2nd arg: subcommand parent options is = to this command options + parent options - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: subcommands?: CliCommand[]; handler?: (args: OwnArgs & ParentArgs) => Promise; } @@ -51,7 +51,8 @@ export interface CliCommand, ParentArgs = Record< * @param yargs * @param cliCommand */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any + +// biome-ignore lint/suspicious/noExplicitAny: export function registerCommandToYargs(yargs: Argv, cliCommand: CliCommand): void { yargs.command({ command: cliCommand.command, diff --git a/packages/utils/src/diff.ts b/packages/utils/src/diff.ts index 204989016b46..4aab18e32779 100644 --- a/packages/utils/src/diff.ts +++ b/packages/utils/src/diff.ts @@ -203,10 +203,12 @@ export function getDiffs(val1: Diffable, val2: Diffable, objectPath: string): Di */ export function diff(val1: unknown, val2: unknown, outputValues = false, filename?: string): void { if (!isDiffable(val1)) { + // biome-ignore lint/suspicious/noConsoleLog: console.log("val1 is not Diffable"); return; } if (!isDiffable(val2)) { + // biome-ignore lint/suspicious/noConsoleLog: console.log("val2 is not Diffable"); return; } @@ -226,6 +228,7 @@ export function diff(val1: unknown, val2: unknown, outputValues = false, filenam if (filename) { fs.writeFileSync(filename, output); } else { + // biome-ignore lint/suspicious/noConsoleLog: console.log(output); } } diff --git a/packages/utils/src/err.ts b/packages/utils/src/err.ts index 81f6f92c0044..7c27a0a067a3 100644 --- a/packages/utils/src/err.ts +++ b/packages/utils/src/err.ts @@ -4,7 +4,6 @@ export type Err = {[symErr]: true; error: T}; export type Result = T | Err; -// eslint-disable-next-line @typescript-eslint/naming-convention export function Err(error: T): Err { return {[symErr]: true, error}; } diff --git a/packages/utils/src/logger.ts b/packages/utils/src/logger.ts index 925a357f4b98..e299e730a81a 100644 --- a/packages/utils/src/logger.ts +++ b/packages/utils/src/logger.ts @@ -12,7 +12,6 @@ export enum LogLevel { trace = "trace", } -// eslint-disable-next-line @typescript-eslint/naming-convention export const LogLevels = Object.values(LogLevel); export type LogHandler = (message: string, context?: LogData, error?: Error) => void; diff --git a/packages/utils/src/objects.ts b/packages/utils/src/objects.ts index ad09d36b0ecc..913bc80275b7 100644 --- a/packages/utils/src/objects.ts +++ b/packages/utils/src/objects.ts @@ -63,7 +63,7 @@ export function isEmptyObject(value: unknown): boolean { * * Inspired on lodash.mapValues, see https://lodash.com/docs/4.17.15#mapValues */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: export function mapValues( obj: T, iteratee: (value: T[keyof T], key: keyof T) => R diff --git a/packages/utils/src/promise.ts b/packages/utils/src/promise.ts index 2be7467bfff4..894444d46937 100644 --- a/packages/utils/src/promise.ts +++ b/packages/utils/src/promise.ts @@ -109,7 +109,6 @@ export async function resolveOrRacePromises wrapPromise(p)) as ReturnPromiseWithTuple; // We intentionally want an array of promises here - // eslint-disable-next-line @typescript-eslint/no-floating-promises promises = (promiseResults as PromiseResult[]).map((p) => p.promise) as unknown as T; try { diff --git a/packages/utils/src/yaml/int.ts b/packages/utils/src/yaml/int.ts index 64a2c283dd49..bc68895cfd42 100644 --- a/packages/utils/src/yaml/int.ts +++ b/packages/utils/src/yaml/int.ts @@ -162,25 +162,20 @@ export const intType = new Type("tag:yaml.org,2002:int", { construct: constructYamlInteger, predicate: isInteger, instanceOf: BigInt, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore represent: { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore binary: function binary(obj: number) { return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); }, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore octal: function octal(obj: number) { return obj >= 0 ? "0" + obj.toString(8) : "-0" + obj.toString(8).slice(1); }, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore decimal: function decimal(obj: number) { return obj.toString(10); }, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore hexadecimal: function hexadecimal(obj: number) { return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); diff --git a/packages/utils/src/yaml/schema.ts b/packages/utils/src/yaml/schema.ts index b53fc14a3e86..8db0c67cd943 100644 --- a/packages/utils/src/yaml/schema.ts +++ b/packages/utils/src/yaml/schema.ts @@ -3,9 +3,7 @@ import yml, {FAILSAFE_SCHEMA, Type} from "js-yaml"; import {intType} from "./int.js"; export const schema = FAILSAFE_SCHEMA.extend({ - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access implicit: [yml.types.null as Type, yml.types.bool as Type, intType, yml.types.float as Type], explicit: [], }); diff --git a/packages/utils/test/unit/err.test.ts b/packages/utils/test/unit/err.test.ts index 94cebe3ed1a1..7a08ebbc4319 100644 --- a/packages/utils/test/unit/err.test.ts +++ b/packages/utils/test/unit/err.test.ts @@ -60,7 +60,7 @@ describe("Result Err", () => { try { await mapOkResultsAsync([], async () => [0]); throw Error("did not throw"); - } catch (e) { + } catch (_e) { // Ok } }); diff --git a/packages/utils/test/unit/objects.test.ts b/packages/utils/test/unit/objects.test.ts index 4699a8c6f405..a94ed9213390 100644 --- a/packages/utils/test/unit/objects.test.ts +++ b/packages/utils/test/unit/objects.test.ts @@ -17,8 +17,6 @@ describe("Objects helper", () => { }); }); -/* eslint-disable @typescript-eslint/naming-convention */ - describe("objectToExpectedCase", () => { const testCases: { id: string; diff --git a/packages/validator/package.json b/packages/validator/package.json index 65ed656f010d..932eedac1dba 100644 --- a/packages/validator/package.json +++ b/packages/validator/package.json @@ -25,8 +25,8 @@ "build:watch": "yarn run build --watch", "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"", "check-types": "tsc", - "lint": "eslint --color --ext .ts src/ test/", - "lint:fix": "yarn run lint --fix", + "lint": "biome check src/ test/", + "lint:fix": "yarn run lint --write", "test:unit": "vitest --run --dir test/unit/", "test": "yarn test:unit && yarn test:e2e", "test:spec": "vitest --run --config vitest.spec.config.ts --dir test/spec/", diff --git a/packages/validator/src/genesis.ts b/packages/validator/src/genesis.ts index 3156acee689f..7fc3e20673bc 100644 --- a/packages/validator/src/genesis.ts +++ b/packages/validator/src/genesis.ts @@ -6,7 +6,6 @@ import {ApiClient} from "@lodestar/api"; const WAITING_FOR_GENESIS_POLL_MS = 12 * 1000; export async function waitForGenesis(api: ApiClient, logger: Logger, signal?: AbortSignal): Promise { - // eslint-disable-next-line no-constant-condition while (true) { try { return (await api.beacon.getGenesis()).value(); diff --git a/packages/validator/src/metrics.ts b/packages/validator/src/metrics.ts index a437328e8d5f..ca693056fc54 100644 --- a/packages/validator/src/metrics.ts +++ b/packages/validator/src/metrics.ts @@ -25,7 +25,6 @@ export type LodestarGitData = { /** * A collection of metrics used by the validator client */ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function getMetrics(register: MetricsRegisterExtra, gitData: LodestarGitData) { // Using function style instead of class to prevent having to re-declare all MetricsPrometheus types. diff --git a/packages/validator/src/services/emitter.ts b/packages/validator/src/services/emitter.ts index 19f9ac1de54a..2072acba6219 100644 --- a/packages/validator/src/services/emitter.ts +++ b/packages/validator/src/services/emitter.ts @@ -1,4 +1,4 @@ -import {EventEmitter} from "events"; +import {EventEmitter} from "node:events"; import {StrictEventEmitter} from "strict-event-emitter-types"; import {Slot} from "@lodestar/types"; import {HeadEventData} from "./chainHeaderTracker.js"; diff --git a/packages/validator/src/slashingProtection/attestation/errors.ts b/packages/validator/src/slashingProtection/attestation/errors.ts index 7d4b0978d097..34e11c190c8a 100644 --- a/packages/validator/src/slashingProtection/attestation/errors.ts +++ b/packages/validator/src/slashingProtection/attestation/errors.ts @@ -63,8 +63,4 @@ type InvalidAttestationErrorType = minTargetEpoch: Epoch; }; -export class InvalidAttestationError extends LodestarError { - constructor(type: InvalidAttestationErrorType) { - super(type); - } -} +export class InvalidAttestationError extends LodestarError {} diff --git a/packages/validator/src/slashingProtection/block/errors.ts b/packages/validator/src/slashingProtection/block/errors.ts index be3696bba700..e7868881627b 100644 --- a/packages/validator/src/slashingProtection/block/errors.ts +++ b/packages/validator/src/slashingProtection/block/errors.ts @@ -25,8 +25,4 @@ type InvalidBlockErrorType = minSlot: Slot; }; -export class InvalidBlockError extends LodestarError { - constructor(type: InvalidBlockErrorType) { - super(type); - } -} +export class InvalidBlockError extends LodestarError {} diff --git a/packages/validator/src/slashingProtection/interchange/errors.ts b/packages/validator/src/slashingProtection/interchange/errors.ts index 63771df357c2..d03215f0d930 100644 --- a/packages/validator/src/slashingProtection/interchange/errors.ts +++ b/packages/validator/src/slashingProtection/interchange/errors.ts @@ -12,8 +12,4 @@ type InterchangeErrorErrorType = | {code: InterchangeErrorErrorCode.UNSUPPORTED_VERSION; version: string} | {code: InterchangeErrorErrorCode.GENESIS_VALIDATOR_MISMATCH; root: Root; expectedRoot: Root}; -export class InterchangeError extends LodestarError { - constructor(type: InterchangeErrorErrorType) { - super(type); - } -} +export class InterchangeError extends LodestarError {} diff --git a/packages/validator/src/slashingProtection/interchange/formats/completeV4.ts b/packages/validator/src/slashingProtection/interchange/formats/completeV4.ts index b43ced6c80d3..26210390a272 100644 --- a/packages/validator/src/slashingProtection/interchange/formats/completeV4.ts +++ b/packages/validator/src/slashingProtection/interchange/formats/completeV4.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {fromHex, toPubkeyHex, toRootHex} from "@lodestar/utils"; import {InterchangeLodestar} from "../types.js"; import {fromOptionalHexString, numToString, toOptionalHexString} from "../../utils.js"; diff --git a/packages/validator/src/slashingProtection/interchange/formats/v5.ts b/packages/validator/src/slashingProtection/interchange/formats/v5.ts index 838ba76c1a57..88e2ce70fe07 100644 --- a/packages/validator/src/slashingProtection/interchange/formats/v5.ts +++ b/packages/validator/src/slashingProtection/interchange/formats/v5.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {fromHex, toPubkeyHex, toRootHex} from "@lodestar/utils"; import {InterchangeLodestar} from "../types.js"; import {fromOptionalHexString, numToString, toOptionalHexString} from "../../utils.js"; diff --git a/packages/validator/src/slashingProtection/minMaxSurround/errors.ts b/packages/validator/src/slashingProtection/minMaxSurround/errors.ts index fd094df54db3..b6cd31187f57 100644 --- a/packages/validator/src/slashingProtection/minMaxSurround/errors.ts +++ b/packages/validator/src/slashingProtection/minMaxSurround/errors.ts @@ -24,8 +24,4 @@ type SurroundAttestationErrorType = attestation2Target: number; }; -export class SurroundAttestationError extends LodestarError { - constructor(type: SurroundAttestationErrorType) { - super(type); - } -} +export class SurroundAttestationError extends LodestarError {} diff --git a/packages/validator/src/util/externalSignerClient.ts b/packages/validator/src/util/externalSignerClient.ts index 1d9778375b88..64d595452296 100644 --- a/packages/validator/src/util/externalSignerClient.ts +++ b/packages/validator/src/util/externalSignerClient.ts @@ -21,8 +21,6 @@ import {computeEpochAtSlot, blindedOrFullBlockToHeader} from "@lodestar/state-tr import {toHex, toRootHex} from "@lodestar/utils"; import {PubkeyHex} from "../types.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - export enum SignableMessageType { AGGREGATION_SLOT = "AGGREGATION_SLOT", AGGREGATE_AND_PROOF = "AGGREGATE_AND_PROOF", diff --git a/packages/validator/src/util/params.ts b/packages/validator/src/util/params.ts index 6d6705f512df..f83aa9828633 100644 --- a/packages/validator/src/util/params.ts +++ b/packages/validator/src/util/params.ts @@ -5,8 +5,6 @@ export class NotEqualParamsError extends Error {} type ConfigWithPreset = ChainConfig & BeaconPreset; -/* eslint-disable @typescript-eslint/naming-convention */ - /** * Assert localConfig values match externalSpecJson. externalSpecJson may contain more values than localConfig. * diff --git a/packages/validator/test/spec/params.ts b/packages/validator/test/spec/params.ts index c51a881bfeb3..0f5c707ff1c5 100644 --- a/packages/validator/test/spec/params.ts +++ b/packages/validator/test/spec/params.ts @@ -3,7 +3,6 @@ import {fileURLToPath} from "node:url"; // Global variable __dirname no longer available in ES6 modules. // Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); // Full link: https://github.com/eth2-clients/slashing-protection-interchange-tests/releases/download/v5.1.0/eip-3076-tests-v5.1.0.tar.gz diff --git a/packages/validator/test/unit/services/attestation.test.ts b/packages/validator/test/unit/services/attestation.test.ts index 66b722273102..b225ab09cdd2 100644 --- a/packages/validator/test/unit/services/attestation.test.ts +++ b/packages/validator/test/unit/services/attestation.test.ts @@ -52,7 +52,6 @@ describe("AttestationService", function () { vi.resetAllMocks(); }); - // eslint-disable-next-line @typescript-eslint/naming-convention const electraConfig: Partial = {ELECTRA_FORK_EPOCH: 0}; const testContexts: [string, AttestationServiceOpts, Partial][] = [ diff --git a/packages/validator/test/unit/services/doppelganger.test.ts b/packages/validator/test/unit/services/doppelganger.test.ts index 9b669b3c9396..943f0c08a9d3 100644 --- a/packages/validator/test/unit/services/doppelganger.test.ts +++ b/packages/validator/test/unit/services/doppelganger.test.ts @@ -213,8 +213,10 @@ function getMockBeaconApi(livenessMap: LivenessMap): ApiClient { } class ClockMockMsToSlot extends ClockMock { - constructor(public currentEpoch: Epoch) { + currentEpoch: Epoch; + constructor(currentEpoch: Epoch) { super(); + this.currentEpoch = currentEpoch; } async tickEpoch(epoch: Epoch, signal: AbortSignal): Promise { diff --git a/packages/validator/test/unit/services/syncCommitteDuties.test.ts b/packages/validator/test/unit/services/syncCommitteDuties.test.ts index dc43502d5b57..87d052b14ae5 100644 --- a/packages/validator/test/unit/services/syncCommitteDuties.test.ts +++ b/packages/validator/test/unit/services/syncCommitteDuties.test.ts @@ -20,8 +20,6 @@ import {ClockMock} from "../../utils/clock.js"; import {initValidatorStore} from "../../utils/validatorStore.js"; import {syncCommitteeIndicesToSubnets} from "../../../src/services/utils.js"; -/* eslint-disable @typescript-eslint/naming-convention */ - describe("SyncCommitteeDutiesService", function () { const api = getApiClientStub(); @@ -210,7 +208,6 @@ describe("SyncCommitteeDutiesService", function () { validatorSyncCommitteeIndices: [7], }; when(api.validator.getSyncCommitteeDuties) - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment .calledWith({epoch: expect.any(Number), indices}) .thenResolve(mockApiResponse({data: [duty1, duty2], meta: {executionOptimistic: false}})); diff --git a/packages/validator/test/unit/services/syncCommittee.test.ts b/packages/validator/test/unit/services/syncCommittee.test.ts index 449f826c3806..201bbdc83632 100644 --- a/packages/validator/test/unit/services/syncCommittee.test.ts +++ b/packages/validator/test/unit/services/syncCommittee.test.ts @@ -21,8 +21,6 @@ vi.mock("../../../src/services/emitter.js"); vi.mock("../../../src/services/chainHeaderTracker.js"); vi.mock("../../../src/services/syncingStatusTracker.js"); -/* eslint-disable @typescript-eslint/naming-convention */ - describe("SyncCommitteeService", function () { const api = getApiClientStub(); // @ts-expect-error - Mocked class don't need parameters diff --git a/packages/validator/test/unit/slashingProtection/interchange/index.test.ts b/packages/validator/test/unit/slashingProtection/interchange/index.test.ts index af2694458368..4038c6d1d4c5 100644 --- a/packages/validator/test/unit/slashingProtection/interchange/index.test.ts +++ b/packages/validator/test/unit/slashingProtection/interchange/index.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import {describe, it, expect} from "vitest"; import {toHexString} from "@chainsafe/ssz"; import {Root, ssz} from "@lodestar/types"; diff --git a/packages/validator/test/unit/slashingProtection/minMaxSurround/utils.ts b/packages/validator/test/unit/slashingProtection/minMaxSurround/utils.ts index e57af53d6837..6d9e4e0f559d 100644 --- a/packages/validator/test/unit/slashingProtection/minMaxSurround/utils.ts +++ b/packages/validator/test/unit/slashingProtection/minMaxSurround/utils.ts @@ -8,11 +8,11 @@ export class DistanceMapStore { this.map = new Map(); } - async get(pubkey: BLSPubkey, epoch: number): Promise { + async get(_pubkey: BLSPubkey, epoch: number): Promise { return this.map.get(epoch) ?? null; } - async setBatch(pubkey: BLSPubkey, values: DistanceEntry[]): Promise { + async setBatch(_pubkey: BLSPubkey, values: DistanceEntry[]): Promise { for (const {source, distance} of values) { this.map.set(source, distance); } diff --git a/packages/validator/test/unit/utils/clock.test.ts b/packages/validator/test/unit/utils/clock.test.ts index d668d753014a..f1c12e2cf66d 100644 --- a/packages/validator/test/unit/utils/clock.test.ts +++ b/packages/validator/test/unit/utils/clock.test.ts @@ -81,7 +81,6 @@ describe("util / Clock", function () { }); describe("getCurrentSlot", function () { - // eslint-disable-next-line @typescript-eslint/naming-convention const testConfig = {SECONDS_PER_SLOT: 12} as BeaconConfig; const genesisTime = Math.floor(new Date("2021-01-01").getTime() / 1000); diff --git a/packages/validator/test/unit/utils/interopConfigs.ts b/packages/validator/test/unit/utils/interopConfigs.ts index d263fa8c1d8f..36fff9051ce8 100644 --- a/packages/validator/test/unit/utils/interopConfigs.ts +++ b/packages/validator/test/unit/utils/interopConfigs.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ - export const lighthouseHoleskyConfig = { CONFIG_NAME: "holesky", PRESET_BASE: "mainnet", diff --git a/packages/validator/test/unit/utils/params.test.ts b/packages/validator/test/unit/utils/params.test.ts index 79701e1f7a6e..13bab507cf13 100644 --- a/packages/validator/test/unit/utils/params.test.ts +++ b/packages/validator/test/unit/utils/params.test.ts @@ -12,8 +12,6 @@ const testCases: {name: string; items: [ChainConfig, Record]}[] {name: "nimbus", items: [networksChainConfig.holesky, nimbusHoleskyConfig]}, ]; -/* eslint-disable @typescript-eslint/naming-convention */ - describe("utils / params / assertEqualParams", () => { it("default == default", () => { const chainConfigJson = chainConfigToJson(chainConfig); diff --git a/packages/validator/test/utils/spec.ts b/packages/validator/test/utils/spec.ts index 91d6a75d1a52..ae0be94b4bfa 100644 --- a/packages/validator/test/utils/spec.ts +++ b/packages/validator/test/utils/spec.ts @@ -1,7 +1,6 @@ import fs from "node:fs"; import path from "node:path"; -/* eslint-disable @typescript-eslint/naming-convention */ export type SlashingProtectionInterchangeTest = { name: string; genesis_validators_root: string; diff --git a/scripts/assert_eslintrc_sorted.mjs b/scripts/assert_eslintrc_sorted.mjs deleted file mode 100755 index 0b298b627340..000000000000 --- a/scripts/assert_eslintrc_sorted.mjs +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env node - -import assert from "node:assert"; -import eslintrc from "../.eslintrc.js"; - -assertSorted(eslintrc.extends, ".extends"); -assertSorted(Object.keys(eslintrc.rules), ".rules"); -for (const overrides of eslintrc.overrides) { - assertSorted(Object.keys(overrides.rules), `.overrides ${overrides.files.join(",")}`); -} - -/** @param {string[]} keys @param {string} id */ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -function assertSorted(keys, id) { - try { - assert.deepStrictEqual(keys, [...keys].sort()); - } catch (e) { - // eslint-disable-next-line no-console - console.log(`Lint error in ${id}\n\n`, e.message); - process.exit(1); - } -} diff --git a/scripts/release/utils.mjs b/scripts/release/utils.mjs index ee02015f0577..19ae6f3d306b 100644 --- a/scripts/release/utils.mjs +++ b/scripts/release/utils.mjs @@ -50,7 +50,7 @@ export function parseCmdArgs() { // optional arg, defaults to HEAD try { commit = shell(`git log -n 1 --pretty='%h' ${commitArg ?? "HEAD"}`); - } catch (e) { + } catch (_e) { throw Error(`Invalid commit ${commitArg}`); } @@ -62,7 +62,7 @@ export function parseCmdArgs() { try { if (versionObj.includePrerelease) throw Error("Includes pre-release"); if (semver.clean(versionArg) !== versionMMP) throw Error("No clean major.minor.path version"); - } catch (e) { + } catch (_e) { throw Error(`Bad argv[2] semver version '${versionArg}': ${e.message}`); } @@ -82,7 +82,7 @@ export function assertCommitExistsInBranch(commit, branch) { try { // Also, ensure the branch exists first headCommit = shell(`git rev-parse refs/heads/${branch}`); - } catch (e) { + } catch (_e) { throw Error(`Branch ${branch} does not exist: ${e.message}`); } @@ -95,7 +95,7 @@ export function assertCommitExistsInBranch(commit, branch) { try { shell(`git merge-base --is-ancestor ${commit} ${headCommit}`); - } catch (e) { + } catch (_e) { throw Error(`Commit ${commit} does not belong to branch ${branch}`); } } @@ -129,7 +129,7 @@ export async function confirm(message) { export function checkBranchExistsLocal(branch) { try { return shell(`git show-ref refs/heads/${branch}`); - } catch (e) { + } catch (_e) { return null; } } @@ -156,7 +156,7 @@ export function checkBranchExistsRemote(branch) { // Return the first part of the first line return out.split(/\s+/)[0]; - } catch (e) { + } catch (_e) { return null; } } @@ -169,7 +169,7 @@ export function checkBranchExistsRemote(branch) { export function checkTagExistsLocal(tag) { try { return shell(`git show-ref refs/tags/${tag}`); - } catch (e) { + } catch (_e) { return null; } } @@ -195,7 +195,7 @@ export function checkTagExistsRemote(tag) { // Return the first part of the first line return out.split(/\s+/)[0]; - } catch (e) { + } catch (_e) { return null; } } @@ -224,7 +224,7 @@ export function readMainPackageJson() { let jsonStr; try { jsonStr = fs.readFileSync(packageJsonPath, "utf8"); - } catch (e) { + } catch (_e) { if (e.code === "ENOENT") { throw Error(`Must run script from repo root dir, package.json not found at ${packageJsonPath}`); } else { diff --git a/scripts/vitest/setupFiles/dotenv.ts b/scripts/vitest/setupFiles/dotenv.ts index 71364c7426bc..511cefd8eed4 100644 --- a/scripts/vitest/setupFiles/dotenv.ts +++ b/scripts/vitest/setupFiles/dotenv.ts @@ -1,8 +1,6 @@ import path from "node:path"; // It's a dev dependency -// eslint-disable-next-line import/no-extraneous-dependencies import {config} from "dotenv"; -// eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = new URL(".", import.meta.url).pathname; config({path: path.join(__dirname, "../../../.env.test")}); diff --git a/types/vitest/index.d.ts b/types/vitest/index.d.ts index 387edcfa5279..297ed11e1904 100644 --- a/types/vitest/index.d.ts +++ b/types/vitest/index.d.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-extraneous-dependencies, @typescript-eslint/no-unused-vars import * as vitest from "vitest"; interface CustomMatchers { @@ -42,7 +41,6 @@ interface CustomAsymmetricMatchers extends CustomMatchers { } declare module "vitest" { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - interface Assertion extends CustomMatchers {} + interface Assertion extends CustomMatchers {} interface AsymmetricMatchersContaining extends CustomAsymmetricMatchers {} } diff --git a/yarn.lock b/yarn.lock index a96092ec2fff..9808fee96b84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,11 +2,6 @@ # yarn lockfile v1 -"@aashutoshrathi/word-wrap@^1.2.3": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" - integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== - "@actions/cache@^1.0.7": version "1.0.7" resolved "https://registry.npmjs.org/@actions/cache/-/cache-1.0.7.tgz" @@ -289,6 +284,60 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@biomejs/biome@^1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.9.3.tgz#5362fc390ac00c82e3698824490e3801d012c1b0" + integrity sha512-POjAPz0APAmX33WOQFGQrwLvlu7WLV4CFJMlB12b6ZSg+2q6fYu9kZwLCOA+x83zXfcPd1RpuWOKJW0GbBwLIQ== + optionalDependencies: + "@biomejs/cli-darwin-arm64" "1.9.3" + "@biomejs/cli-darwin-x64" "1.9.3" + "@biomejs/cli-linux-arm64" "1.9.3" + "@biomejs/cli-linux-arm64-musl" "1.9.3" + "@biomejs/cli-linux-x64" "1.9.3" + "@biomejs/cli-linux-x64-musl" "1.9.3" + "@biomejs/cli-win32-arm64" "1.9.3" + "@biomejs/cli-win32-x64" "1.9.3" + +"@biomejs/cli-darwin-arm64@1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.9.3.tgz#3a981835a7a891589b356bbdb4e50157e494aa7d" + integrity sha512-QZzD2XrjJDUyIZK+aR2i5DDxCJfdwiYbUKu9GzkCUJpL78uSelAHAPy7m0GuPMVtF/Uo+OKv97W3P9nuWZangQ== + +"@biomejs/cli-darwin-x64@1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.9.3.tgz#0e33284e5def9cbc17705b6a9acbc22b161accb1" + integrity sha512-vSCoIBJE0BN3SWDFuAY/tRavpUtNoqiceJ5PrU3xDfsLcm/U6N93JSM0M9OAiC/X7mPPfejtr6Yc9vSgWlEgVw== + +"@biomejs/cli-linux-arm64-musl@1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.9.3.tgz#b68e2fe56381cbf71770b6c785215448c47595fd" + integrity sha512-VBzyhaqqqwP3bAkkBrhVq50i3Uj9+RWuj+pYmXrMDgjS5+SKYGE56BwNw4l8hR3SmYbLSbEo15GcV043CDSk+Q== + +"@biomejs/cli-linux-arm64@1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.9.3.tgz#bb8186f000bd7366c3a1822a4a505e374905c462" + integrity sha512-vJkAimD2+sVviNTbaWOGqEBy31cW0ZB52KtpVIbkuma7PlfII3tsLhFa+cwbRAcRBkobBBhqZ06hXoZAN8NODQ== + +"@biomejs/cli-linux-x64-musl@1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.9.3.tgz#01ccee0db2ca2ec9fb51fa69b2fc9e96434b5b32" + integrity sha512-TJmnOG2+NOGM72mlczEsNki9UT+XAsMFAOo8J0me/N47EJ/vkLXxf481evfHLlxMejTY6IN8SdRSiPVLv6AHlA== + +"@biomejs/cli-linux-x64@1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.9.3.tgz#82d6fb824dd2c76142ab8625e202eb63a34e14f1" + integrity sha512-x220V4c+romd26Mu1ptU+EudMXVS4xmzKxPVb9mgnfYlN4Yx9vD5NZraSx/onJnd3Gh/y8iPUdU5CDZJKg9COA== + +"@biomejs/cli-win32-arm64@1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.9.3.tgz#7fac607ade8e204eecae09e127713f000da0ccf2" + integrity sha512-lg/yZis2HdQGsycUvHWSzo9kOvnGgvtrYRgoCEwPBwwAL8/6crOp3+f47tPwI/LI1dZrhSji7PNsGKGHbwyAhw== + +"@biomejs/cli-win32-x64@1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.9.3.tgz#1cbc269dcd5f29b034cb7f5982353c1cc3629318" + integrity sha512-cQMy2zanBkVLpmmxXdK6YePzmZx0s5Z7KEnwmrW54rcXK3myCNbQa09SwGZ8i/8sLw0H9F3X7K4rxVNGU8/D4Q== + "@bundled-es-modules/cookie@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@bundled-es-modules/cookie/-/cookie-2.0.0.tgz#c3b82703969a61cf6a46e959a012b2c257f6b164" @@ -438,19 +487,6 @@ uint8-varint "^2.0.2" uint8arrays "^5.0.1" -"@chainsafe/eslint-plugin-node@^11.2.3": - version "11.2.3" - resolved "https://registry.npmjs.org/@chainsafe/eslint-plugin-node/-/eslint-plugin-node-11.2.3.tgz" - integrity sha512-2iQv5JEaPcJuKP4pdawGd6iOVoUEDwx/PhsLqevwQXXz0WYwazW+p1fTF1bAcQNvZzLz4/wEBPtcVpQKNwY+jw== - dependencies: - eslint-plugin-es "^4.1.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - is-core-module "^2.3.0" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - "@chainsafe/fast-crc32c@^4.1.1": version "4.1.1" resolved "https://registry.yarnpkg.com/@chainsafe/fast-crc32c/-/fast-crc32c-4.1.1.tgz#f551284ecf8325f676a1e26b938bcca51b9c8d93" @@ -814,38 +850,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== -"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - dependencies: - eslint-visitor-keys "^3.3.0" - -"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.1.tgz#8c4bb756cc2aa7eaf13cfa5e69c83afb3260c20c" - integrity sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ== - -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== - "@ethereumjs/block@^4.2.2": version "4.2.2" resolved "https://registry.yarnpkg.com/@ethereumjs/block/-/block-4.2.2.tgz#fddecd34ed559f84ab8eb13098a6dee51a1360ae" @@ -1425,25 +1429,6 @@ resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== - dependencies: - "@humanwhocodes/object-schema" "^2.0.2" - debug "^4.3.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917" - integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw== - "@hutson/parse-repository-url@^3.0.0": version "3.0.2" resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" @@ -2202,7 +2187,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": +"@nodelib/fs.walk@^1.2.3": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -2657,11 +2642,6 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@pkgr/core@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" - integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== - "@polka/url@^1.0.0-next.24": version "1.0.0-next.24" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.24.tgz#58601079e11784d20f82d0585865bb42305c4df3" @@ -2713,85 +2693,85 @@ estree-walker "^2.0.2" picomatch "^2.3.1" -"@rollup/rollup-android-arm-eabi@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.16.1.tgz#ad76cc870b1e2bc4476dfc02b82e20cea272a09d" - integrity sha512-92/y0TqNLRYOTXpm6Z7mnpvKAG9P7qmK7yJeRJSdzElNCUnsgbpAsGqerUboYRIQKzgfq4pWu9xVkgpWLfmNsw== - -"@rollup/rollup-android-arm64@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.16.1.tgz#e7bd4f2b8ec5e049f98edbc68d72cb05356f81d8" - integrity sha512-ttWB6ZCfRLuDIUiE0yiu5gcqOsYjA5F7kEV1ggHMj20FwLZ8A1FMeahZJFl/pnOmcnD2QL0z4AcDuo27utGU8A== - -"@rollup/rollup-darwin-arm64@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.16.1.tgz#8fd277b4be6cc956167710e36b4ee365f8a44050" - integrity sha512-QLDvPLetbqjHojTGFw9+nuSP3YY/iz2k1cep6crYlr97sS+ZJ0W43b8Z0zC00+lnFZj6JSNxiA4DjboNQMuh1A== - -"@rollup/rollup-darwin-x64@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.16.1.tgz#5ab829322926fefce42db3529649a1098b420fe3" - integrity sha512-TAUK/D8khRrRIa1KwRzo8JNKk3tcqaeXWdtsiLgA8zmACWwlWLjPCJ4DULGHQrMkeBjp1Cd3Yuwx04lZgFx5Vg== - -"@rollup/rollup-linux-arm-gnueabihf@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.16.1.tgz#0154bc34e6a88fb0147adc827512add8d3a2338c" - integrity sha512-KO+WGZjrh6zyFTD1alIFkfdtxf8B4BC+hqd3kBZHscPLvE5FR/6QKsyuCT0JlERxxYBSUKNUQ/UHyX5uwO1x2A== - -"@rollup/rollup-linux-arm-musleabihf@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.16.1.tgz#0f3fa433a81b389042555133d38b4b886b369e58" - integrity sha512-NqxbllzIB1WoAo4ThUXVtd21iiM5IHMTTXmXySKBLVcZvkU0HIZmatlP7hLzb5yQubcmdIeWmncd2NdsjocEiw== - -"@rollup/rollup-linux-arm64-gnu@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.16.1.tgz#c8f2d523ac4bcff382601306989b27137d536dd6" - integrity sha512-snma5NvV8y7IECQ5rq0sr0f3UUu+92NVmG/913JXJMcXo84h9ak9TA5UI9Cl2XRM9j3m37QwDBtEYnJzRkSmxA== - -"@rollup/rollup-linux-arm64-musl@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.16.1.tgz#86b5104635131182b6b2b6997c4aa5594ce557b7" - integrity sha512-KOvqGprlD84ueivhCi2flvcUwDRD20mAsE3vxQNVEI2Di9tnPGAfEu6UcrSPZbM+jG2w1oSr43hrPo0RNg6GGg== - -"@rollup/rollup-linux-powerpc64le-gnu@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.16.1.tgz#5de8b20105aaaeb36eb86fab0a1020d81c7bd4d5" - integrity sha512-/gsNwtiGLqYwN4vP+EIdUC6Q6LTlpupWqokqIndvZcjn9ig/5P01WyaYCU2wvfL/2Z82jp5kX8c1mDBOvCP3zg== - -"@rollup/rollup-linux-riscv64-gnu@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.16.1.tgz#5319629dcdcb85ba201c6f0f894c9472e7d1013d" - integrity sha512-uU8zuGkQfGqfD9w6VRJZI4IuG4JIfNxxJgEmLMAmPVHREKGsxFVfgHy5c6CexQF2vOfgjB33OsET3Vdn2lln9A== - -"@rollup/rollup-linux-s390x-gnu@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.16.1.tgz#246ac211ed0d78f7a9bc5c1d0653bde4c6cd9f63" - integrity sha512-lsjLtDgtcGFEuBP6yrXwkRN5/wKlvUZtfbKZZu0yaoNpiBL4epgnO21osAALIspVRnl4qZgyLFd8xjCYYWgwfw== - -"@rollup/rollup-linux-x64-gnu@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.16.1.tgz#d0c03203ddeb9454fc6fdde93a39b01c176ac6d9" - integrity sha512-N2ZizKhUryqqrMfdCnjhJhZRgv61C6gK+hwVtCIKC8ts8J+go+vqENnGexwg21nHIOvLN5mBM8a7DI2vlyIOPg== - -"@rollup/rollup-linux-x64-musl@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.16.1.tgz#20235632e2be4689d663aadaceaaf90df03b1a33" - integrity sha512-5ICeMxqg66FrOA2AbnBQ2TJVxfvZsKLxmof0ibvPLaYtbsJqnTUtJOofgWb46Gjd4uZcA4rdsp4JCxegzQPqCg== - -"@rollup/rollup-win32-arm64-msvc@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.16.1.tgz#af113ad682fc13d1f870242c5539031f8cc27cf1" - integrity sha512-1vIP6Ce02L+qWD7uZYRiFiuAJo3m9kARatWmFSnss0gZnVj2Id7OPUU9gm49JPGasgcR3xMqiH3fqBJ8t00yVg== - -"@rollup/rollup-win32-ia32-msvc@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.16.1.tgz#4e7b57e757c95da8e79092056d1b428617515668" - integrity sha512-Y3M92DcVsT6LoP+wrKpoUWPaazaP1fzbNkp0a0ZSj5Y//+pQVfVe/tQdsYQQy7dwXR30ZfALUIc9PCh9Izir6w== - -"@rollup/rollup-win32-x64-msvc@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.16.1.tgz#5068a893ba292279adbe76fc487316724b15d811" - integrity sha512-x0fvpHMuF7fK5r8oZxSi8VYXkrVmRgubXpO/wcf15Lk3xZ4Jvvh5oG+u7Su1776A7XzVKZhD2eRc4t7H50gL3w== +"@rollup/rollup-android-arm-eabi@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz#8b613b9725e8f9479d142970b106b6ae878610d5" + integrity sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w== + +"@rollup/rollup-android-arm64@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz#654ca1049189132ff602bfcf8df14c18da1f15fb" + integrity sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA== + +"@rollup/rollup-darwin-arm64@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz#6d241d099d1518ef0c2205d96b3fa52e0fe1954b" + integrity sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q== + +"@rollup/rollup-darwin-x64@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz#42bd19d292a57ee11734c980c4650de26b457791" + integrity sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw== + +"@rollup/rollup-linux-arm-gnueabihf@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz#f23555ee3d8fe941c5c5fd458cd22b65eb1c2232" + integrity sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ== + +"@rollup/rollup-linux-arm-musleabihf@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz#f3bbd1ae2420f5539d40ac1fde2b38da67779baa" + integrity sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg== + +"@rollup/rollup-linux-arm64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz#7abe900120113e08a1f90afb84c7c28774054d15" + integrity sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw== + +"@rollup/rollup-linux-arm64-musl@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz#9e655285c8175cd44f57d6a1e8e5dedfbba1d820" + integrity sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz#9a79ae6c9e9d8fe83d49e2712ecf4302db5bef5e" + integrity sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg== + +"@rollup/rollup-linux-riscv64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz#67ac70eca4ace8e2942fabca95164e8874ab8128" + integrity sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA== + +"@rollup/rollup-linux-s390x-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz#9f883a7440f51a22ed7f99e1d070bd84ea5005fc" + integrity sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q== + +"@rollup/rollup-linux-x64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz#70116ae6c577fe367f58559e2cffb5641a1dd9d0" + integrity sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg== + +"@rollup/rollup-linux-x64-musl@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz#f473f88219feb07b0b98b53a7923be716d1d182f" + integrity sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g== + +"@rollup/rollup-win32-arm64-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz#4349482d17f5d1c58604d1c8900540d676f420e0" + integrity sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw== + +"@rollup/rollup-win32-ia32-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz#a6fc39a15db618040ec3c2a24c1e26cb5f4d7422" + integrity sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g== + +"@rollup/rollup-win32-x64-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz#3dd5d53e900df2a40841882c02e56f866c04d202" + integrity sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q== "@rushstack/node-core-library@4.0.2": version "4.0.2" @@ -3179,21 +3159,6 @@ resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.5.tgz#738dd390a6ecc5442f35e7f03fa1431353f7e138" integrity sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA== -"@types/json-schema@^7.0.12": - version "7.0.13" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" - integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== - -"@types/json-schema@^7.0.15": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== - -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" - integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= - "@types/keyv@^3.1.4": version "3.1.4" resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" @@ -3267,11 +3232,11 @@ undici-types "~5.26.4" "@types/node@^20.12.8": - version "20.12.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.8.tgz#35897bf2bfe3469847ab04634636de09552e8256" - integrity sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w== + version "20.16.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.7.tgz#0a245bf5805add998a22b8b5adac612ee70190bc" + integrity sha512-QkDQjAY3gkvJNcZOWwzy3BN34RweT0OQ9zJyvLCU0kSK22dO2QYh/NHGfbEAYylPYzRB1/iXcojS79wOg5gFSw== dependencies: - undici-types "~5.26.4" + undici-types "~6.19.2" "@types/node@^20.14.11": version "20.14.11" @@ -3317,16 +3282,6 @@ resolved "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz" integrity sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g== -"@types/semver@^7.5.0": - version "7.5.2" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.2.tgz#31f6eec1ed7ec23f4f05608d3a2d381df041f564" - integrity sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw== - -"@types/semver@^7.5.8": - version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" - integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== - "@types/sinon@^17.0.3": version "17.0.3" resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-17.0.3.tgz#9aa7e62f0a323b9ead177ed23a36ea757141a5fa" @@ -3442,145 +3397,6 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.2.0.tgz#5a5fcad1a7baed85c10080d71ad901f98c38d5b7" - integrity sha512-mdekAHOqS9UjlmyF/LSs6AIEvfceV749GFxoBAjwAv0nkevfKHWQFDMcBZWUiIC5ft6ePWivXoS36aKQ0Cy3sw== - dependencies: - "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "7.2.0" - "@typescript-eslint/type-utils" "7.2.0" - "@typescript-eslint/utils" "7.2.0" - "@typescript-eslint/visitor-keys" "7.2.0" - debug "^4.3.4" - graphemer "^1.4.0" - ignore "^5.2.4" - natural-compare "^1.4.0" - semver "^7.5.4" - ts-api-utils "^1.0.1" - -"@typescript-eslint/parser@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.2.0.tgz#44356312aea8852a3a82deebdacd52ba614ec07a" - integrity sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg== - dependencies: - "@typescript-eslint/scope-manager" "7.2.0" - "@typescript-eslint/types" "7.2.0" - "@typescript-eslint/typescript-estree" "7.2.0" - "@typescript-eslint/visitor-keys" "7.2.0" - debug "^4.3.4" - -"@typescript-eslint/scope-manager@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz#cfb437b09a84f95a0930a76b066e89e35d94e3da" - integrity sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg== - dependencies: - "@typescript-eslint/types" "7.2.0" - "@typescript-eslint/visitor-keys" "7.2.0" - -"@typescript-eslint/scope-manager@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.7.0.tgz#3f0db079b275bb8b0cb5be7613fb3130cfb5de77" - integrity sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw== - dependencies: - "@typescript-eslint/types" "7.7.0" - "@typescript-eslint/visitor-keys" "7.7.0" - -"@typescript-eslint/type-utils@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.2.0.tgz#7be5c30e9b4d49971b79095a1181324ef6089a19" - integrity sha512-xHi51adBHo9O9330J8GQYQwrKBqbIPJGZZVQTHHmy200hvkLZFWJIFtAG/7IYTWUyun6DE6w5InDReePJYJlJA== - dependencies: - "@typescript-eslint/typescript-estree" "7.2.0" - "@typescript-eslint/utils" "7.2.0" - debug "^4.3.4" - ts-api-utils "^1.0.1" - -"@typescript-eslint/types@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.2.0.tgz#0feb685f16de320e8520f13cca30779c8b7c403f" - integrity sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA== - -"@typescript-eslint/types@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.7.0.tgz#23af4d24bf9ce15d8d301236e3e3014143604f27" - integrity sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w== - -"@typescript-eslint/typescript-estree@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz#5beda2876c4137f8440c5a84b4f0370828682556" - integrity sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA== - dependencies: - "@typescript-eslint/types" "7.2.0" - "@typescript-eslint/visitor-keys" "7.2.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - minimatch "9.0.3" - semver "^7.5.4" - ts-api-utils "^1.0.1" - -"@typescript-eslint/typescript-estree@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz#b5dd6383b4c6a852d7b256a37af971e8982be97f" - integrity sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ== - dependencies: - "@typescript-eslint/types" "7.7.0" - "@typescript-eslint/visitor-keys" "7.7.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - minimatch "^9.0.4" - semver "^7.6.0" - ts-api-utils "^1.3.0" - -"@typescript-eslint/utils@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.2.0.tgz#fc8164be2f2a7068debb4556881acddbf0b7ce2a" - integrity sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA== - dependencies: - "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.12" - "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "7.2.0" - "@typescript-eslint/types" "7.2.0" - "@typescript-eslint/typescript-estree" "7.2.0" - semver "^7.5.4" - -"@typescript-eslint/utils@^7.1.1": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.7.0.tgz#3d2b6606a60ac34f3c625facfb3b3ab7e126f58d" - integrity sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig== - dependencies: - "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.15" - "@types/semver" "^7.5.8" - "@typescript-eslint/scope-manager" "7.7.0" - "@typescript-eslint/types" "7.7.0" - "@typescript-eslint/typescript-estree" "7.7.0" - semver "^7.6.0" - -"@typescript-eslint/visitor-keys@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz#5035f177752538a5750cca1af6044b633610bf9e" - integrity sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A== - dependencies: - "@typescript-eslint/types" "7.2.0" - eslint-visitor-keys "^3.4.1" - -"@typescript-eslint/visitor-keys@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz#950148cf1ac11562a2d903fdf7acf76714a2dc9e" - integrity sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA== - dependencies: - "@typescript-eslint/types" "7.7.0" - eslint-visitor-keys "^3.4.3" - -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - "@vitest/browser@^2.0.4": version "2.0.4" resolved "https://registry.yarnpkg.com/@vitest/browser/-/browser-2.0.4.tgz#6569258b4a8085f348007acd5ecf61db4eec4340" @@ -3853,11 +3669,6 @@ abstract-logging@^2.0.1: resolved "https://registry.yarnpkg.com/abstract-logging/-/abstract-logging-2.0.1.tgz#6b0c371df212db7129b57d2e7fcf282b8bf1c839" integrity sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA== -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - acorn-walk@^8.1.1: version "8.2.0" resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz" @@ -3868,11 +3679,6 @@ acorn@^8.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== -acorn@^8.9.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== - add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -3926,16 +3732,6 @@ ajv-formats@^3.0.1: dependencies: ajv "^8.0.0" -ajv@^6.12.4, ajv@~6.12.6: - version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - ajv@^8.0.0, ajv@^8.12.0: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" @@ -3956,6 +3752,16 @@ ajv@^8.6.0: require-from-string "^2.0.2" uri-js "^4.2.2" +ajv@~6.12.6: + version "6.12.6" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" @@ -4142,64 +3948,11 @@ array-ify@^1.0.0: resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng== -array-includes@^3.1.7: - version "3.1.7" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda" - integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - get-intrinsic "^1.2.1" - is-string "^1.0.7" - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array.prototype.filter@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz#423771edeb417ff5914111fff4277ea0624c0d0e" - integrity sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - -array.prototype.findlastindex@^1.2.3: - version "1.2.4" - resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz#d1c50f0b3a9da191981ff8942a0aedd82794404f" - integrity sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ== - dependencies: - call-bind "^1.0.5" - define-properties "^1.2.1" - es-abstract "^1.22.3" - es-errors "^1.3.0" - es-shim-unscopables "^1.0.2" - -array.prototype.flat@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" - integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-shim-unscopables "^1.0.0" - -array.prototype.flatmap@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" - integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-shim-unscopables "^1.0.0" - arraybuffer.prototype.slice@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" @@ -5466,7 +5219,7 @@ cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -5583,20 +5336,13 @@ de-indent@^1.0.2: resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" integrity sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg== -debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - debug@^4.3.5: version "4.3.5" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" @@ -5649,11 +5395,6 @@ deep-eql@^5.0.1: resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-5.0.2.tgz#4b756d8d770a9257300825d52a2c2cff99c3a341" integrity sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q== -deep-is@^0.1.3: - version "0.1.3" - resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - deepmerge-ts@^5.0.0, deepmerge-ts@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz#c55206cc4c7be2ded89b9c816cf3608884525d7a" @@ -5690,7 +5431,7 @@ define-lazy-prop@^2.0.0: resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== -define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0, define-properties@^1.2.1: +define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== @@ -5865,20 +5606,6 @@ dockerode@^3.3.5: docker-modem "^3.0.0" tar-fs "~2.0.1" -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - dom-accessibility-api@^0.5.9: version "0.5.16" resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz#5a7429e6066eb3664d911e33fb0e45de8eb08453" @@ -6011,14 +5738,6 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" -enhanced-resolve@^5.12.0: - version "5.15.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" - integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - enquirer@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -6058,7 +5777,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.18.0-next.2, es-abstract@^1.22.1, es-abstract@^1.22.3: +es-abstract@^1.18.0-next.2, es-abstract@^1.22.1: version "1.22.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.3.tgz#48e79f5573198de6dee3589195727f4f74bc4f32" integrity sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA== @@ -6103,16 +5822,6 @@ es-abstract@^1.18.0-next.2, es-abstract@^1.22.1, es-abstract@^1.22.3: unbox-primitive "^1.0.2" which-typed-array "^1.1.13" -es-array-method-boxes-properly@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== - -es-errors@^1.0.0, es-errors@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" - integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== - es-set-tostringtag@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" @@ -6122,20 +5831,6 @@ es-set-tostringtag@^2.0.1: has "^1.0.3" has-tostringtag "^1.0.0" -es-shim-unscopables@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== - dependencies: - has "^1.0.3" - -es-shim-unscopables@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" - integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== - dependencies: - hasown "^2.0.0" - es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -6220,191 +5915,17 @@ escodegen@^2.1.0: optionalDependencies: source-map "~0.6.1" -eslint-import-resolver-node@^0.3.9: - version "0.3.9" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" - integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== - dependencies: - debug "^3.2.7" - is-core-module "^2.13.0" - resolve "^1.22.4" - -eslint-import-resolver-typescript@^3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz#7b983680edd3f1c5bce1a5829ae0bc2d57fe9efa" - integrity sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg== - dependencies: - debug "^4.3.4" - enhanced-resolve "^5.12.0" - eslint-module-utils "^2.7.4" - fast-glob "^3.3.1" - get-tsconfig "^4.5.0" - is-core-module "^2.11.0" - is-glob "^4.0.3" - -eslint-module-utils@^2.7.4: - version "2.7.4" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" - integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== - dependencies: - debug "^3.2.7" - -eslint-module-utils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" - integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== - dependencies: - debug "^3.2.7" - -eslint-plugin-es@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz" - integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - -eslint-plugin-import@^2.29.1: - version "2.29.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" - integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== - dependencies: - array-includes "^3.1.7" - array.prototype.findlastindex "^1.2.3" - array.prototype.flat "^1.3.2" - array.prototype.flatmap "^1.3.2" - debug "^3.2.7" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.9" - eslint-module-utils "^2.8.0" - hasown "^2.0.0" - is-core-module "^2.13.1" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.fromentries "^2.0.7" - object.groupby "^1.0.1" - object.values "^1.1.7" - semver "^6.3.1" - tsconfig-paths "^3.15.0" - -eslint-plugin-prettier@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1" - integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw== - dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.8.6" - -eslint-plugin-vitest@^0.3.26: - version "0.3.26" - resolved "https://registry.yarnpkg.com/eslint-plugin-vitest/-/eslint-plugin-vitest-0.3.26.tgz#0906893c1f8f7094614fc6ff255c0a369cfbf427" - integrity sha512-oxe5JSPgRjco8caVLTh7Ti8PxpwJdhSV0hTQAmkFcNcmy/9DnqLB/oNVRA11RmVRP//2+jIIT6JuBEcpW3obYg== - dependencies: - "@typescript-eslint/utils" "^7.1.1" - -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-utils@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-visitor-keys@^1.1.0: - version "1.3.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" - integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== - -eslint@^8.57.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - esm@^3.2.25: version "3.2.25" resolved "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz" integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== - dependencies: - acorn "^8.9.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" - esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^5.1.0, estraverse@^5.2.0: +estraverse@^5.2.0: version "5.2.0" resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz" integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== @@ -6608,17 +6129,12 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== - fast-fifo@^1.1.0, fast-fifo@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== -fast-glob@^3.2.9, fast-glob@^3.3.1: +fast-glob@^3.2.9: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -6647,11 +6163,6 @@ fast-json-stringify@^6.0.0: json-schema-ref-resolver "^1.0.1" rfdc "^1.2.0" -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - fast-querystring@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/fast-querystring/-/fast-querystring-1.1.1.tgz#f4c56ef56b1a954880cfd8c01b83f9e1a3d3fda2" @@ -6754,13 +6265,6 @@ figures@^5.0.0: escape-string-regexp "^5.0.0" is-unicode-supported "^1.2.0" -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - file-stream-rotator@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/file-stream-rotator/-/file-stream-rotator-0.6.1.tgz#007019e735b262bb6c6f0197e58e5c87cb96cec3" @@ -6834,24 +6338,11 @@ find-up@^6.3.0: locate-path "^7.1.0" path-exists "^5.0.0" -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - flat@^5.0.2: version "5.0.2" resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== -flatted@^3.1.0: - version "3.2.5" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" - integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== - fn.name@1.x.x: version "1.1.0" resolved "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz" @@ -7153,13 +6644,6 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -get-tsconfig@^4.5.0: - version "4.6.2" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.6.2.tgz#831879a5e6c2aa24fe79b60340e2233a1e0f472e" - integrity sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg== - dependencies: - resolve-pkg-maps "^1.0.0" - get-uri@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.2.tgz#e019521646f4a8ff6d291fbaea2c46da204bb75b" @@ -7224,13 +6708,6 @@ glob-parent@5.1.2, glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - glob@7.1.4: version "7.1.4" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" @@ -7346,13 +6823,6 @@ global-agent@^3.0.0: semver "^7.3.2" serialize-error "^7.0.1" -globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== - dependencies: - type-fest "^0.20.2" - globalthis@^1.0.1, globalthis@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" @@ -7360,7 +6830,7 @@ globalthis@^1.0.1, globalthis@^1.0.3: dependencies: define-properties "^1.1.3" -globby@11.1.0, globby@^11.1.0: +globby@11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -7423,11 +6893,6 @@ grapheme-splitter@^1.0.2: resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - graphql@^16.8.1: version "16.9.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.9.0.tgz#1c310e63f16a49ce1fbb230bd0a000e99f6f115f" @@ -7743,7 +7208,7 @@ ignore-walk@^6.0.0: dependencies: minimatch "^7.4.2" -ignore@^5.0.4, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: +ignore@^5.0.4, ignore@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== @@ -7753,7 +7218,7 @@ immutable@^4.3.2: resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.5.tgz#f8b436e66d59f99760dc577f5c99a4fd2a5cc5a0" integrity sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw== -import-fresh@^3.2.1, import-fresh@^3.3.0: +import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -7979,7 +7444,7 @@ is-ci@3.0.1: dependencies: ci-info "^3.2.0" -is-core-module@^2.1.0, is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.13.1, is-core-module@^2.3.0, is-core-module@^2.5.0, is-core-module@^2.8.1: +is-core-module@^2.1.0, is-core-module@^2.13.0, is-core-module@^2.5.0, is-core-module@^2.8.1: version "2.13.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== @@ -8018,7 +7483,7 @@ is-generator-function@^1.0.7: resolved "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.8.tgz" integrity sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ== -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: +is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -8101,11 +7566,6 @@ is-observable@^2.1.0: resolved "https://registry.npmjs.org/is-observable/-/is-observable-2.1.0.tgz" integrity sha512-DailKdLb0WU+xX8K5w7VsJhapwHLZ9jjmazqCJq4X12CTgqq73TKnbRcnSLuXYPOoLQgV5IrD7ePiX/h1vnkBw== -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -8611,23 +8071,11 @@ json-schema-traverse@^1.0.0: resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - json-stringify-safe@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -json5@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" - integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== - dependencies: - minimist "^1.2.0" - json5@^2.2.2: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -8805,14 +8253,6 @@ level@^8.0.0: browser-level "^1.0.1" classic-level "^1.2.0" -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - libnpmaccess@7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-7.0.2.tgz#7f056c8c933dd9c8ba771fa6493556b53c5aac52" @@ -8994,11 +8434,6 @@ lodash.isplainobject@^4.0.6: resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - lodash.some@^4.6.0: version "4.6.0" resolved "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz" @@ -9417,13 +8852,6 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@9.0.3, minimatch@^9.0.0, minimatch@^9.0.1: - version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== - dependencies: - brace-expansion "^2.0.1" - minimatch@^10.0.0: version "10.0.1" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.0.1.tgz#ce0521856b453c86e25f2c4c0d03e6ff7ddc440b" @@ -9431,7 +8859,7 @@ minimatch@^10.0.0: dependencies: brace-expansion "^2.0.1" -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -9459,13 +8887,27 @@ minimatch@^8.0.2: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.3, minimatch@^9.0.4: +minimatch@^9.0.0, minimatch@^9.0.1: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.3: version "9.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== dependencies: brace-expansion "^2.0.1" +minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + minimatch@~3.0.3: version "3.0.8" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" @@ -9783,11 +9225,6 @@ native-fetch@^4.0.2: resolved "https://registry.yarnpkg.com/native-fetch/-/native-fetch-4.0.2.tgz#75c8a44c5f3bb021713e5e24f2846750883e49af" integrity sha512-4QcVlKFtv2EYVS5MBgsGX5+NWKtbDbIECdUXDBGDMAZXq3Jkv9zf+y8iS7Ub8fEdga3GpYeazp9gauNqXHJOCg== -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - negotiator@^0.6.2, negotiator@^0.6.3: version "0.6.3" resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" @@ -10235,35 +9672,6 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -object.fromentries@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" - integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - -object.groupby@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.2.tgz#494800ff5bab78fd0eff2835ec859066e00192ec" - integrity sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw== - dependencies: - array.prototype.filter "^1.0.3" - call-bind "^1.0.5" - define-properties "^1.2.1" - es-abstract "^1.22.3" - es-errors "^1.0.0" - -object.values@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" - integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - obliterator@^2.0.1: version "2.0.4" resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" @@ -10326,18 +9734,6 @@ openapi-types@^12.1.3: resolved "https://registry.yarnpkg.com/openapi-types/-/openapi-types-12.1.3.tgz#471995eb26c4b97b7bd356aacf7b91b73e777dd3" integrity sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw== -optionator@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" - integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== - dependencies: - "@aashutoshrathi/word-wrap" "^1.2.3" - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - ora@^5.4.1: version "5.4.1" resolved "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz" @@ -10849,18 +10245,6 @@ postcss@^8.4.39: picocolors "^1.0.1" source-map-js "^1.2.0" -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - prettier@^3.2.5: version "3.2.5" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" @@ -11315,11 +10699,6 @@ regexp.prototype.flags@^1.5.1: define-properties "^1.2.0" set-function-name "^2.0.0" -regexpp@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz" - integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -11357,12 +10736,7 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-pkg-maps@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" - integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== - -resolve@^1.10.0, resolve@^1.10.1, resolve@^1.17.0, resolve@^1.22.4, resolve@~1.22.1: +resolve@^1.10.0, resolve@^1.17.0, resolve@~1.22.1: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -11514,28 +10888,28 @@ rollup-plugin-visualizer@^5.12.0: yargs "^17.5.1" rollup@^4.13.0: - version "4.16.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.16.1.tgz#5a60230987fe95ebe68bab517297c116dbb1a88d" - integrity sha512-5CaD3MPDlPKfhqzRvWXK96G6ELJfPZNb3LHiZxTHgDdC6jvwfGz2E8nY+9g1ONk4ttHsK1WaFP19Js4PSr1E3g== + version "4.22.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.4.tgz#4135a6446671cd2a2453e1ad42a45d5973ec3a0f" + integrity sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A== dependencies: "@types/estree" "1.0.5" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.16.1" - "@rollup/rollup-android-arm64" "4.16.1" - "@rollup/rollup-darwin-arm64" "4.16.1" - "@rollup/rollup-darwin-x64" "4.16.1" - "@rollup/rollup-linux-arm-gnueabihf" "4.16.1" - "@rollup/rollup-linux-arm-musleabihf" "4.16.1" - "@rollup/rollup-linux-arm64-gnu" "4.16.1" - "@rollup/rollup-linux-arm64-musl" "4.16.1" - "@rollup/rollup-linux-powerpc64le-gnu" "4.16.1" - "@rollup/rollup-linux-riscv64-gnu" "4.16.1" - "@rollup/rollup-linux-s390x-gnu" "4.16.1" - "@rollup/rollup-linux-x64-gnu" "4.16.1" - "@rollup/rollup-linux-x64-musl" "4.16.1" - "@rollup/rollup-win32-arm64-msvc" "4.16.1" - "@rollup/rollup-win32-ia32-msvc" "4.16.1" - "@rollup/rollup-win32-x64-msvc" "4.16.1" + "@rollup/rollup-android-arm-eabi" "4.22.4" + "@rollup/rollup-android-arm64" "4.22.4" + "@rollup/rollup-darwin-arm64" "4.22.4" + "@rollup/rollup-darwin-x64" "4.22.4" + "@rollup/rollup-linux-arm-gnueabihf" "4.22.4" + "@rollup/rollup-linux-arm-musleabihf" "4.22.4" + "@rollup/rollup-linux-arm64-gnu" "4.22.4" + "@rollup/rollup-linux-arm64-musl" "4.22.4" + "@rollup/rollup-linux-powerpc64le-gnu" "4.22.4" + "@rollup/rollup-linux-riscv64-gnu" "4.22.4" + "@rollup/rollup-linux-s390x-gnu" "4.22.4" + "@rollup/rollup-linux-x64-gnu" "4.22.4" + "@rollup/rollup-linux-x64-musl" "4.22.4" + "@rollup/rollup-win32-arm64-msvc" "4.22.4" + "@rollup/rollup-win32-ia32-msvc" "4.22.4" + "@rollup/rollup-win32-x64-msvc" "4.22.4" fsevents "~2.3.2" rrweb-cssom@^0.6.0: @@ -11669,7 +11043,7 @@ semver@7.5.3: dependencies: lru-cache "^6.0.0" -semver@^6.1.0, semver@^6.2.0, semver@^6.3.1: +semver@^6.1.0, semver@^6.2.0: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -12277,7 +11651,7 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@3.1.1, strip-json-comments@^3.1.1, strip-json-comments@~3.1.1: +strip-json-comments@3.1.1, strip-json-comments@~3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -12358,25 +11732,12 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -synckit@^0.8.6: - version "0.8.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" - integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== - dependencies: - "@pkgr/core" "^0.1.0" - tslib "^2.6.2" - systeminformation@^5.22.9: version "5.22.9" resolved "https://registry.yarnpkg.com/systeminformation/-/systeminformation-5.22.9.tgz#68700a895a48cbf96e2cd6a34c5027d1fe58f053" integrity sha512-qUWJhQ9JSBhdjzNUQywpvc0icxUAjMY3sZqUoS0GOtaJV9Ijq8s9zEP8Gaqmymn1dOefcICyPXK1L3kgKxlUpg== -tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -tar-fs@^3.0.4, tar-fs@^3.0.5, tar-fs@^3.0.6: +tar-fs@^3.0.4, tar-fs@^3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.6.tgz#eaccd3a67d5672f09ca8e8f9c3d2b89fa173f217" integrity sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w== @@ -12387,6 +11748,17 @@ tar-fs@^3.0.4, tar-fs@^3.0.5, tar-fs@^3.0.6: bare-fs "^2.1.1" bare-path "^2.1.0" +tar-fs@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.5.tgz#f954d77767e4e6edf973384e1eb95f8f81d64ed9" + integrity sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg== + dependencies: + pump "^3.0.0" + tar-stream "^3.1.5" + optionalDependencies: + bare-fs "^2.1.1" + bare-path "^2.1.0" + tar-fs@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.0.1.tgz#e44086c1c60d31a4f0cf893b1c4e155dabfae9e2" @@ -12492,11 +11864,6 @@ text-hex@1.0.x: resolved "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz" integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - thread-stream@^2.6.0: version "2.7.0" resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-2.7.0.tgz#d8a8e1b3fd538a6cca8ce69dbe5d3d097b601e11" @@ -12648,16 +12015,6 @@ triple-beam@^1.3.0: resolved "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz" integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== -ts-api-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.1.tgz#8144e811d44c749cd65b2da305a032510774452d" - integrity sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A== - -ts-api-utils@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" - integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== - ts-node@^10.8.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" @@ -12696,16 +12053,6 @@ ts-node@^10.9.2: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tsconfig-paths@^3.15.0: - version "3.15.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" - integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.2" - minimist "^1.2.6" - strip-bom "^3.0.0" - tsconfig-paths@^4.1.2: version "4.2.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" @@ -12735,7 +12082,7 @@ tslib@^1.10.0: resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.1, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.6.1, tslib@^2.6.2: +tslib@^2.0.0, tslib@^2.0.1, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.6.1: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -12769,13 +12116,6 @@ tweetnacl@^0.14.3: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - type-fest@2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.13.0.tgz#d1ecee38af29eb2e863b22299a3d68ef30d2abfb" @@ -12791,11 +12131,6 @@ type-fest@^0.18.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -12948,6 +12283,11 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + undici@^5.12.0: version "5.28.4" resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.4.tgz#6b280408edb6a1a604a9b20340f45b422e373068"