From 5a7f84734c6b0058005e6e5c93941aa7d17f22ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 27 Sep 2024 14:25:43 +0000 Subject: [PATCH 1/3] chore(deps): update dependency typescript-eslint to v8.7.0 --- package-lock.json | 100 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index ee8b3c8da6..c5d4916b79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "source-map-support": "0.5.21", "ts-node": "10.9.2", "typescript": "5.5.4", - "typescript-eslint": "8.0.1" + "typescript-eslint": "8.7.0" }, "engines": { "node": ">=18.0.0" @@ -5788,17 +5788,17 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.0.1.tgz", - "integrity": "sha512-5g3Y7GDFsJAnY4Yhvk8sZtFfV6YNF2caLzjrRPUBzewjPCaj0yokePB4LJSobyCzGMzjZZYFbwuzbfDHlimXbQ==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz", + "integrity": "sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.0.1", - "@typescript-eslint/type-utils": "8.0.1", - "@typescript-eslint/utils": "8.0.1", - "@typescript-eslint/visitor-keys": "8.0.1", + "@typescript-eslint/scope-manager": "8.7.0", + "@typescript-eslint/type-utils": "8.7.0", + "@typescript-eslint/utils": "8.7.0", + "@typescript-eslint/visitor-keys": "8.7.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -5822,16 +5822,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.0.1.tgz", - "integrity": "sha512-5IgYJ9EO/12pOUwiBKFkpU7rS3IU21mtXzB81TNwq2xEybcmAZrE9qwDtsb5uQd9aVO9o0fdabFyAmKveXyujg==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.7.0.tgz", + "integrity": "sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.0.1", - "@typescript-eslint/types": "8.0.1", - "@typescript-eslint/typescript-estree": "8.0.1", - "@typescript-eslint/visitor-keys": "8.0.1", + "@typescript-eslint/scope-manager": "8.7.0", + "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/typescript-estree": "8.7.0", + "@typescript-eslint/visitor-keys": "8.7.0", "debug": "^4.3.4" }, "engines": { @@ -5851,14 +5851,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.0.1.tgz", - "integrity": "sha512-NpixInP5dm7uukMiRyiHjRKkom5RIFA4dfiHvalanD2cF0CLUuQqxfg8PtEUo9yqJI2bBhF+pcSafqnG3UBnRQ==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz", + "integrity": "sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.0.1", - "@typescript-eslint/visitor-keys": "8.0.1" + "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/visitor-keys": "8.7.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5869,14 +5869,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.0.1.tgz", - "integrity": "sha512-+/UT25MWvXeDX9YaHv1IS6KI1fiuTto43WprE7pgSMswHbn1Jm9GEM4Txp+X74ifOWV8emu2AWcbLhpJAvD5Ng==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz", + "integrity": "sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.0.1", - "@typescript-eslint/utils": "8.0.1", + "@typescript-eslint/typescript-estree": "8.7.0", + "@typescript-eslint/utils": "8.7.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -5894,9 +5894,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.0.1.tgz", - "integrity": "sha512-PpqTVT3yCA/bIgJ12czBuE3iBlM3g4inRSC5J0QOdQFAn07TYrYEQBBKgXH1lQpglup+Zy6c1fxuwTk4MTNKIw==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz", + "integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==", "dev": true, "license": "MIT", "engines": { @@ -5908,16 +5908,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.0.1.tgz", - "integrity": "sha512-8V9hriRvZQXPWU3bbiUV4Epo7EvgM6RTs+sUmxp5G//dBGy402S7Fx0W0QkB2fb4obCF8SInoUzvTYtc3bkb5w==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz", + "integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.0.1", - "@typescript-eslint/visitor-keys": "8.0.1", + "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/visitor-keys": "8.7.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", @@ -5937,16 +5937,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.0.1.tgz", - "integrity": "sha512-CBFR0G0sCt0+fzfnKaciu9IBsKvEKYwN9UZ+eeogK1fYHg4Qxk1yf/wLQkLXlq8wbU2dFlgAesxt8Gi76E8RTA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.7.0.tgz", + "integrity": "sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.0.1", - "@typescript-eslint/types": "8.0.1", - "@typescript-eslint/typescript-estree": "8.0.1" + "@typescript-eslint/scope-manager": "8.7.0", + "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/typescript-estree": "8.7.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5960,13 +5960,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.0.1.tgz", - "integrity": "sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz", + "integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.0.1", + "@typescript-eslint/types": "8.7.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -20895,15 +20895,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.0.1.tgz", - "integrity": "sha512-V3Y+MdfhawxEjE16dWpb7/IOgeXnLwAEEkS7v8oDqNcR1oYlqWhGH/iHqHdKVdpWme1VPZ0SoywXAkCqawj2eQ==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.7.0.tgz", + "integrity": "sha512-nEHbEYJyHwsuf7c3V3RS7Saq+1+la3i0ieR3qP0yjqWSzVmh8Drp47uOl9LjbPANac4S7EFSqvcYIKXUUwIfIQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.0.1", - "@typescript-eslint/parser": "8.0.1", - "@typescript-eslint/utils": "8.0.1" + "@typescript-eslint/eslint-plugin": "8.7.0", + "@typescript-eslint/parser": "8.7.0", + "@typescript-eslint/utils": "8.7.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" diff --git a/package.json b/package.json index 3ee4479433..4fdf82dab7 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "source-map-support": "0.5.21", "ts-node": "10.9.2", "typescript": "5.5.4", - "typescript-eslint": "8.0.1" + "typescript-eslint": "8.7.0" }, "scripts": { "all": "npm run clean && npm run build && npm run lint && npm run test", From 35cba9cb8b53d986812b59aca0b549ed36926978 Mon Sep 17 00:00:00 2001 From: Nico Jansen Date: Fri, 27 Sep 2024 16:28:10 +0200 Subject: [PATCH 2/3] fix lint warnings --- packages/core/test/helpers/file-system-test-double.ts | 2 +- packages/instrumenter/src/parsers/create-parser.ts | 2 +- packages/test-helpers/src/logging-server.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/test/helpers/file-system-test-double.ts b/packages/core/test/helpers/file-system-test-double.ts index cd898ac091..affdfe7817 100644 --- a/packages/core/test/helpers/file-system-test-double.ts +++ b/packages/core/test/helpers/file-system-test-double.ts @@ -18,7 +18,7 @@ type Param, n extends number> = Parameters { public dirs = new Set(); constructor(public readonly files: Record = Object.create(null)) {} - public async dispose(): Promise { + public dispose(): void { // Idle, nothing to do here } diff --git a/packages/instrumenter/src/parsers/create-parser.ts b/packages/instrumenter/src/parsers/create-parser.ts index a68ab4e9f1..1daeea59ef 100644 --- a/packages/instrumenter/src/parsers/create-parser.ts +++ b/packages/instrumenter/src/parsers/create-parser.ts @@ -10,7 +10,7 @@ import { ParserOptions } from './parser-options.js'; export function createParser( parserOptions: ParserOptions, -): (code: string, fileName: string, formatOverride?: T | undefined) => Promise { +): (code: string, fileName: string, formatOverride?: T) => Promise { const jsParse = createJSParser(parserOptions); return async function parse(code: string, fileName: string, formatOverride?: T): Promise { const format = getFormat(fileName, formatOverride); diff --git a/packages/test-helpers/src/logging-server.ts b/packages/test-helpers/src/logging-server.ts index 62200a8105..400874630a 100644 --- a/packages/test-helpers/src/logging-server.ts +++ b/packages/test-helpers/src/logging-server.ts @@ -50,7 +50,7 @@ export class LoggingServer { } else { this.disposed = true; return new Promise((res, rej) => { - this.server.close((err?: Error | undefined) => { + this.server.close((err?: Error) => { if (err) { rej(err); } else { From 299f6d4229dbb64009d20172a4c7476fed0cc3c5 Mon Sep 17 00:00:00 2001 From: Nico Jansen Date: Fri, 27 Sep 2024 16:40:45 +0200 Subject: [PATCH 3/3] Fix eslint lint --- e2e/eslint.config.js | 1 - eslint.config.js | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/eslint.config.js b/e2e/eslint.config.js index bf6826398c..55a3dead41 100644 --- a/e2e/eslint.config.js +++ b/e2e/eslint.config.js @@ -11,7 +11,6 @@ import { rules } from '../eslint.config.js'; export default tseslint.config( eslint.configs.recommended, ...tseslint.configs.recommendedTypeChecked, - // @ts-expect-error: Not all properties are typed eslintPluginPrettierRecommended, { languageOptions: { diff --git a/eslint.config.js b/eslint.config.js index 6c90ac44b6..a16003e460 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -7,7 +7,8 @@ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' // @ts-expect-error: No types available import pluginChaiFriendly from 'eslint-plugin-chai-friendly'; -export const rules = Object.freeze({ +/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.Rules} */ +export const rules = { '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_*', ignoreRestSiblings: true, varsIgnorePattern: '^_' }], // fix - separate PR @@ -22,11 +23,11 @@ export const rules = Object.freeze({ // We don't care '@typescript-eslint/no-explicit-any': 'off', -}); +}; + export default tseslint.config( eslint.configs.recommended, ...tseslint.configs.recommendedTypeChecked, - // @ts-expect-error: Not all properties are typed eslintPluginPrettierRecommended, { languageOptions: {