From 6e1241bba5957b9ba9efc1716723f52d63fbb305 Mon Sep 17 00:00:00 2001 From: Heitor Lisboa <89428328+heitorlisboa@users.noreply.github.com> Date: Mon, 29 Apr 2024 18:24:31 -0300 Subject: [PATCH 01/16] docs: fix no-unnecessary-boolean-literal-compare example (#8981) * docs: fix no-unnecessary-boolean-literal-compare example * docs: use simpler expressions on no-unnecessary-boolean-literal-compare examples --- ...no-unnecessary-boolean-literal-compare.mdx | 24 +++++++++---------- ...o-unnecessary-boolean-literal-compare.shot | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.mdx b/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.mdx index d0ca9544a581..51c13eecb150 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.mdx +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.mdx @@ -114,11 +114,11 @@ if (someNullCondition !== false) { ```ts option='{ "allowComparingNullableBooleansToFalse": false }' declare const someUndefinedCondition: boolean | undefined; -if (someUndefinedCondition ?? true) { +if (!(someUndefinedCondition ?? true)) { } declare const someNullCondition: boolean | null; -if (!(someNullCondition ?? true)) { +if (someNullCondition ?? true) { } ``` @@ -127,16 +127,16 @@ if (!(someNullCondition ?? true)) { ## Fixer -| Comparison | Fixer Output | Notes | -| :-------------------------------: | ------------------------------- | ----------------------------------------------------------------------------------- | -| `booleanVar === true` | `booleanVar` | | -| `booleanVar !== true` | `!booleanVar` | | -| `booleanVar === false` | `!booleanVar` | | -| `booleanVar !== false` | `booleanVar` | | -| `nullableBooleanVar === true` | `nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` | -| `nullableBooleanVar !== true` | `!nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` | -| `!(nullableBooleanVar === false)` | `nullableBooleanVar ?? true` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` | -| `!(nullableBooleanVar !== false)` | `!(nullableBooleanVar ?? true)` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` | +| Comparison | Fixer Output | Notes | +| :----------------------------: | ------------------------------- | ----------------------------------------------------------------------------------- | +| `booleanVar === true` | `booleanVar` | | +| `booleanVar !== true` | `!booleanVar` | | +| `booleanVar === false` | `!booleanVar` | | +| `booleanVar !== false` | `booleanVar` | | +| `nullableBooleanVar === true` | `nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` | +| `nullableBooleanVar !== true` | `!nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` | +| `nullableBooleanVar === false` | `!(nullableBooleanVar ?? true)` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` | +| `nullableBooleanVar !== false` | `nullableBooleanVar ?? true` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` | ## When Not To Use It diff --git a/packages/eslint-plugin/tests/docs-eslint-output-snapshots/no-unnecessary-boolean-literal-compare.shot b/packages/eslint-plugin/tests/docs-eslint-output-snapshots/no-unnecessary-boolean-literal-compare.shot index 3397a172781a..878e1149f7d2 100644 --- a/packages/eslint-plugin/tests/docs-eslint-output-snapshots/no-unnecessary-boolean-literal-compare.shot +++ b/packages/eslint-plugin/tests/docs-eslint-output-snapshots/no-unnecessary-boolean-literal-compare.shot @@ -78,11 +78,11 @@ exports[`Validating rule docs no-unnecessary-boolean-literal-compare.mdx code ex Options: { "allowComparingNullableBooleansToFalse": false } declare const someUndefinedCondition: boolean | undefined; -if (someUndefinedCondition ?? true) { +if (!(someUndefinedCondition ?? true)) { } declare const someNullCondition: boolean | null; -if (!(someNullCondition ?? true)) { +if (someNullCondition ?? true) { } " `; From 7984ef7974f9b86816c66aab08fcd60703667fd2 Mon Sep 17 00:00:00 2001 From: Yukihiro Hasegawa <49516827+y-hsgw@users.noreply.github.com> Date: Tue, 30 Apr 2024 06:24:54 +0900 Subject: [PATCH 02/16] test(typescript-estree): add unit tests for inferSingleRun function (#8943) test: add testCase --- .../tests/lib/inferSingleRun.test.ts | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 packages/typescript-estree/tests/lib/inferSingleRun.test.ts diff --git a/packages/typescript-estree/tests/lib/inferSingleRun.test.ts b/packages/typescript-estree/tests/lib/inferSingleRun.test.ts new file mode 100644 index 000000000000..a3bb9ff081d1 --- /dev/null +++ b/packages/typescript-estree/tests/lib/inferSingleRun.test.ts @@ -0,0 +1,99 @@ +import * as path from 'path'; + +import { inferSingleRun } from '../../src/parseSettings/inferSingleRun'; + +describe('inferSingleRun', () => { + const originalEnvCI = process.env.CI; + const originalProcessArgv = process.argv; + const originalTSESTreeSingleRun = process.env.TSESTREE_SINGLE_RUN; + + afterEach(() => { + process.env.CI = originalEnvCI; + process.argv = originalProcessArgv; + process.env.TSESTREE_SINGLE_RUN = originalTSESTreeSingleRun; + }); + + it.each(['project', 'programs'])( + 'returns false when given %j is null', + key => { + const actual = inferSingleRun({ [key]: null }); + + expect(actual).toBe(false); + }, + ); + + it.each([ + ['true', true], + ['false', false], + ])('return %s when given TSESTREE_SINGLE_RUN is "%s"', (run, expected) => { + process.env.TSESTREE_SINGLE_RUN = run; + + const actual = inferSingleRun({ + programs: null, + project: './tsconfig.json', + }); + + expect(actual).toBe(expected); + }); + + it.each(['node_modules/.bin/eslint', 'node_modules/eslint/bin/eslint.js'])( + 'returns true when singleRun is inferred from process.argv', + pathName => { + process.argv = ['', path.normalize(pathName), '']; + + const actual = inferSingleRun({ + programs: null, + project: './tsconfig.json', + allowAutomaticSingleRunInference: true, + }); + + expect(actual).toBe(true); + }, + ); + + it('returns true when singleRun is inferred from CI=true', () => { + process.env.CI = 'true'; + + const actual = inferSingleRun({ + programs: null, + project: './tsconfig.json', + allowAutomaticSingleRunInference: true, + }); + + expect(actual).toBe(true); + }); + + it('returns false when there is no way to infer singleRun', () => { + const actual = inferSingleRun({ + programs: null, + project: './tsconfig.json', + }); + + expect(actual).toBe(false); + }); + + it('returns false even if CI=true when allowAutomaticSingleRunInference is not true', () => { + process.env.CI = 'true'; + + const actual = inferSingleRun({ + programs: null, + project: './tsconfig.json', + }); + + expect(actual).toBe(false); + }); + + it.each(['node_modules/.bin/eslint', 'node_modules/eslint/bin/eslint.js'])( + 'returns false even if singleRun is inferred from process.argv when allowAutomaticSingleRunInference is not true', + pathName => { + process.argv = ['', path.normalize(pathName), '']; + + const actual = inferSingleRun({ + programs: null, + project: './tsconfig.json', + }); + + expect(actual).toBe(false); + }, + ); +}); From 68739b21904df59a83edaec3b58c1c7e67de84fa Mon Sep 17 00:00:00 2001 From: YeonJuan Date: Thu, 2 May 2024 19:41:13 +0900 Subject: [PATCH 03/16] test: update integration test snapshot (#9037) --- .../tests/__snapshots__/flat-config-types.test.ts.snap | 2 +- .../recommended-does-not-require-program.test.ts.snap | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/integration-tests/tests/__snapshots__/flat-config-types.test.ts.snap b/packages/integration-tests/tests/__snapshots__/flat-config-types.test.ts.snap index 31c182ce621f..e6313ebeb826 100644 --- a/packages/integration-tests/tests/__snapshots__/flat-config-types.test.ts.snap +++ b/packages/integration-tests/tests/__snapshots__/flat-config-types.test.ts.snap @@ -16,7 +16,7 @@ exports[`flat-config-types eslint should work successfully 1`] = ` "line": 38, "message": "'_otherCases' is defined but never used.", "messageId": "unusedVar", - "nodeType": "Identifier", + "nodeType": null, "ruleId": "@typescript-eslint/no-unused-vars", "severity": 2, }, diff --git a/packages/integration-tests/tests/__snapshots__/recommended-does-not-require-program.test.ts.snap b/packages/integration-tests/tests/__snapshots__/recommended-does-not-require-program.test.ts.snap index 8feccdc5b0ef..ae2bd5a863e8 100644 --- a/packages/integration-tests/tests/__snapshots__/recommended-does-not-require-program.test.ts.snap +++ b/packages/integration-tests/tests/__snapshots__/recommended-does-not-require-program.test.ts.snap @@ -11,12 +11,12 @@ exports[`recommended-does-not-require-program eslint should work successfully 1` "messages": [ { "column": 7, - "endColumn": 19, + "endColumn": 10, "endLine": 1, "line": 1, "message": "'foo' is assigned a value but never used.", "messageId": "unusedVar", - "nodeType": "Identifier", + "nodeType": null, "ruleId": "@typescript-eslint/no-unused-vars", "severity": 2, }, From 225fd347ca9c68e2082ee84bb015021255bc4e1f Mon Sep 17 00:00:00 2001 From: "typescript-eslint[bot]" <53356952+typescript-eslint[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 10:57:01 +0930 Subject: [PATCH 04/16] chore: update sponsors (#9040) Co-authored-by: typescript-eslint[bot] --- packages/website/data/sponsors.json | 98 ++++++++++++++--------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/packages/website/data/sponsors.json b/packages/website/data/sponsors.json index 3d2de233e90b..6c5e547d63b3 100644 --- a/packages/website/data/sponsors.json +++ b/packages/website/data/sponsors.json @@ -3,7 +3,7 @@ "id": "ESLint", "image": "https://images.opencollective.com/eslint/48a2e5d/logo.png", "name": "ESLint", - "totalDonations": 2940000, + "totalDonations": 2970000, "website": "https://eslint.org/" }, { @@ -17,51 +17,51 @@ "id": "Nx (by Nrwl)", "image": "https://images.opencollective.com/nx/0efbe42/logo.png", "name": "Nx (by Nrwl)", - "totalDonations": 925000, + "totalDonations": 950000, "website": "https://nx.dev" }, { "id": "Hugging Face", "image": "https://images.opencollective.com/huggingface/5c934ee/logo.png", "name": "Hugging Face", - "totalDonations": 480000, + "totalDonations": 500000, "website": "https://huggingface.co" }, { "id": "Cybozu", "image": "https://images.opencollective.com/cybozu/933e46d/logo.png", "name": "Cybozu", - "totalDonations": 280000, + "totalDonations": 315000, "website": "https://cybozu.co.jp/" }, { "id": "Codecademy", "image": "https://images.opencollective.com/codecademy/d56a48d/logo.png", "name": "Codecademy", - "totalDonations": 270000, + "totalDonations": 280000, "website": "https://codecademy.com" }, + { + "id": "JetBrains", + "image": "https://images.opencollective.com/jetbrains/eb04ddc/logo.png", + "name": "JetBrains", + "totalDonations": 250000, + "website": "https://www.jetbrains.com/" + }, { "id": "Airbnb", "image": "https://images.opencollective.com/airbnb/d327d66/logo.png", "name": "Airbnb", - "totalDonations": 225800, + "totalDonations": 235800, "website": "https://www.airbnb.com/" }, { "id": "Sourcegraph", "image": "https://images.opencollective.com/sourcegraph/67e40ff/logo.png", "name": "Sourcegraph", - "totalDonations": 220000, + "totalDonations": 230000, "website": "https://about.sourcegraph.com" }, - { - "id": "JetBrains", - "image": "https://images.opencollective.com/jetbrains/eb04ddc/logo.png", - "name": "JetBrains", - "totalDonations": 200000, - "website": "https://www.jetbrains.com/" - }, { "id": "GitBook", "image": "https://images.opencollective.com/gitbook/820419f/logo.png", @@ -122,7 +122,7 @@ "id": "STORIS", "image": "https://images.opencollective.com/storis/dfb0e13/logo.png", "name": "STORIS", - "totalDonations": 63500, + "totalDonations": 66000, "website": "https://www.storis.com/" }, { @@ -185,7 +185,7 @@ "id": "CryptoNewsZ", "image": "https://images.opencollective.com/cryptonewsz/f50c823/logo.png", "name": "CryptoNewsZ", - "totalDonations": 25000, + "totalDonations": 27500, "website": "https://www.cryptonewsz.com/" }, { @@ -202,6 +202,13 @@ "totalDonations": 22000, "website": "https://twitter.com/nevir" }, + { + "id": "Quicko", + "image": "https://images.opencollective.com/quicko/7bd1dc9/logo.png", + "name": "Quicko", + "totalDonations": 22000, + "website": "https://quicko.com" + }, { "id": "David Johnston", "image": "https://images.opencollective.com/blacksheepcode/f186c05/avatar.png", @@ -209,20 +216,20 @@ "totalDonations": 20500, "website": "https://blacksheepcode.com" }, - { - "id": "Quicko", - "image": "https://images.opencollective.com/quicko/7bd1dc9/logo.png", - "name": "Quicko", - "totalDonations": 20000, - "website": "https://quicko.com" - }, { "id": "Evil Martians", "image": "https://images.opencollective.com/evilmartians/707ab4d/logo.png", "name": "Evil Martians", - "totalDonations": 18500, + "totalDonations": 19500, "website": "https://evilmartians.com/" }, + { + "id": "Corellium", + "image": "https://images.opencollective.com/corellium/aa8c228/logo.png", + "name": "Corellium", + "totalDonations": 18000, + "website": "https://www.corellium.com" + }, { "id": "kartenmacherei", "image": "https://images.opencollective.com/kartenmacherei/21bfcfb/logo.png", @@ -231,11 +238,11 @@ "website": "https://celebrate.company" }, { - "id": "Corellium", - "image": "https://images.opencollective.com/corellium/aa8c228/logo.png", - "name": "Corellium", - "totalDonations": 17400, - "website": "https://www.corellium.com" + "id": "Defined Networking", + "image": "https://images.opencollective.com/defined-networking/072920e/logo.png", + "name": "Defined Networking", + "totalDonations": 17500, + "website": "https://www.defined.net" }, { "id": "Balsa", @@ -248,29 +255,22 @@ "id": "0+X", "image": "https://images.opencollective.com/0-x/7239aff/logo.png", "name": "0+X", - "totalDonations": 16000, + "totalDonations": 17000, "website": "https://www.0x.se" }, - { - "id": "THE PADDING", - "image": "https://images.opencollective.com/thepadding/55e79ad/logo.png", - "name": "THE PADDING", - "totalDonations": 15000, - "website": "https://paddn.com/" - }, { "id": "Trevor Burnham", "image": "https://images.opencollective.com/trevorburnham/016f6da/avatar.png", "name": "Trevor Burnham", - "totalDonations": 15000, + "totalDonations": 16000, "website": "https://trevorburnham.com" }, { - "id": "Defined Networking", - "image": "https://images.opencollective.com/defined-networking/072920e/logo.png", - "name": "Defined Networking", + "id": "THE PADDING", + "image": "https://images.opencollective.com/thepadding/55e79ad/logo.png", + "name": "THE PADDING", "totalDonations": 15000, - "website": "https://www.defined.net" + "website": "https://paddn.com/" }, { "id": "Now4real", @@ -279,6 +279,13 @@ "totalDonations": 14500, "website": "https://now4real.com/" }, + { + "id": "WebdriverIO", + "image": "https://images.opencollective.com/webdriverio/bbdd5c3/logo.png", + "name": "WebdriverIO", + "totalDonations": 14000, + "website": "https://webdriver.io/" + }, { "id": "Knowledge Work", "image": "https://images.opencollective.com/knowledge-work/f91b72d/logo.png", @@ -286,13 +293,6 @@ "totalDonations": 11200, "website": "https://kwork.studio/" }, - { - "id": "WebdriverIO", - "image": "https://images.opencollective.com/webdriverio/bbdd5c3/logo.png", - "name": "WebdriverIO", - "totalDonations": 10500, - "website": "https://webdriver.io/" - }, { "id": "Gianfranco Palumbo", "image": "https://images.opencollective.com/gianpaj/5d62d25/avatar.png", From f248e689b04bdfd81429977a731ba6b8ad82622e Mon Sep 17 00:00:00 2001 From: Kirk Waiblinger Date: Thu, 2 May 2024 22:21:42 -0600 Subject: [PATCH 05/16] docs: [no-floating-promises] remove ugly commas (#9034) remove ugly commas --- packages/eslint-plugin/docs/rules/no-floating-promises.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/no-floating-promises.mdx b/packages/eslint-plugin/docs/rules/no-floating-promises.mdx index 6b42594dae63..9ef3c839825e 100644 --- a/packages/eslint-plugin/docs/rules/no-floating-promises.mdx +++ b/packages/eslint-plugin/docs/rules/no-floating-promises.mdx @@ -22,8 +22,8 @@ Valid ways of handling a Promise-valued statement include: This rule also reports when an Array containing Promises is created and not properly handled. The main way to resolve this is by using one of the Promise concurrency methods to create a single Promise, then handling that according to the procedure above. These methods include: -- `Promise.all()`, -- `Promise.allSettled()`, +- `Promise.all()` +- `Promise.allSettled()` - `Promise.any()` - `Promise.race()` From ab9262145738654de2e451413e59b94556fe47b5 Mon Sep 17 00:00:00 2001 From: Kirk Waiblinger Date: Mon, 6 May 2024 09:11:40 -0600 Subject: [PATCH 06/16] docs: correct its/it's spelling (#9048) spelling fix --- packages/eslint-plugin/tests/docs.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/tests/docs.test.ts b/packages/eslint-plugin/tests/docs.test.ts index 049c0d168e4f..c3f08de4bbda 100644 --- a/packages/eslint-plugin/tests/docs.test.ts +++ b/packages/eslint-plugin/tests/docs.test.ts @@ -448,7 +448,7 @@ describe('Validating rule metadata', () => { describe(ruleName, () => { it('`name` field in rule must match the filename', () => { // validate if rule name is same as url - // there is no way to access this field but its used only in generation of docs url + // there is no way to access this field but it's used only in generation of docs url expect(rule.meta.docs?.url).toBe( `https://typescript-eslint.io/rules/${ruleName}`, ); From d166fdde4ff171d377495d4d41a872045ab6c707 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 6 May 2024 11:11:49 -0700 Subject: [PATCH 07/16] fix: do not pass tsconfig canonical file name to typescript API to get program details for config file (#9042) --- .../create-program/createDefaultProgram.ts | 4 ++-- .../create-program/createProjectProgram.ts | 6 +++-- .../getWatchProgramsForProjects.ts | 18 +++++++++------ .../src/parseSettings/createParseSettings.ts | 4 ++-- .../src/parseSettings/index.ts | 2 +- .../src/parseSettings/resolveProjectList.ts | 22 ++++++++++--------- packages/typescript-estree/src/parser.ts | 10 ++++----- .../tests/lib/semanticInfo-singleRun.test.ts | 3 +-- .../website/src/components/linter/config.ts | 2 +- 9 files changed, 39 insertions(+), 32 deletions(-) diff --git a/packages/typescript-estree/src/create-program/createDefaultProgram.ts b/packages/typescript-estree/src/create-program/createDefaultProgram.ts index b42ec76c678b..f169f2da4389 100644 --- a/packages/typescript-estree/src/create-program/createDefaultProgram.ts +++ b/packages/typescript-estree/src/create-program/createDefaultProgram.ts @@ -23,11 +23,11 @@ function createDefaultProgram( parseSettings.filePath || 'unnamed file', ); - if (parseSettings.projects.length !== 1) { + if (parseSettings.projects.size !== 1) { return undefined; } - const tsconfigPath = parseSettings.projects[0]; + const tsconfigPath = Array.from(parseSettings.projects.values())[0]; const commandLine = ts.getParsedCommandLineOfConfigFile( tsconfigPath, diff --git a/packages/typescript-estree/src/create-program/createProjectProgram.ts b/packages/typescript-estree/src/create-program/createProjectProgram.ts index a58097e3cd73..3e8432d0b46f 100644 --- a/packages/typescript-estree/src/create-program/createProjectProgram.ts +++ b/packages/typescript-estree/src/create-program/createProjectProgram.ts @@ -48,7 +48,9 @@ function createProjectProgram( parseSettings.filePath, parseSettings.tsconfigRootDir, ); - const relativeProjects = parseSettings.projects.map(describeProjectFilePath); + const relativeProjects = Array.from(parseSettings.projects.values()).map( + describeProjectFilePath, + ); const describedPrograms = relativeProjects.length === 1 ? relativeProjects[0] @@ -93,7 +95,7 @@ function createProjectProgram( if (!hasMatchedAnError) { const [describedInclusions, describedSpecifiers] = - parseSettings.projects.length === 1 + parseSettings.projects.size === 1 ? ['that TSConfig does not', 'that TSConfig'] : ['none of those TSConfigs', 'one of those TSConfigs']; errorLines.push( diff --git a/packages/typescript-estree/src/create-program/getWatchProgramsForProjects.ts b/packages/typescript-estree/src/create-program/getWatchProgramsForProjects.ts index 1ad82ec29b3d..01ef2a2532b9 100644 --- a/packages/typescript-estree/src/create-program/getWatchProgramsForProjects.ts +++ b/packages/typescript-estree/src/create-program/getWatchProgramsForProjects.ts @@ -151,7 +151,7 @@ function getWatchProgramsForProjects( ); } - const currentProjectsFromSettings = new Set(parseSettings.projects); + const currentProjectsFromSettings = new Map(parseSettings.projects); /* * before we go into the process of attempting to find and update every program @@ -198,13 +198,13 @@ function getWatchProgramsForProjects( * - the file is new/renamed, and the program hasn't been updated. */ for (const tsconfigPath of parseSettings.projects) { - const existingWatch = knownWatchProgramMap.get(tsconfigPath); + const existingWatch = knownWatchProgramMap.get(tsconfigPath[0]); if (existingWatch) { const updatedProgram = maybeInvalidateProgram( existingWatch, filePath, - tsconfigPath, + tsconfigPath[0], ); if (!updatedProgram) { continue; @@ -215,7 +215,7 @@ function getWatchProgramsForProjects( // cache and check the file list const fileList = updateCachedFileList( - tsconfigPath, + tsconfigPath[0], updatedProgram, parseSettings, ); @@ -229,15 +229,19 @@ function getWatchProgramsForProjects( continue; } - const programWatch = createWatchProgram(tsconfigPath, parseSettings); - knownWatchProgramMap.set(tsconfigPath, programWatch); + const programWatch = createWatchProgram(tsconfigPath[1], parseSettings); + knownWatchProgramMap.set(tsconfigPath[0], programWatch); const program = programWatch.getProgram().getProgram(); // sets parent pointers in source files program.getTypeChecker(); // cache and check the file list - const fileList = updateCachedFileList(tsconfigPath, program, parseSettings); + const fileList = updateCachedFileList( + tsconfigPath[0], + program, + parseSettings, + ); if (fileList.has(filePath)) { log('Found program for file. %s', filePath); // we can return early because we know this program contains the file diff --git a/packages/typescript-estree/src/parseSettings/createParseSettings.ts b/packages/typescript-estree/src/parseSettings/createParseSettings.ts index 49d048391d8f..b5d52ce569b8 100644 --- a/packages/typescript-estree/src/parseSettings/createParseSettings.ts +++ b/packages/typescript-estree/src/parseSettings/createParseSettings.ts @@ -113,7 +113,7 @@ export function createParseSettings( : console.log, // eslint-disable-line no-console preserveNodeMaps: options.preserveNodeMaps !== false, programs: Array.isArray(options.programs) ? options.programs : null, - projects: [], + projects: new Map(), range: options.range === true, singleRun, suppressDeprecatedPropertyWarnings: @@ -172,7 +172,7 @@ export function createParseSettings( // So in this specific case we default to 'none' if no value was provided if ( options.jsDocParsingMode == null && - parseSettings.projects.length === 0 && + parseSettings.projects.size === 0 && parseSettings.programs == null && parseSettings.EXPERIMENTAL_projectService == null ) { diff --git a/packages/typescript-estree/src/parseSettings/index.ts b/packages/typescript-estree/src/parseSettings/index.ts index 1df275901066..3511e3be718d 100644 --- a/packages/typescript-estree/src/parseSettings/index.ts +++ b/packages/typescript-estree/src/parseSettings/index.ts @@ -128,7 +128,7 @@ export interface MutableParseSettings { /** * Normalized paths to provided project paths. */ - projects: readonly CanonicalPath[]; + projects: ReadonlyMap; /** * Whether to add the `range` property to AST nodes. diff --git a/packages/typescript-estree/src/parseSettings/resolveProjectList.ts b/packages/typescript-estree/src/parseSettings/resolveProjectList.ts index 9c3b8480499a..4b24608b6ff8 100644 --- a/packages/typescript-estree/src/parseSettings/resolveProjectList.ts +++ b/packages/typescript-estree/src/parseSettings/resolveProjectList.ts @@ -18,8 +18,10 @@ const log = debug( 'typescript-eslint:typescript-estree:parser:parseSettings:resolveProjectList', ); -let RESOLUTION_CACHE: ExpiringCache | null = - null; +let RESOLUTION_CACHE: ExpiringCache< + string, + ReadonlyMap +> | null = null; export function clearGlobCache(): void { RESOLUTION_CACHE?.clear(); @@ -36,7 +38,7 @@ export function resolveProjectList( singleRun: boolean; tsconfigRootDir: string; }>, -): readonly CanonicalPath[] { +): ReadonlyMap { const sanitizedProjects: string[] = []; // Normalize and sanitize the project paths @@ -49,7 +51,7 @@ export function resolveProjectList( } if (sanitizedProjects.length === 0) { - return []; + return new Map(); } const projectFolderIgnoreList = ( @@ -91,7 +93,7 @@ export function resolveProjectList( const nonGlobProjects = sanitizedProjects.filter(project => !isGlob(project)); const globProjects = sanitizedProjects.filter(project => isGlob(project)); - const uniqueCanonicalProjectPaths = new Set( + const uniqueCanonicalProjectPaths = new Map( nonGlobProjects .concat( globProjects.length === 0 @@ -100,11 +102,12 @@ export function resolveProjectList( cwd: options.tsconfigRootDir, }), ) - .map(project => + .map(project => [ getCanonicalFileName( ensureAbsolutePath(project, options.tsconfigRootDir), ), - ), + ensureAbsolutePath(project, options.tsconfigRootDir), + ]), ); log( @@ -112,9 +115,8 @@ export function resolveProjectList( uniqueCanonicalProjectPaths, ); - const returnValue = Array.from(uniqueCanonicalProjectPaths); - RESOLUTION_CACHE.set(cacheKey, returnValue); - return returnValue; + RESOLUTION_CACHE.set(cacheKey, uniqueCanonicalProjectPaths); + return uniqueCanonicalProjectPaths; } function getHash({ diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index b4931a6da36e..d724d81e379d 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -188,12 +188,12 @@ function parseAndGenerateServices( if ( parseSettings.singleRun && !parseSettings.programs && - parseSettings.projects.length > 0 + parseSettings.projects.size > 0 ) { parseSettings.programs = { *[Symbol.iterator](): Iterator { for (const configFile of parseSettings.projects) { - const existingProgram = existingPrograms.get(configFile); + const existingProgram = existingPrograms.get(configFile[0]); if (existingProgram) { yield existingProgram; } else { @@ -201,8 +201,8 @@ function parseAndGenerateServices( 'Detected single-run/CLI usage, creating Program once ahead of time for project: %s', configFile, ); - const newProgram = createProgramFromConfigFile(configFile); - existingPrograms.set(configFile, newProgram); + const newProgram = createProgramFromConfigFile(configFile[1]); + existingPrograms.set(configFile[0], newProgram); yield newProgram; } } @@ -214,7 +214,7 @@ function parseAndGenerateServices( * Generate a full ts.Program or offer provided instances in order to be able to provide parser services, such as type-checking */ const hasFullTypeInformation = - parseSettings.programs != null || parseSettings.projects.length > 0; + parseSettings.programs != null || parseSettings.projects.size > 0; if ( typeof options.errorOnTypeScriptSyntacticAndSemanticIssues === 'boolean' && diff --git a/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts b/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts index 1051b8d2f171..f041d403f4fb 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts @@ -1,7 +1,6 @@ import glob = require('glob'); import * as path from 'path'; -import { getCanonicalFileName } from '../../src/create-program/shared'; import { createProgramFromConfigFile as createProgramFromConfigFileOriginal } from '../../src/create-program/useProvidedPrograms'; import { clearParseAndGenerateServicesCalls, @@ -94,7 +93,7 @@ const options = { } as const; const resolvedProject = (p: string): string => - getCanonicalFileName(path.resolve(path.join(process.cwd(), FIXTURES_DIR), p)); + path.resolve(path.join(process.cwd(), FIXTURES_DIR), p); describe('semanticInfo - singleRun', () => { beforeEach(() => { diff --git a/packages/website/src/components/linter/config.ts b/packages/website/src/components/linter/config.ts index 8262487369c1..c0e22f4e1637 100644 --- a/packages/website/src/components/linter/config.ts +++ b/packages/website/src/components/linter/config.ts @@ -25,7 +25,7 @@ export const defaultParseSettings: ParseSettings = { log: console.log, preserveNodeMaps: true, programs: null, - projects: [], + projects: new Map(), range: true, singleRun: false, suppressDeprecatedPropertyWarnings: false, From 37a41d9fb9246148a249aa9064c6b0929e775666 Mon Sep 17 00:00:00 2001 From: Jordan Overbye <6265154+jordanoverbye@users.noreply.github.com> Date: Wed, 8 May 2024 17:48:12 +1000 Subject: [PATCH 08/16] docs: fix broken link to `import/no-duplicates` on `no-duplicate-imports` page (#9063) Update no-duplicate-imports.mdx Fix broken link --- packages/eslint-plugin/docs/rules/no-duplicate-imports.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/no-duplicate-imports.mdx b/packages/eslint-plugin/docs/rules/no-duplicate-imports.mdx index 1953792c8818..ae1d957d57c0 100644 --- a/packages/eslint-plugin/docs/rules/no-duplicate-imports.mdx +++ b/packages/eslint-plugin/docs/rules/no-duplicate-imports.mdx @@ -1,6 +1,6 @@ :::danger Deprecated -This rule has been deprecated in favour of the [`import/no-duplicates`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/no-duplicates.mdx) rule. +This rule has been deprecated in favour of the [`import/no-duplicates`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/no-duplicates.md) rule. ::: From d696ea22cd3e15041bab907110476c312ec968e2 Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Wed, 8 May 2024 11:15:14 +0300 Subject: [PATCH 09/16] docs(eslint-plugin): fix several 404 URLs (#9064) --- packages/eslint-plugin/docs/rules/consistent-type-imports.mdx | 2 +- .../eslint-plugin/docs/rules/lines-between-class-members.mdx | 2 -- .../eslint-plugin/docs/rules/no-import-type-side-effects.mdx | 2 +- packages/eslint-plugin/docs/rules/unbound-method.mdx | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/consistent-type-imports.mdx b/packages/eslint-plugin/docs/rules/consistent-type-imports.mdx index 20ca6c4ff19d..8df00017e565 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-imports.mdx +++ b/packages/eslint-plugin/docs/rules/consistent-type-imports.mdx @@ -132,5 +132,5 @@ We recommend picking a single option for this rule that works best for your proj ## Related To - [`no-import-type-side-effects`](./no-import-type-side-effects.mdx) -- [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.mdx) +- [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.md) - [`import/no-duplicates` with `{"prefer-inline": true}`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md#inline-type-imports) diff --git a/packages/eslint-plugin/docs/rules/lines-between-class-members.mdx b/packages/eslint-plugin/docs/rules/lines-between-class-members.mdx index c093b715ee9e..0112c47cbfd6 100644 --- a/packages/eslint-plugin/docs/rules/lines-between-class-members.mdx +++ b/packages/eslint-plugin/docs/rules/lines-between-class-members.mdx @@ -21,8 +21,6 @@ In addition to the options supported by the `lines-between-class-members` rule i - `"exceptAfterOverload": true` (default) - Skip checking empty lines after overload class members - `"exceptAfterOverload": false` - **do not** skip checking empty lines after overload class members -- [See the other options allowed](https://github.com/eslint/eslint/blob/main/docs/rules/lines-between-class-members.md#options) - ### `exceptAfterOverload: true` Examples of **correct** code for the `{ "exceptAfterOverload": true }` option: diff --git a/packages/eslint-plugin/docs/rules/no-import-type-side-effects.mdx b/packages/eslint-plugin/docs/rules/no-import-type-side-effects.mdx index 6d0d39a3cd37..f115b036add2 100644 --- a/packages/eslint-plugin/docs/rules/no-import-type-side-effects.mdx +++ b/packages/eslint-plugin/docs/rules/no-import-type-side-effects.mdx @@ -76,5 +76,5 @@ If you're not using TypeScript 5.0's `verbatimModuleSyntax` option and your proj ## Related To - [`consistent-type-imports`](./consistent-type-imports.mdx) -- [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.mdx) +- [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.md) - [`import/no-duplicates` with `{"prefer-inline": true}`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md#inline-type-imports) diff --git a/packages/eslint-plugin/docs/rules/unbound-method.mdx b/packages/eslint-plugin/docs/rules/unbound-method.mdx index 87beb12da8eb..0399686b1e14 100644 --- a/packages/eslint-plugin/docs/rules/unbound-method.mdx +++ b/packages/eslint-plugin/docs/rules/unbound-method.mdx @@ -16,7 +16,7 @@ Otherwise, passing class methods around as values can remove type safety by fail This rule reports when a class method is referenced in an unbound manner. :::note Tip -If you're working with `jest`, you can use [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.mdx) to lint your test files, which knows when it's ok to pass an unbound method to `expect` calls. +If you're working with `jest`, you can use [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md) to lint your test files, which knows when it's ok to pass an unbound method to `expect` calls. ::: ## Examples From af47bc914564789656e2bd1cfe390626882563f6 Mon Sep 17 00:00:00 2001 From: maro Date: Thu, 9 May 2024 01:12:51 +0900 Subject: [PATCH 10/16] docs: correct the usage of `eslint-recommended` (#9014) Co-authored-by: auvred <61150013+auvred@users.noreply.github.com> --- docs/users/Shared_Configurations.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/users/Shared_Configurations.mdx b/docs/users/Shared_Configurations.mdx index feeefda3f80b..5b52521eea08 100644 --- a/docs/users/Shared_Configurations.mdx +++ b/docs/users/Shared_Configurations.mdx @@ -375,7 +375,7 @@ Additionally, it enables rules that promote using the more modern constructs Typ ```js title="eslint.config.js" export default tseslint.config( eslint.configs.recommended, - ...tseslint.configs.eslintRecommended, + tseslint.configs.eslintRecommended, ); ``` From 51102482255824f335c38e8c02d88f00e2628c13 Mon Sep 17 00:00:00 2001 From: Vinccool96 Date: Thu, 9 May 2024 16:57:10 -0400 Subject: [PATCH 11/16] feat(rule-tester): check for missing placeholder data in the message (#9039) Enhancement(rule-tester): check for missing placeholder data in the message --- packages/rule-tester/src/RuleTester.ts | 67 ++++++++++- packages/rule-tester/src/utils/interpolate.ts | 28 +++-- .../tests/eslint-base/eslint-base.test.js | 112 ++++++++++++++++++ .../tests/eslint-base/fixtures/messageId.js | 107 +++++++++++++++++ .../tests/eslint-base/fixtures/suggestions.js | 58 +++++++++ 5 files changed, 360 insertions(+), 12 deletions(-) diff --git a/packages/rule-tester/src/RuleTester.ts b/packages/rule-tester/src/RuleTester.ts index 324700fa264a..4b8e54e57856 100644 --- a/packages/rule-tester/src/RuleTester.ts +++ b/packages/rule-tester/src/RuleTester.ts @@ -38,7 +38,7 @@ import { satisfiesAllDependencyConstraints } from './utils/dependencyConstraints import { freezeDeeply } from './utils/freezeDeeply'; import { getRuleOptionsSchema } from './utils/getRuleOptionsSchema'; import { hasOwnProperty } from './utils/hasOwnProperty'; -import { interpolate } from './utils/interpolate'; +import { getPlaceholderMatcher, interpolate } from './utils/interpolate'; import { isReadonlyArray } from './utils/isReadonlyArray'; import * as SourceCodeFixer from './utils/SourceCodeFixer'; import { @@ -73,6 +73,45 @@ let defaultConfig = deepMerge( testerDefaultConfig, ) as TesterConfigWithDefaults; +/** + * Extracts names of {{ placeholders }} from the reported message. + * @param message Reported message + * @returns Array of placeholder names + */ +function getMessagePlaceholders(message: string): string[] { + const matcher = getPlaceholderMatcher(); + + return Array.from(message.matchAll(matcher), ([, name]) => name.trim()); +} + +/** + * Returns the placeholders in the reported messages but + * only includes the placeholders available in the raw message and not in the provided data. + * @param message The reported message + * @param raw The raw message specified in the rule meta.messages + * @param data The passed + * @returns Missing placeholder names + */ +function getUnsubstitutedMessagePlaceholders( + message: string, + raw: string, + data: Record = {}, +): string[] { + const unsubstituted = getMessagePlaceholders(message); + + if (unsubstituted.length === 0) { + return []; + } + + // Remove false positives by only counting placeholders in the raw message, which were not provided in the data matcher or added with a data property + const known = getMessagePlaceholders(raw); + const provided = Object.keys(data); + + return unsubstituted.filter( + name => known.includes(name) && !provided.includes(name), + ); +} + export class RuleTester extends TestFramework { readonly #testerConfig: TesterConfigWithDefaults; readonly #rules: Record = {}; @@ -809,6 +848,19 @@ export class RuleTester extends TestFramework { error.messageId, `messageId '${message.messageId}' does not match expected messageId '${error.messageId}'.`, ); + + const unsubstitutedPlaceholders = + getUnsubstitutedMessagePlaceholders( + message.message, + rule.meta.messages[message.messageId], + error.data, + ); + + assert.ok( + unsubstitutedPlaceholders.length === 0, + `The reported message has ${unsubstitutedPlaceholders.length > 1 ? `unsubstituted placeholders: ${unsubstitutedPlaceholders.map(name => `'${name}'`).join(', ')}` : `an unsubstituted placeholder '${unsubstitutedPlaceholders[0]}'`}. Please provide the missing ${unsubstitutedPlaceholders.length > 1 ? 'values' : 'value'} via the 'data' property in the context.report() call.`, + ); + if (hasOwnProperty(error, 'data')) { /* * if data was provided, then directly compare the returned message to a synthetic @@ -954,6 +1006,19 @@ export class RuleTester extends TestFramework { expectedSuggestion.messageId, `${suggestionPrefix} messageId should be '${expectedSuggestion.messageId}' but got '${actualSuggestion.messageId}' instead.`, ); + + const unsubstitutedPlaceholders = + getUnsubstitutedMessagePlaceholders( + actualSuggestion.desc, + rule.meta.messages[expectedSuggestion.messageId], + expectedSuggestion.data, + ); + + assert.ok( + unsubstitutedPlaceholders.length === 0, + `The message of the suggestion has ${unsubstitutedPlaceholders.length > 1 ? `unsubstituted placeholders: ${unsubstitutedPlaceholders.map(name => `'${name}'`).join(', ')}` : `an unsubstituted placeholder '${unsubstitutedPlaceholders[0]}'`}. Please provide the missing ${unsubstitutedPlaceholders.length > 1 ? 'values' : 'value'} via the 'data' property for the suggestion in the context.report() call.`, + ); + if (hasOwnProperty(expectedSuggestion, 'data')) { const unformattedMetaMessage = rule.meta.messages[expectedSuggestion.messageId]; diff --git a/packages/rule-tester/src/utils/interpolate.ts b/packages/rule-tester/src/utils/interpolate.ts index 53e5aa351938..6dbe785b70b0 100644 --- a/packages/rule-tester/src/utils/interpolate.ts +++ b/packages/rule-tester/src/utils/interpolate.ts @@ -2,6 +2,13 @@ import type { ReportDescriptorMessageData } from '@typescript-eslint/utils/ts-eslint'; +/** + * Returns a global expression matching placeholders in messages. + */ +export function getPlaceholderMatcher(): RegExp { + return /\{\{([^{}]+?)\}\}/gu; +} + export function interpolate( text: string, data: ReportDescriptorMessageData | undefined, @@ -10,18 +17,17 @@ export function interpolate( return text; } + const matcher = getPlaceholderMatcher(); + // Substitution content for any {{ }} markers. - return text.replace( - /\{\{([^{}]+?)\}\}/gu, - (fullMatch, termWithWhitespace: string) => { - const term = termWithWhitespace.trim(); + return text.replace(matcher, (fullMatch, termWithWhitespace: string) => { + const term = termWithWhitespace.trim(); - if (term in data) { - return String(data[term]); - } + if (term in data) { + return String(data[term]); + } - // Preserve old behavior: If parameter name not provided, don't replace it. - return fullMatch; - }, - ); + // Preserve old behavior: If parameter name not provided, don't replace it. + return fullMatch; + }); } diff --git a/packages/rule-tester/tests/eslint-base/eslint-base.test.js b/packages/rule-tester/tests/eslint-base/eslint-base.test.js index 8304dee78f95..56429508e4e3 100644 --- a/packages/rule-tester/tests/eslint-base/eslint-base.test.js +++ b/packages/rule-tester/tests/eslint-base/eslint-base.test.js @@ -1686,6 +1686,63 @@ describe("RuleTester", () => { }, "Hydrated message \"Avoid using variables named 'notFoo'.\" does not match \"Avoid using variables named 'foo'.\""); }); + it("should throw if the message has a single unsubstituted placeholder when data is not specified", () => { + assert.throws(() => { + ruleTester.run("foo", require("./fixtures/messageId").withMissingData, { + valid: [], + invalid: [{ code: "foo", errors: [{ messageId: "avoidFoo" }] }] + }); + }, "The reported message has an unsubstituted placeholder 'name'. Please provide the missing value via the 'data' property in the context.report() call."); + }); + + it("should throw if the message has a single unsubstituted placeholders when data is specified", () => { + assert.throws(() => { + ruleTester.run("foo", require("./fixtures/messageId").withMissingData, { + valid: [], + invalid: [{ code: "foo", errors: [{ messageId: "avoidFoo", data: { name: "name" } }] }] + }); + }, "Hydrated message \"Avoid using variables named 'name'.\" does not match \"Avoid using variables named '{{ name }}'."); + }); + + it("should throw if the message has multiple unsubstituted placeholders when data is not specified", () => { + assert.throws(() => { + ruleTester.run("foo", require("./fixtures/messageId").withMultipleMissingDataProperties, { + valid: [], + invalid: [{ code: "foo", errors: [{ messageId: "avoidFoo" }] }] + }); + }, "The reported message has unsubstituted placeholders: 'type', 'name'. Please provide the missing values via the 'data' property in the context.report() call."); + }); + + it("should not throw if the data in the message contains placeholders not present in the raw message", () => { + ruleTester.run("foo", require("./fixtures/messageId").withPlaceholdersInData, { + valid: [], + invalid: [{ code: "foo", errors: [{ messageId: "avoidFoo" }] }] + }); + }); + + it("should throw if the data in the message contains the same placeholder and data is not specified", () => { + assert.throws(() => { + ruleTester.run("foo", require("./fixtures/messageId").withSamePlaceholdersInData, { + valid: [], + invalid: [{ code: "foo", errors: [{ messageId: "avoidFoo" }] }] + }); + }, "The reported message has an unsubstituted placeholder 'name'. Please provide the missing value via the 'data' property in the context.report() call."); + }); + + it("should not throw if the data in the message contains the same placeholder and data is specified", () => { + ruleTester.run("foo", require("./fixtures/messageId").withSamePlaceholdersInData, { + valid: [], + invalid: [{ code: "foo", errors: [{ messageId: "avoidFoo", data: { name: "{{ name }}" } }] }] + }); + }); + + it("should not throw an error for specifying non-string data values", () => { + ruleTester.run("foo", require("./fixtures/messageId").withNonStringData, { + valid: [], + invalid: [{ code: "0", errors: [{ messageId: "avoid", data: { value: 0 } }] }] + }); + }); + // messageId/message misconfiguration cases it("should throw if user tests for both message and messageId", () => { assert.throws(() => { @@ -1854,6 +1911,61 @@ describe("RuleTester", () => { }); }); + it("should fail with a single missing data placeholder when data is not specified", () => { + assert.throws(() => { + ruleTester.run("suggestions-messageIds", require("../../fixtures/testers/rule-tester/suggestions").withMissingPlaceholderData, { + valid: [], + invalid: [{ + code: "var foo;", + errors: [{ + messageId: "avoidFoo", + suggestions: [{ + messageId: "renameFoo", + output: "var bar;" + }] + }] + }] + }); + }, "The message of the suggestion has an unsubstituted placeholder 'newName'. Please provide the missing value via the 'data' property for the suggestion in the context.report() call."); + }); + + it("should fail with a single missing data placeholder when data is specified", () => { + assert.throws(() => { + ruleTester.run("suggestions-messageIds", require("../../fixtures/testers/rule-tester/suggestions").withMissingPlaceholderData, { + valid: [], + invalid: [{ + code: "var foo;", + errors: [{ + messageId: "avoidFoo", + suggestions: [{ + messageId: "renameFoo", + data: { other: "name" }, + output: "var bar;" + }] + }] + }] + }); + }, "The message of the suggestion has an unsubstituted placeholder 'newName'. Please provide the missing value via the 'data' property for the suggestion in the context.report() call."); + }); + + it("should fail with multiple missing data placeholders when data is not specified", () => { + assert.throws(() => { + ruleTester.run("suggestions-messageIds", require("../../fixtures/testers/rule-tester/suggestions").withMultipleMissingPlaceholderDataProperties, { + valid: [], + invalid: [{ + code: "var foo;", + errors: [{ + messageId: "avoidFoo", + suggestions: [{ + messageId: "rename", + output: "var bar;" + }] + }] + }] + }); + }, "The message of the suggestion has unsubstituted placeholders: 'currentName', 'newName'. Please provide the missing values via the 'data' property for the suggestion in the context.report() call."); + }); + it("should pass when tested using empty suggestion test objects if the array length is correct", () => { ruleTester.run("suggestions-messageIds", require("./fixtures/suggestions").withMessageIds, { diff --git a/packages/rule-tester/tests/eslint-base/fixtures/messageId.js b/packages/rule-tester/tests/eslint-base/fixtures/messageId.js index 8f2bb2a246f3..3813b878edc6 100644 --- a/packages/rule-tester/tests/eslint-base/fixtures/messageId.js +++ b/packages/rule-tester/tests/eslint-base/fixtures/messageId.js @@ -37,3 +37,110 @@ module.exports.withMessageOnly = { }; } }; + +module.exports.withMissingData = { + meta: { + messages: { + avoidFoo: "Avoid using variables named '{{ name }}'.", + unused: "An unused key" + } + }, + create(context) { + return { + Identifier(node) { + if (node.name === "foo") { + context.report({ + node, + messageId: "avoidFoo", + }); + } + } + }; + } +}; + +module.exports.withMultipleMissingDataProperties = { + meta: { + messages: { + avoidFoo: "Avoid using {{ type }} named '{{ name }}'.", + unused: "An unused key" + } + }, + create(context) { + return { + Identifier(node) { + if (node.name === "foo") { + context.report({ + node, + messageId: "avoidFoo", + }); + } + } + }; + } +}; + +module.exports.withPlaceholdersInData = { + meta: { + messages: { + avoidFoo: "Avoid using variables named '{{ name }}'.", + unused: "An unused key" + } + }, + create(context) { + return { + Identifier(node) { + if (node.name === "foo") { + context.report({ + node, + messageId: "avoidFoo", + data: { name: '{{ placeholder }}' }, + }); + } + } + }; + } +}; + +module.exports.withSamePlaceholdersInData = { + meta: { + messages: { + avoidFoo: "Avoid using variables named '{{ name }}'.", + unused: "An unused key" + } + }, + create(context) { + return { + Identifier(node) { + if (node.name === "foo") { + context.report({ + node, + messageId: "avoidFoo", + data: { name: '{{ name }}' }, + }); + } + } + }; + } +}; + +module.exports.withNonStringData = { + meta: { + messages: { + avoid: "Avoid using the value '{{ value }}'.", + } + }, + create(context) { + return { + Literal(node) { + if (node.value === 0) { + context.report({ + node, + messageId: "avoid", + data: { value: 0 }, + }); + } + } + }; + } +}; diff --git a/packages/rule-tester/tests/eslint-base/fixtures/suggestions.js b/packages/rule-tester/tests/eslint-base/fixtures/suggestions.js index d883167889e0..71781086f4b8 100644 --- a/packages/rule-tester/tests/eslint-base/fixtures/suggestions.js +++ b/packages/rule-tester/tests/eslint-base/fixtures/suggestions.js @@ -166,3 +166,61 @@ module.exports.withoutHasSuggestionsProperty = { }; } }; + +module.exports.withMissingPlaceholderData = { + meta: { + messages: { + avoidFoo: "Avoid using identifiers named '{{ name }}'.", + renameFoo: "Rename identifier 'foo' to '{{ newName }}'" + }, + hasSuggestions: true + }, + create(context) { + return { + Identifier(node) { + if (node.name === "foo") { + context.report({ + node, + messageId: "avoidFoo", + data: { + name: "foo" + }, + suggest: [{ + messageId: "renameFoo", + fix: fixer => fixer.replaceText(node, "bar") + }] + }); + } + } + }; + } +}; + +module.exports.withMultipleMissingPlaceholderDataProperties = { + meta: { + messages: { + avoidFoo: "Avoid using identifiers named '{{ name }}'.", + rename: "Rename identifier '{{ currentName }}' to '{{ newName }}'" + }, + hasSuggestions: true + }, + create(context) { + return { + Identifier(node) { + if (node.name === "foo") { + context.report({ + node, + messageId: "avoidFoo", + data: { + name: "foo" + }, + suggest: [{ + messageId: "rename", + fix: fixer => fixer.replaceText(node, "bar") + }] + }); + } + } + }; + } +}; From 3f766b7c9cb6a52b77953c796db9421e80699833 Mon Sep 17 00:00:00 2001 From: Tiger Oakes Date: Sat, 11 May 2024 00:44:39 -0700 Subject: [PATCH 12/16] docs: add docs for using rule tester with node:test (#9049) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: add docs for using rule tester with node:test Fixes #8273 * Update docs/packages/Rule_Tester.mdx Co-authored-by: Josh Goldberg ✨ --------- Co-authored-by: Josh Goldberg ✨ Co-authored-by: auvred <61150013+auvred@users.noreply.github.com> --- docs/packages/Rule_Tester.mdx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/packages/Rule_Tester.mdx b/docs/packages/Rule_Tester.mdx index 51f53519e797..4c62d391c7ee 100644 --- a/docs/packages/Rule_Tester.mdx +++ b/docs/packages/Rule_Tester.mdx @@ -233,6 +233,27 @@ RuleTester.itOnly = vitest.it.only; RuleTester.describe = vitest.describe; ``` +#### Node built-in test runner + +Consider setting up `RuleTester`'s static properties in a preloaded module using the [`--import`](https://nodejs.org/api/cli.html#--importmodule) or [`--require`](https://nodejs.org/api/cli.html#-r---require-module) flag: + +```ts +// setup.js +import * as test from 'node:test'; +import { RuleTester } from '@typescript-eslint/rule-tester'; + +RuleTester.afterAll = test.afterAll; +RuleTester.describe = test.describe; +RuleTester.it = test.it; +RuleTester.itOnly = test.it.only; +``` + +Tests can then be [run from the command line](https://nodejs.org/api/test.html#running-tests-from-the-command-line) like so: + +```sh +node --import setup.js --test +``` + ## Options ### `RuleTester` constructor options From 7ce6acd3bf4532855512e3aa03a15b603f56a84a Mon Sep 17 00:00:00 2001 From: Mark de Dios <99303358+peanutenthusiast@users.noreply.github.com> Date: Sat, 11 May 2024 13:53:43 -0700 Subject: [PATCH 13/16] docs: fix broken anchor links (#9077) remove unclosed parens in linkToConfigs function --- .../generated-rule-docs/insertions/insertNewRuleReferences.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/plugins/generated-rule-docs/insertions/insertNewRuleReferences.ts b/packages/website/plugins/generated-rule-docs/insertions/insertNewRuleReferences.ts index d7bf46c0833c..41924617a22b 100644 --- a/packages/website/plugins/generated-rule-docs/insertions/insertNewRuleReferences.ts +++ b/packages/website/plugins/generated-rule-docs/insertions/insertNewRuleReferences.ts @@ -172,7 +172,7 @@ function linkToConfigs(configs: string[]): mdast.Node[] { } as mdast.InlineCode, ], type: 'link', - url: `/users/configs#${config})`, + url: `/users/configs#${config}`, }), ); From 8acb8d404472cee460a43cd08d158626263039ae Mon Sep 17 00:00:00 2001 From: Kirk Waiblinger Date: Mon, 13 May 2024 02:12:05 -0600 Subject: [PATCH 14/16] fix(eslint-plugin): [explicit-function-return-types] fix false positive on default parameters (#9045) [explicit-function-return-types] default parameters where a type annotation is present should count as typed function expressions fix https://github.com/typescript-eslint/typescript-eslint/issues/8950 Co-authored-by: auvred <61150013+auvred@users.noreply.github.com> --- .../src/util/explicitReturnTypeUtils.ts | 10 +++ .../explicit-function-return-type.test.ts | 74 +++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts b/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts index 2604e6185cc0..f65273a502ef 100644 --- a/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts +++ b/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts @@ -87,12 +87,22 @@ function isTypedParent( return ( isTypeAssertion(parent) || isVariableDeclaratorWithTypeAnnotation(parent) || + isDefaultFunctionParameterWithTypeAnnotation(parent) || isPropertyDefinitionWithTypeAnnotation(parent) || isFunctionArgument(parent, callee) || isTypedJSX(parent) ); } +function isDefaultFunctionParameterWithTypeAnnotation( + node: TSESTree.Node, +): boolean { + return ( + node.type === AST_NODE_TYPES.AssignmentPattern && + node.left.typeAnnotation != null + ); +} + /** * Checks if a node belongs to: * ``` diff --git a/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts b/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts index 7556cee3ce77..0e8c5182b7d3 100644 --- a/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts +++ b/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts @@ -770,7 +770,32 @@ class Bar { } `, }, + { + code: ` +type CallBack = () => void; + +function f(gotcha: CallBack = () => {}): void {} + `, + options: [{ allowTypedFunctionExpressions: true }], + }, + { + code: ` +type CallBack = () => void; + +const f = (gotcha: CallBack = () => {}): void => {}; + `, + options: [{ allowTypedFunctionExpressions: true }], + }, + { + code: ` +type ObjectWithCallback = { callback: () => void }; + +const f = (gotcha: ObjectWithCallback = { callback: () => {} }): void => {}; + `, + options: [{ allowTypedFunctionExpressions: true }], + }, ], + invalid: [ { code: ` @@ -1940,5 +1965,54 @@ let foo = (() => () => {})()(); }, ], }, + { + code: ` +type CallBack = () => void; + +function f(gotcha: CallBack = () => {}): void {} + `, + options: [{ allowTypedFunctionExpressions: false }], + errors: [ + { + messageId: 'missingReturnType', + line: 4, + column: 34, + endLine: 4, + endColumn: 36, + }, + ], + }, + { + code: ` +type CallBack = () => void; + +const f = (gotcha: CallBack = () => {}): void => {}; + `, + options: [{ allowTypedFunctionExpressions: false }], + errors: [ + { + messageId: 'missingReturnType', + line: 4, + column: 34, + endLine: 4, + endColumn: 36, + }, + ], + }, + { + code: ` +type ObjectWithCallback = { callback: () => void }; + +const f = (gotcha: ObjectWithCallback = { callback: () => {} }): void => {}; + `, + options: [{ allowTypedFunctionExpressions: false }], + errors: [ + { + messageId: 'missingReturnType', + line: 4, + column: 43, + }, + ], + }, ], }); From f53fece3678fdba005814fab080b6aa1b905a189 Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Mon, 13 May 2024 18:42:41 +0300 Subject: [PATCH 15/16] chore: add knip (#8192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: add knip * chore: sync lockfile * chore: bump knip * ci: run knip in ci workflow * ci: run knip as part of lint job * refactor: replace `testRegex` with `testMatch` * refactor: use satisfies in knip config * chore: fix path to rule-tester fixtures * chore: add dummypkg as knip workspace * chore: get rid of json-schema * chore: fix knip issues in packages/website * chore: sync lockfile * chore: add missed merge stuff * chore: install @jest/types in the root workspace * chore: partially fix issues for website-eslint * chore: fix knip issues for packages/website-eslint * chore: add ncp resolution to the root package.json * chore: wip wip wip * chore: fix misspelling + handle few knip issues * chore: finally (?) * chore: expand ignoreDependencies regular expressions * chore: revert unrelated changes * chore: try to minimise docusaurus-related changes * chore: remove extra entry * chore: bump knip to 4.0.2 * wip * add types to jest config * yarn lint --fix * add knip to ci * !!! * Revert "!!!" This reverts commit 36fa481c0c98a84bb382478458b723d9968e6d8b. * revert yarn dedupe * sed -i 's| -p tsconfig.json||g' * update todo comment in eslint.config.js * Update knip.ts Co-authored-by: Josh Goldberg ✨ * oops --------- Co-authored-by: Josh Goldberg ✨ --- .github/workflows/ci.yml | 2 +- eslint.config.js | 3 +- jest.config.js | 4 + knip.ts | 128 +++++ package.json | 6 +- packages/ast-spec/package.json | 5 +- packages/eslint-plugin-internal/package.json | 3 +- packages/eslint-plugin/package.json | 13 +- packages/integration-tests/package.json | 3 +- packages/parser/package.json | 3 +- packages/repo-tools/package.json | 11 +- .../package.json | 5 +- packages/rule-tester/package.json | 6 +- packages/scope-manager/package.json | 1 + packages/type-utils/package.json | 3 +- packages/types/package.json | 3 +- packages/typescript-eslint/package.json | 3 +- packages/typescript-estree/package.json | 7 +- .../tests/test-utils/tserror-serializer.ts | 19 - packages/utils/package.json | 8 +- packages/visitor-keys/package.json | 3 +- packages/website-eslint/package.json | 9 +- packages/website/package.json | 15 +- .../website/src/components/hooks/useFocus.ts | 15 - packages/website/src/hooks/useMediaQuery.ts | 46 -- .../theme/MDXComponents/RuleAttributes.tsx | 2 +- yarn.lock | 529 +++++++++++++++--- 27 files changed, 642 insertions(+), 213 deletions(-) create mode 100644 knip.ts delete mode 100644 packages/typescript-estree/tests/test-utils/tserror-serializer.ts delete mode 100644 packages/website/src/components/hooks/useFocus.ts delete mode 100644 packages/website/src/hooks/useMediaQuery.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4334d05a9c6..aaa3b40510f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - lint-task: ['lint', 'typecheck'] + lint-task: ['lint', 'typecheck', 'knip'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/eslint.config.js b/eslint.config.js index 218cd0a70eb4..9e951e7a442a 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,7 +1,6 @@ // @ts-check -// TODO - https://github.com/eslint/eslint/pull/17909 -// either it gets back-ported (https://github.com/eslint/eslint/issues/17966) or we wait till v9 +// TODO - https://github.com/nrwl/nx/issues/22576 /** @type {import('@typescript-eslint/utils/ts-eslint').FlatConfig.ConfigPromise} */ const config = (async () => (await import('./eslint.config.mjs')).default)(); diff --git a/jest.config.js b/jest.config.js index 1a9107f8706f..295d7757ff18 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,9 @@ +'use strict'; + +// @ts-check const { getJestProjects } = require('@nx/jest'); +/** @type {import('@jest/types').Config.InitialOptions} */ module.exports = { projects: getJestProjects(), }; diff --git a/knip.ts b/knip.ts new file mode 100644 index 000000000000..d0d8c04d5b3d --- /dev/null +++ b/knip.ts @@ -0,0 +1,128 @@ +import type { KnipConfig } from 'knip'; + +export default { + rules: { + classMembers: 'off', + duplicates: 'off', + enumMembers: 'off', + exports: 'off', + nsExports: 'off', + nsTypes: 'off', + types: 'off', + unresolved: 'off', + }, + workspaces: { + '.': { + ignoreDependencies: [ + '@babel/code-frame', + '@babel/core', + '@babel/eslint-parser', + '@babel/parser', + '@babel/types', + '@nx/workspace', + 'cross-fetch', + 'glob', + 'husky', + 'jest-specific-snapshot', + 'make-dir', + 'ncp', + 'tmp', + + // imported in eslint.config.js + '@typescript-eslint/utils', + // imported in eslint.config.mjs + '@typescript-eslint/eslint-plugin-internal', + ], + entry: ['tools/release/changelog-renderer.js'], + ignoreBinaries: [ + // https://github.com/webpro/knip/issues/433 + 'stylelint', + ], + }, + 'packages/ast-spec': { + ignore: [ + 'src/**/fixtures/**', + 'tests/*.type-test.ts', + // @typescript-eslint/typescript-estree is not listed in dependencies to avoid circular dependency errors + // You can check a more detailed explanation in this file + 'tests/util/parsers/typescript-estree-import.ts', + ], + }, + 'packages/eslint-plugin': { + ignore: ['tests/fixtures/**'], + }, + 'packages/eslint-plugin-internal': { + ignore: ['tests/fixtures/**'], + }, + 'packages/integration-tests': { + ignore: ['fixtures/**'], + }, + 'packages/parser': { + ignore: ['tests/fixtures/**'], + }, + 'packages/scope-manager': { + ignore: ['tests/fixtures/**'], + }, + 'packages/type-utils': { + ignore: ['tests/fixtures/**'], + }, + 'packages/typescript-estree': { + entry: ['src/use-at-your-own-risk.ts'], + ignore: ['tests/fixtures/**'], + }, + 'packages/website': { + entry: [ + 'docusaurus.config.mts', + 'src/pages/**/*.tsx', + + // imported in MDX docs + 'src/components/**/*.tsx', + + // used by Docusaurus + 'src/theme/**/*.tsx', + 'src/theme/prism-include-languages.js', + ], + ignoreDependencies: [ + // used in MDX docs + 'raw-loader', + + // it's imported only as type (esquery types are forked and defined in packages/website/typings/esquery.d.ts) + 'esquery', + + '@babel/runtime', + '@docusaurus/mdx-loader', + '@docusaurus/types', + '@docusaurus/plugin-content-docs', + '@docusaurus/theme-search-algolia', + '@docusaurus/ExecutionEnvironment', + '@docusaurus/Link', + '@docusaurus/router', + '@docusaurus/useDocusaurusContext', + '@docusaurus/useBaseUrl', + '@docusaurus/BrowserOnly', + '@docusaurus/theme-classic', + '@generated/docusaurus.config', + '^@theme/.*', + '^@theme-original/.*', + ], + }, + 'packages/website-eslint': { + ignoreDependencies: [ + // virtual module + 'vt', + ], + entry: [ + 'src/index.js', + 'src/mock/assert.js', + 'src/mock/empty.js', + 'src/mock/eslint-rules.js', + 'src/mock/eslint.js', + 'src/mock/lru-cache.js', + 'src/mock/path.js', + 'src/mock/typescript.js', + 'src/mock/util.js', + ], + }, + 'tools/dummypkg': {}, + }, +} satisfies KnipConfig; diff --git a/package.json b/package.json index 15f47600feb0..7d56893b817f 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "@babel/types": "^7.24.0", "@eslint/eslintrc": "^2.1.4", "@eslint/js": "^8.57.0", + "@jest/types": "29.6.3", "@nx/eslint": "18.2.3", "@nx/jest": "18.2.3", "@nx/workspace": "18.2.3", @@ -75,7 +76,6 @@ "@types/is-glob": "^4.0.4", "@types/jest": "29.5.12", "@types/jest-specific-snapshot": "^0.5.9", - "@types/marked": "^5.0.2", "@types/natural-compare": "^1.4.3", "@types/ncp": "^2.0.8", "@types/node": "^20.12.5", @@ -104,9 +104,8 @@ "globals": "^15.0.0", "husky": "^8.0.3", "jest": "29.7.0", - "jest-diff": "^29.7.0", - "jest-snapshot": "^29.7.0", "jest-specific-snapshot": "^8.0.0", + "knip": "^5.9.4", "lint-staged": "^15.2.2", "make-dir": "^4.0.0", "markdownlint-cli": "^0.39.0", @@ -115,7 +114,6 @@ "nx": "18.2.3", "prettier": "3.2.5", "pretty-format": "^29.7.0", - "raw-loader": "^4.0.2", "rimraf": "^5.0.5", "tmp": "^0.2.3", "tsx": "*", diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 9adf56e91219..b33a0599570c 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -37,7 +37,7 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", "test": "jest", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "funding": { "type": "opencollective", @@ -47,12 +47,11 @@ "@babel/code-frame": "*", "@babel/core": "*", "@babel/eslint-parser": "*", - "@babel/parser": "*", + "@jest/types": "29.6.3", "@microsoft/api-extractor": "^7.43.0", "glob": "*", "jest": "29.7.0", "jest-diff": "^29.7.0", - "jest-snapshot": "^29.7.0", "jest-specific-snapshot": "^8.0.0", "make-dir": "*", "prettier": "^3.2.5", diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 9293536a65a8..f2afa1fb644f 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -11,7 +11,7 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@prettier/sync": "^0.5.1", @@ -22,6 +22,7 @@ "prettier": "^3.2.5" }, "devDependencies": { + "@jest/types": "29.6.3", "jest": "29.7.0", "rimraf": "*" } diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 7fc935491509..271a5096530e 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -53,12 +53,12 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "generate:breaking-changes": "yarn tsx tools/generate-breaking-changes.mts", + "generate:breaking-changes": "tsx tools/generate-breaking-changes.mts", "generate:configs": "npx nx run repo-tools:generate-configs", "lint": "npx nx lint", "test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules\" jest --coverage --logHeapUsage", "test-single": "cross-env NODE_OPTIONS=\"--experimental-vm-modules\" jest --no-coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@eslint-community/regexpp": "^4.10.0", @@ -66,26 +66,23 @@ "@typescript-eslint/type-utils": "7.8.0", "@typescript-eslint/utils": "7.8.0", "@typescript-eslint/visitor-keys": "7.8.0", - "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "devDependencies": { - "@types/debug": "*", - "@types/marked": "*", + "@jest/types": "29.6.3", + "@types/marked": "^5.0.2", "@types/mdast": "^4.0.3", "@types/natural-compare": "*", "@typescript-eslint/rule-schema-to-typescript-types": "7.8.0", "@typescript-eslint/rule-tester": "7.8.0", "ajv": "^6.12.6", - "chalk": "^5.3.0", "cross-env": "^7.0.3", "cross-fetch": "*", "eslint": "*", - "grapheme-splitter": "^1.0.4", + "espree": "^10.0.1", "jest": "29.7.0", "jest-specific-snapshot": "^8.0.0", "json-schema": "*", diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index a61f6924df21..b041c29a51b7 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -6,9 +6,10 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", "test": "jest --no-coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "devDependencies": { + "@jest/types": "29.6.3", "jest": "29.7.0", "ncp": "*", "tmp": "*", diff --git a/packages/parser/package.json b/packages/parser/package.json index d552dcc0e100..10540c522fb4 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -46,7 +46,7 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "peerDependencies": { "eslint": "^8.56.0" @@ -59,6 +59,7 @@ "debug": "^4.3.4" }, "devDependencies": { + "@jest/types": "29.6.3", "@types/glob": "*", "downlevel-dts": "*", "glob": "*", diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index 8e1ded99a681..350040e20bfc 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -2,8 +2,8 @@ "name": "@typescript-eslint/repo-tools", "version": "7.8.0", "private": true, + "//": "NOTE: intentionally no build step in this package", "scripts": { - "//": "NOTE: intentionally no build step in this package", "apply-canary-version": "npx tsx ./src/apply-canary-version.mts", "format": "npx prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "generate-configs": "npx tsx ./src/generate-configs.mts", @@ -13,16 +13,21 @@ "lint": "npx nx lint", "postinstall-script": "npx tsx ./src/postinstall.mts", "test": "npx jest --coverage", - "typecheck": "npx tsc -p tsconfig.json --noEmit" + "typecheck": "npx tsc --noEmit" }, "devDependencies": { + "@jest/types": "29.6.3", "@nx/devkit": "*", + "@typescript-eslint/eslint-plugin": "7.8.0", + "@typescript-eslint/scope-manager": "7.8.0", + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/typescript-estree": "7.8.0", + "@typescript-eslint/utils": "7.8.0", "cross-fetch": "*", "execa": "*", "prettier": "^3.2.5", "rimraf": "*", "semver": "7.6.0", - "tmp": "*", "typescript": "*" } } diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index 44821ab65c2d..55578284e29b 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -31,7 +31,7 @@ "lint": "npx nx lint", "postinstall-script": "tsx ./src/postinstall.ts", "test": "npx jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@typescript-eslint/type-utils": "7.8.0", @@ -39,6 +39,9 @@ "natural-compare": "^1.4.0", "prettier": "^3.2.5" }, + "devDependencies": { + "@jest/types": "29.6.3" + }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index e929e8081e81..29608f39735a 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -44,7 +44,7 @@ "pretest-eslint-base": "tsc -b tsconfig.build.json", "test-eslint-base": "mocha --require source-map-support/register ./tests/eslint-base/eslint-base.test.js", "test": "npx jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { @@ -59,9 +59,13 @@ "eslint": "^8.56.0" }, "devDependencies": { + "@jest/types": "29.6.3", "@types/lodash.merge": "4.6.9", "@typescript-eslint/parser": "7.8.0", "chai": "^4.4.1", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.0.1", + "esprima": "^4.0.1", "mocha": "^10.4.0", "sinon": "^16.1.3", "source-map-support": "^0.5.21", diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 1ea6d9c32c64..6a0db284c452 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -50,6 +50,7 @@ "@typescript-eslint/visitor-keys": "7.8.0" }, "devDependencies": { + "@jest/types": "29.6.3", "@types/glob": "*", "@typescript-eslint/typescript-estree": "7.8.0", "glob": "*", diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index d5f71f74fba8..42b4a98d256b 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -43,7 +43,7 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@typescript-eslint/typescript-estree": "7.8.0", @@ -52,6 +52,7 @@ "ts-api-utils": "^1.3.0" }, "devDependencies": { + "@jest/types": "29.6.3", "@typescript-eslint/parser": "7.8.0", "ajv": "^6.12.6", "downlevel-dts": "*", diff --git a/packages/types/package.json b/packages/types/package.json index d1e87a4ad6f3..b854b4ec3c00 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -45,7 +45,7 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "generate-lib": "npx nx run scope-manager:generate-lib", "lint": "npx nx lint", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "nx": { "targets": { @@ -67,6 +67,7 @@ } }, "devDependencies": { + "@jest/types": "29.6.3", "downlevel-dts": "*", "prettier": "^3.2.5", "rimraf": "*", diff --git a/packages/typescript-eslint/package.json b/packages/typescript-eslint/package.json index 4402f7e4820a..240f2742ae74 100644 --- a/packages/typescript-eslint/package.json +++ b/packages/typescript-eslint/package.json @@ -49,7 +49,7 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "nx lint", "test": "jest --coverage --passWithNoTests", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "peerDependencies": { "eslint": "^8.56.0" @@ -60,6 +60,7 @@ "@typescript-eslint/utils": "7.8.0" }, "devDependencies": { + "@jest/types": "29.6.3", "downlevel-dts": "*", "jest": "29.7.0", "prettier": "^3.2.5", diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 6c9ed74ba133..1105cfcc2ecb 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -51,7 +51,7 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", "test": "jest --coverage --runInBand --verbose", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@typescript-eslint/types": "7.8.0", @@ -64,12 +64,9 @@ "ts-api-utils": "^1.3.0" }, "devDependencies": { - "@babel/code-frame": "*", - "@babel/parser": "*", + "@jest/types": "29.6.3", "glob": "*", "jest": "29.7.0", - "jest-specific-snapshot": "^8.0.0", - "make-dir": "*", "prettier": "^3.2.5", "rimraf": "*", "tmp": "*", diff --git a/packages/typescript-estree/tests/test-utils/tserror-serializer.ts b/packages/typescript-estree/tests/test-utils/tserror-serializer.ts deleted file mode 100644 index ebd0996e98c0..000000000000 --- a/packages/typescript-estree/tests/test-utils/tserror-serializer.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Plugin } from 'pretty-format'; - -import { TSError } from '../../src/node-utils'; - -export const serializer: Plugin = { - test: (val: unknown): val is TSError => val instanceof TSError, - serialize(val: TSError, config, indentation, depth, refs, printer) { - const format = (value: unknown): string => - printer(value, config, indentation, depth + 1, refs); - return ( - `${val.name} {\n` + - `${config.indent}"column": ${format(val.column)},\n` + - `${config.indent}"index": ${format(val.index)},\n` + - `${config.indent}"lineNumber": ${format(val.lineNumber)},\n` + - `${config.indent}"message": ${format(val.message)},\n` + - `}` - ); - }, -}; diff --git a/packages/utils/package.json b/packages/utils/package.json index f9dde8dd21ef..e474455899bd 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -64,22 +64,18 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.15", - "@types/semver": "^7.5.8", "@typescript-eslint/scope-manager": "7.8.0", "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/typescript-estree": "7.8.0", - "semver": "^7.6.0" + "@typescript-eslint/typescript-estree": "7.8.0" }, "peerDependencies": { "eslint": "^8.56.0" }, "devDependencies": { - "@typescript-eslint/parser": "7.8.0", "downlevel-dts": "*", "jest": "29.7.0", "prettier": "^3.2.5", diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 30df303d2900..b9b47ad38bdb 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -44,13 +44,14 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@typescript-eslint/types": "7.8.0", "eslint-visitor-keys": "^3.4.3" }, "devDependencies": { + "@jest/types": "29.6.3", "@types/eslint-visitor-keys": "*", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index 449399978167..64149c4dc296 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -17,15 +17,11 @@ "node": "^18.18.0 || >=20.0.0" }, "scripts": { - "build": "yarn tsx ./build.ts", + "build": "tsx ./build.ts", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", "typecheck": "tsc --noEmit" }, - "dependencies": { - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/utils": "7.8.0" - }, "devDependencies": { "@eslint/js": "*", "@typescript-eslint/eslint-plugin": "7.8.0", @@ -37,9 +33,6 @@ "eslint": "*", "esquery": "*", "prettier": "^3.2.5", - "rollup": "^2.79.1", - "rollup-plugin-terser": "^7.0.2", - "semver": "^7.6.0", "tsx": "*" } } diff --git a/packages/website/package.json b/packages/website/package.json index 07d5f9f92e0e..74bd20a81312 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -23,13 +23,10 @@ "@docusaurus/preset-classic": "^3.2.1", "@docusaurus/remark-plugin-npm2yarn": "^3.2.1", "@docusaurus/theme-common": "^3.2.1", - "@mdx-js/react": "^3.0.1", - "@prettier/sync": "*", "@typescript-eslint/parser": "7.8.0", "@typescript-eslint/website-eslint": "7.8.0", "clsx": "^2.1.0", "eslint": "*", - "json-schema": "^0.4.0", "json5": "^2.2.3", "konamimojisplosion": "^0.5.2", "lz-string": "^1.5.0", @@ -46,16 +43,20 @@ }, "devDependencies": { "@docusaurus/module-type-aliases": "^3.2.1", + "@types/mdast": "^4.0.3", "@types/react": "*", - "@types/react-helmet": "^6.1.11", - "@types/react-router-dom": "^5.3.3", + "@types/unist": "^3.0.2", "@typescript-eslint/eslint-plugin": "7.8.0", "@typescript-eslint/rule-schema-to-typescript-types": "7.8.0", + "@typescript-eslint/scope-manager": "7.8.0", "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/typescript-estree": "7.8.0", + "@typescript-eslint/utils": "7.8.0", "copy-webpack-plugin": "^12.0.0", "cross-fetch": "*", - "globby": "^11.1.0", + "history": "^4.9.0", "make-dir": "*", + "mdast-util-mdx": "^3.0.0", "monaco-editor": "~0.47.0", "raw-loader": "^4.0.2", "rimraf": "*", @@ -64,6 +65,8 @@ "stylelint-config-standard": "^36.0.0", "stylelint-order": "^6.0.4", "tsx": "*", + "unified": "^11.0.4", + "vfile": "^6.0.1", "webpack": "^5.91.0" }, "browserslist": { diff --git a/packages/website/src/components/hooks/useFocus.ts b/packages/website/src/components/hooks/useFocus.ts deleted file mode 100644 index 3e94d308e956..000000000000 --- a/packages/website/src/components/hooks/useFocus.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type React from 'react'; -import { useCallback, useRef } from 'react'; - -function useFocus(): [ - React.RefObject, - () => void, -] { - const htmlElRef = useRef(null); - const setFocus = useCallback((): void => { - htmlElRef.current?.focus(); - }, []); - return [htmlElRef, setFocus]; -} - -export default useFocus; diff --git a/packages/website/src/hooks/useMediaQuery.ts b/packages/website/src/hooks/useMediaQuery.ts deleted file mode 100644 index 422570aee8ef..000000000000 --- a/packages/website/src/hooks/useMediaQuery.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Modified from https://github.com/antonioru/beautiful-react-hooks/blob/master/src/useMediaQuery.ts - -import { useEffect, useState } from 'react'; - -/** - * Accepts a media query string then uses the - * [window.matchMedia](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia) API to determine if it - * matches with the current document.
- * It also monitor the document changes to detect when it matches or stops matching the media query.
- * Returns the validity state of the given media query. - * - */ -const useMediaQuery = (mediaQuery: string): boolean => { - const [isVerified, setIsVerified] = useState( - !!window.matchMedia(mediaQuery).matches, - ); - - useEffect(() => { - const mediaQueryList = window.matchMedia(mediaQuery); - const documentChangeHandler = (): void => - setIsVerified(!!mediaQueryList.matches); - - try { - mediaQueryList.addEventListener('change', documentChangeHandler); - } catch { - // Safari isn't supporting mediaQueryList.addEventListener - // eslint-disable-next-line deprecation/deprecation - mediaQueryList.addListener(documentChangeHandler); - } - - documentChangeHandler(); - return (): void => { - try { - mediaQueryList.removeEventListener('change', documentChangeHandler); - } catch { - // Safari isn't supporting mediaQueryList.removeEventListener - // eslint-disable-next-line deprecation/deprecation - mediaQueryList.removeListener(documentChangeHandler); - } - }; - }, [mediaQuery]); - - return isVerified; -}; - -export { useMediaQuery }; diff --git a/packages/website/src/theme/MDXComponents/RuleAttributes.tsx b/packages/website/src/theme/MDXComponents/RuleAttributes.tsx index 7950da8b397b..3fe266657a7b 100644 --- a/packages/website/src/theme/MDXComponents/RuleAttributes.tsx +++ b/packages/website/src/theme/MDXComponents/RuleAttributes.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import Link from '@docusaurus/Link'; -import type { RuleMetaDataDocs } from '@site/../utils/dist/ts-eslint/Rule'; import { useRulesMeta } from '@site/src/hooks/useRulesMeta'; +import type { RuleMetaDataDocs } from '@typescript-eslint/utils/ts-eslint'; import React from 'react'; import { diff --git a/yarn.lock b/yarn.lock index 5fd1b3ac69cc..dade7016498e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -622,7 +622,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:*, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.1": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.1": version: 7.24.1 resolution: "@babel/parser@npm:7.24.1" bin: @@ -2993,6 +2993,33 @@ __metadata: languageName: node linkType: hard +"@ericcornelissen/bash-parser@npm:0.5.2": + version: 0.5.2 + resolution: "@ericcornelissen/bash-parser@npm:0.5.2" + dependencies: + array-last: ^1.1.1 + babylon: ^6.9.1 + compose-function: ^3.0.3 + deep-freeze: 0.0.1 + filter-iterator: 0.0.1 + filter-obj: ^1.1.0 + has-own-property: ^0.1.0 + identity-function: ^1.0.0 + is-iterable: ^1.1.0 + iterable-lookahead: ^1.0.0 + lodash.curry: ^4.1.1 + magic-string: ^0.16.0 + map-obj: ^2.0.0 + object-pairs: ^0.1.0 + object-values: ^1.0.0 + reverse-arguments: ^1.0.0 + shell-quote-word: ^1.0.1 + to-pascal-case: ^1.0.0 + unescape-js: ^1.0.5 + checksum: ed6feb775a45e529e36b8ab01cfe2ba39446d8403f30022d4c00f009a45ae47e9c2fd43d5607b7120366c29c42aaf4c5b0bc202066e71d543f3cde235240a87b + languageName: node + linkType: hard + "@es-joy/jsdoccomment@npm:~0.41.0": version: 0.41.0 resolution: "@es-joy/jsdoccomment@npm:0.41.0" @@ -3675,7 +3702,7 @@ __metadata: languageName: node linkType: hard -"@jest/types@npm:^29.6.3": +"@jest/types@npm:29.6.3, @jest/types@npm:^29.6.3": version: 29.6.3 resolution: "@jest/types@npm:29.6.3" dependencies: @@ -3789,7 +3816,7 @@ __metadata: languageName: node linkType: hard -"@mdx-js/react@npm:^3.0.0, @mdx-js/react@npm:^3.0.1": +"@mdx-js/react@npm:^3.0.0": version: 3.0.1 resolution: "@mdx-js/react@npm:3.0.1" dependencies: @@ -3887,6 +3914,16 @@ __metadata: languageName: node linkType: hard +"@nodelib/fs.scandir@npm:3.0.0": + version: 3.0.0 + resolution: "@nodelib/fs.scandir@npm:3.0.0" + dependencies: + "@nodelib/fs.stat": 3.0.0 + run-parallel: ^1.2.0 + checksum: f4e9d07b310f248503d3cd632310b25cd01d97a74701bc59e1458bad32c84f78615d9853820adba8af73d970868aab46de68e540ca7efd90dacd4ea34d05553d + languageName: node + linkType: hard + "@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": version: 2.0.5 resolution: "@nodelib/fs.stat@npm:2.0.5" @@ -3894,6 +3931,23 @@ __metadata: languageName: node linkType: hard +"@nodelib/fs.stat@npm:3.0.0": + version: 3.0.0 + resolution: "@nodelib/fs.stat@npm:3.0.0" + checksum: 93a93e19b64d0275b5120bed2cf85da4c5804014de1bdac6e9933b835b1cb9f88252dc990b148076bec034fc757bdd97d74cf5d99bc9f895e0f925aeabe7dbcf + languageName: node + linkType: hard + +"@nodelib/fs.walk@npm:2.0.0": + version: 2.0.0 + resolution: "@nodelib/fs.walk@npm:2.0.0" + dependencies: + "@nodelib/fs.scandir": 3.0.0 + fastq: ^1.15.0 + checksum: f900965bc3953a67cb74916ec0950cd5d58006a9218aef99928cc22dd77d117376aaf710e46c740d18638a99337a4e81cbf70c892a2124269bf177c459d89837 + languageName: node + linkType: hard + "@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": version: 1.2.8 resolution: "@nodelib/fs.walk@npm:1.2.8" @@ -4316,7 +4370,7 @@ __metadata: languageName: node linkType: hard -"@prettier/sync@npm:*, @prettier/sync@npm:^0.5.1": +"@prettier/sync@npm:^0.5.1": version: 0.5.1 resolution: "@prettier/sync@npm:0.5.1" dependencies: @@ -4548,6 +4602,19 @@ __metadata: languageName: node linkType: hard +"@snyk/github-codeowners@npm:1.1.0": + version: 1.1.0 + resolution: "@snyk/github-codeowners@npm:1.1.0" + dependencies: + commander: ^4.1.1 + ignore: ^5.1.8 + p-map: ^4.0.0 + bin: + github-codeowners: dist/cli.js + checksum: 133f867fa968f96229ebce724d8aedaa124218e20add96a3a7d39ea45e52007fee50cc90c39e406c9e662483d003da9326e00dc4d612afa5c2ca069d1cdab9d7 + languageName: node + linkType: hard + "@surma/rollup-plugin-off-main-thread@npm:^2.2.3": version: 2.2.3 resolution: "@surma/rollup-plugin-off-main-thread@npm:2.2.3" @@ -5012,7 +5079,7 @@ __metadata: languageName: node linkType: hard -"@types/debug@npm:*, @types/debug@npm:^4.0.0, @types/debug@npm:^4.1.12": +"@types/debug@npm:^4.0.0, @types/debug@npm:^4.1.12": version: 4.1.12 resolution: "@types/debug@npm:4.1.12" dependencies: @@ -5190,7 +5257,7 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.15, @types/json-schema@npm:^7.0.4, @types/json-schema@npm:^7.0.5, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": +"@types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.4, @types/json-schema@npm:^7.0.5, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: 97ed0cb44d4070aecea772b7b2e2ed971e10c81ec87dd4ecc160322ffa55ff330dace1793489540e3e318d90942064bb697cc0f8989391797792d919737b3b98 @@ -5220,7 +5287,7 @@ __metadata: languageName: node linkType: hard -"@types/marked@npm:*, @types/marked@npm:^5.0.2": +"@types/marked@npm:^5.0.2": version: 5.0.2 resolution: "@types/marked@npm:5.0.2" checksum: 2875618970bd5aaba472e313c799bbe241fe9e31d1e79782841a0cc04e08ab2a98653166f1fb99bf8bcf140d3878c3ab960a12aa8f0fb949d8277e8a01d3411b @@ -5340,15 +5407,6 @@ __metadata: languageName: node linkType: hard -"@types/react-helmet@npm:^6.1.11": - version: 6.1.11 - resolution: "@types/react-helmet@npm:6.1.11" - dependencies: - "@types/react": "*" - checksum: e329d8ad82c365fec7dd7d91c8b6d167faac30cef0d9f1e27d7e895172a0ebfa65829fb4acabbe79283b01cbbe5840a845caeb50148ceef6f3fad42b3c2c4bdc - languageName: node - linkType: hard - "@types/react-router-config@npm:*, @types/react-router-config@npm:^5.0.7": version: 5.0.11 resolution: "@types/react-router-config@npm:5.0.11" @@ -5360,7 +5418,7 @@ __metadata: languageName: node linkType: hard -"@types/react-router-dom@npm:*, @types/react-router-dom@npm:^5.3.3": +"@types/react-router-dom@npm:*": version: 5.3.3 resolution: "@types/react-router-dom@npm:5.3.3" dependencies: @@ -5472,7 +5530,7 @@ __metadata: languageName: node linkType: hard -"@types/unist@npm:*, @types/unist@npm:^3.0.0": +"@types/unist@npm:*, @types/unist@npm:^3.0.0, @types/unist@npm:^3.0.2": version: 3.0.2 resolution: "@types/unist@npm:3.0.2" checksum: 3d04d0be69316e5f14599a0d993a208606c12818cf631fd399243d1dc7a9bd8a3917d6066baa6abc290814afbd744621484756803c80cba892c39cd4b4a85616 @@ -5518,12 +5576,11 @@ __metadata: "@babel/code-frame": "*" "@babel/core": "*" "@babel/eslint-parser": "*" - "@babel/parser": "*" + "@jest/types": 29.6.3 "@microsoft/api-extractor": ^7.43.0 glob: "*" jest: 29.7.0 jest-diff: ^29.7.0 - jest-snapshot: ^29.7.0 jest-specific-snapshot: ^8.0.0 make-dir: "*" prettier: ^3.2.5 @@ -5537,6 +5594,7 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/eslint-plugin-internal@workspace:packages/eslint-plugin-internal" dependencies: + "@jest/types": 29.6.3 "@prettier/sync": ^0.5.1 "@typescript-eslint/rule-tester": 7.8.0 "@typescript-eslint/scope-manager": 7.8.0 @@ -5553,8 +5611,8 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin" dependencies: "@eslint-community/regexpp": ^4.10.0 - "@types/debug": "*" - "@types/marked": "*" + "@jest/types": 29.6.3 + "@types/marked": ^5.0.2 "@types/mdast": ^4.0.3 "@types/natural-compare": "*" "@typescript-eslint/rule-schema-to-typescript-types": 7.8.0 @@ -5564,12 +5622,10 @@ __metadata: "@typescript-eslint/utils": 7.8.0 "@typescript-eslint/visitor-keys": 7.8.0 ajv: ^6.12.6 - chalk: ^5.3.0 cross-env: ^7.0.3 cross-fetch: "*" - debug: ^4.3.4 eslint: "*" - grapheme-splitter: ^1.0.4 + espree: ^10.0.1 graphemer: ^1.4.0 ignore: ^5.3.1 jest: 29.7.0 @@ -5583,7 +5639,6 @@ __metadata: natural-compare: ^1.4.0 prettier: ^3.2.5 rimraf: "*" - semver: ^7.6.0 title-case: ^3.0.3 ts-api-utils: ^1.3.0 tsx: "*" @@ -5602,6 +5657,7 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/integration-tests@workspace:packages/integration-tests" dependencies: + "@jest/types": 29.6.3 jest: 29.7.0 ncp: "*" tmp: "*" @@ -5613,6 +5669,7 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: + "@jest/types": 29.6.3 "@types/glob": "*" "@typescript-eslint/scope-manager": 7.8.0 "@typescript-eslint/types": 7.8.0 @@ -5637,13 +5694,18 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/repo-tools@workspace:packages/repo-tools" dependencies: + "@jest/types": 29.6.3 "@nx/devkit": "*" + "@typescript-eslint/eslint-plugin": 7.8.0 + "@typescript-eslint/scope-manager": 7.8.0 + "@typescript-eslint/types": 7.8.0 + "@typescript-eslint/typescript-estree": 7.8.0 + "@typescript-eslint/utils": 7.8.0 cross-fetch: "*" execa: "*" prettier: ^3.2.5 rimraf: "*" semver: 7.6.0 - tmp: "*" typescript: "*" languageName: unknown linkType: soft @@ -5652,6 +5714,7 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types" dependencies: + "@jest/types": 29.6.3 "@typescript-eslint/type-utils": 7.8.0 "@typescript-eslint/utils": 7.8.0 natural-compare: ^1.4.0 @@ -5663,12 +5726,16 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/rule-tester@workspace:packages/rule-tester" dependencies: + "@jest/types": 29.6.3 "@types/lodash.merge": 4.6.9 "@typescript-eslint/parser": 7.8.0 "@typescript-eslint/typescript-estree": 7.8.0 "@typescript-eslint/utils": 7.8.0 ajv: ^6.12.6 chai: ^4.4.1 + eslint-visitor-keys: ^4.0.0 + espree: ^10.0.1 + esprima: ^4.0.1 lodash.merge: 4.6.2 mocha: ^10.4.0 semver: ^7.6.0 @@ -5685,6 +5752,7 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/scope-manager@workspace:packages/scope-manager" dependencies: + "@jest/types": 29.6.3 "@types/glob": "*" "@typescript-eslint/types": 7.8.0 "@typescript-eslint/typescript-estree": 7.8.0 @@ -5721,6 +5789,7 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/type-utils@workspace:packages/type-utils" dependencies: + "@jest/types": 29.6.3 "@typescript-eslint/parser": 7.8.0 "@typescript-eslint/typescript-estree": 7.8.0 "@typescript-eslint/utils": 7.8.0 @@ -5744,6 +5813,7 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: + "@jest/types": 29.6.3 downlevel-dts: "*" prettier: ^3.2.5 rimraf: "*" @@ -5779,6 +5849,7 @@ __metadata: "@babel/types": ^7.24.0 "@eslint/eslintrc": ^2.1.4 "@eslint/js": ^8.57.0 + "@jest/types": 29.6.3 "@nx/eslint": 18.2.3 "@nx/jest": 18.2.3 "@nx/workspace": 18.2.3 @@ -5790,7 +5861,6 @@ __metadata: "@types/is-glob": ^4.0.4 "@types/jest": 29.5.12 "@types/jest-specific-snapshot": ^0.5.9 - "@types/marked": ^5.0.2 "@types/natural-compare": ^1.4.3 "@types/ncp": ^2.0.8 "@types/node": ^20.12.5 @@ -5819,9 +5889,8 @@ __metadata: globals: ^15.0.0 husky: ^8.0.3 jest: 29.7.0 - jest-diff: ^29.7.0 - jest-snapshot: ^29.7.0 jest-specific-snapshot: ^8.0.0 + knip: ^5.9.4 lint-staged: ^15.2.2 make-dir: ^4.0.0 markdownlint-cli: ^0.39.0 @@ -5830,7 +5899,6 @@ __metadata: nx: 18.2.3 prettier: 3.2.5 pretty-format: ^29.7.0 - raw-loader: ^4.0.2 rimraf: ^5.0.5 tmp: ^0.2.3 tsx: "*" @@ -5844,8 +5912,7 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/typescript-estree@workspace:packages/typescript-estree" dependencies: - "@babel/code-frame": "*" - "@babel/parser": "*" + "@jest/types": 29.6.3 "@typescript-eslint/types": 7.8.0 "@typescript-eslint/visitor-keys": 7.8.0 debug: ^4.3.4 @@ -5853,8 +5920,6 @@ __metadata: globby: ^11.1.0 is-glob: ^4.0.3 jest: 29.7.0 - jest-specific-snapshot: ^8.0.0 - make-dir: "*" minimatch: ^9.0.4 prettier: ^3.2.5 rimraf: "*" @@ -5910,9 +5975,6 @@ __metadata: resolution: "@typescript-eslint/utils@workspace:packages/utils" dependencies: "@eslint-community/eslint-utils": ^4.4.0 - "@types/json-schema": ^7.0.15 - "@types/semver": ^7.5.8 - "@typescript-eslint/parser": 7.8.0 "@typescript-eslint/scope-manager": 7.8.0 "@typescript-eslint/types": 7.8.0 "@typescript-eslint/typescript-estree": 7.8.0 @@ -5920,7 +5982,6 @@ __metadata: jest: 29.7.0 prettier: ^3.2.5 rimraf: "*" - semver: ^7.6.0 typescript: "*" peerDependencies: eslint: ^8.56.0 @@ -5966,6 +6027,7 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/visitor-keys@workspace:packages/visitor-keys" dependencies: + "@jest/types": 29.6.3 "@types/eslint-visitor-keys": "*" "@typescript-eslint/types": 7.8.0 downlevel-dts: "*" @@ -6005,17 +6067,12 @@ __metadata: "@typescript-eslint/eslint-plugin": 7.8.0 "@typescript-eslint/parser": 7.8.0 "@typescript-eslint/scope-manager": 7.8.0 - "@typescript-eslint/types": 7.8.0 "@typescript-eslint/typescript-estree": 7.8.0 - "@typescript-eslint/utils": 7.8.0 "@typescript-eslint/visitor-keys": 7.8.0 esbuild: ~0.20.2 eslint: "*" esquery: "*" prettier: ^3.2.5 - rollup: ^2.79.1 - rollup-plugin-terser: ^7.0.2 - semver: ^7.6.0 tsx: "*" languageName: unknown linkType: soft @@ -6262,7 +6319,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.4.1, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": +"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.11.3, acorn@npm:^8.4.1, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": version: 8.11.3 resolution: "acorn@npm:8.11.3" bin: @@ -6561,6 +6618,13 @@ __metadata: languageName: node linkType: hard +"arity-n@npm:^1.0.4": + version: 1.0.4 + resolution: "arity-n@npm:1.0.4" + checksum: 3d76e16907f7b8a9452690c1efc301d0fbecea457365797eccfbade9b8d1653175b2c38343201bf26fdcbf0bcbb31eab6d912e7c008c6d19042301dc0be80a73 + languageName: node + linkType: hard + "array-buffer-byte-length@npm:^1.0.1": version: 1.0.1 resolution: "array-buffer-byte-length@npm:1.0.1" @@ -6598,6 +6662,15 @@ __metadata: languageName: node linkType: hard +"array-last@npm:^1.1.1": + version: 1.3.0 + resolution: "array-last@npm:1.3.0" + dependencies: + is-number: ^4.0.0 + checksum: 7631c7df9b44ea26f49e2f6eeb7a7d4d95b3798586b917e1efae4a321b6362e449e00b011e88eb0260959fbfc940fbdfce1d2a35765ea080de6d71e3fc3cf1dd + languageName: node + linkType: hard + "array-timsort@npm:^1.0.3": version: 1.0.3 resolution: "array-timsort@npm:1.0.3" @@ -6984,6 +7057,15 @@ __metadata: languageName: node linkType: hard +"babylon@npm:^6.9.1": + version: 6.18.0 + resolution: "babylon@npm:6.18.0" + bin: + babylon: ./bin/babylon.js + checksum: 0777ae0c735ce1cbfc856d627589ed9aae212b84fb0c03c368b55e6c5d3507841780052808d0ad46e18a2ba516e93d55eeed8cd967f3b2938822dfeccfb2a16d + languageName: node + linkType: hard + "bail@npm:^2.0.0": version: 2.0.2 resolution: "bail@npm:2.0.2" @@ -7807,6 +7889,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^4.1.1": + version: 4.1.1 + resolution: "commander@npm:4.1.1" + checksum: d7b9913ff92cae20cb577a4ac6fcc121bd6223319e54a40f51a14740a681ad5c574fd29a57da478a5f234a6fa6c52cbf0b7c641353e03c648b1ae85ba670b977 + languageName: node + linkType: hard + "commander@npm:^5.1.0": version: 5.1.0 resolution: "commander@npm:5.1.0" @@ -7862,6 +7951,15 @@ __metadata: languageName: node linkType: hard +"compose-function@npm:^3.0.3": + version: 3.0.3 + resolution: "compose-function@npm:3.0.3" + dependencies: + arity-n: ^1.0.4 + checksum: 9f17d431e3ee4797c844f2870e13494079882ac3dbc54c143b7d99967b371908e0ce7ceb71c6aed61e2ecddbcd7bb437d91428a3d0e6569aee17a87fcbc7918f + languageName: node + linkType: hard + "compressible@npm:~2.0.16": version: 2.0.18 resolution: "compressible@npm:2.0.18" @@ -8699,6 +8797,13 @@ __metadata: languageName: node linkType: hard +"deep-freeze@npm:0.0.1": + version: 0.0.1 + resolution: "deep-freeze@npm:0.0.1" + checksum: 1e43c98e44c7849382d9f896e679d48a1b5bf40993f7cc858e3730ef4e2ba387b9b7b7fe722cac34febe7f6a564cd242c27bbc319e8df793c2a287f21e5ba038 + languageName: node + linkType: hard + "deep-is@npm:^0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" @@ -9090,6 +9195,19 @@ __metadata: languageName: node linkType: hard +"easy-table@npm:1.2.0": + version: 1.2.0 + resolution: "easy-table@npm:1.2.0" + dependencies: + ansi-regex: ^5.0.1 + wcwidth: ^1.0.1 + dependenciesMeta: + wcwidth: + optional: true + checksum: 66961b19751a68d2d30ce9b74ef750c374cc3112bbcac3d1ed5a939e43c035ecf6b1954098df2d5b05f1e853ab2b67de893794390dcbf0abe1f157fddeb52174 + languageName: node + linkType: hard + "ee-first@npm:1.1.1": version: 1.1.1 resolution: "ee-first@npm:1.1.1" @@ -9900,6 +10018,17 @@ __metadata: languageName: node linkType: hard +"espree@npm:^10.0.1": + version: 10.0.1 + resolution: "espree@npm:10.0.1" + dependencies: + acorn: ^8.11.3 + acorn-jsx: ^5.3.2 + eslint-visitor-keys: ^4.0.0 + checksum: 62c9242a84c6741cebd35ede6574131d0419be7e5559566403e384087d99c4ddb2ced44e32acd44a4c3d8a8a84997cf8d78810c4e46b3fe25a804f1a92dc6b9d + languageName: node + linkType: hard + "espree@npm:^9.6.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" @@ -10240,7 +10369,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2": +"fast-glob@npm:3.3.2, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -10283,6 +10412,15 @@ __metadata: languageName: node linkType: hard +"fastq@npm:^1.15.0": + version: 1.17.1 + resolution: "fastq@npm:1.17.1" + dependencies: + reusify: ^1.0.4 + checksum: a8c5b26788d5a1763f88bae56a8ddeee579f935a831c5fe7a8268cea5b0a91fbfe705f612209e02d639b881d7b48e461a50da4a10cfaa40da5ca7cc9da098d88 + languageName: node + linkType: hard + "fastq@npm:^1.6.0": version: 1.15.0 resolution: "fastq@npm:1.15.0" @@ -10347,6 +10485,15 @@ __metadata: languageName: node linkType: hard +"file-entry-cache@npm:8.0.0, file-entry-cache@npm:^8.0.0": + version: 8.0.0 + resolution: "file-entry-cache@npm:8.0.0" + dependencies: + flat-cache: ^4.0.0 + checksum: f67802d3334809048c69b3d458f672e1b6d26daefda701761c81f203b80149c35dea04d78ea4238969dd617678e530876722a0634c43031a0957f10cc3ed190f + languageName: node + linkType: hard + "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -10356,15 +10503,6 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^8.0.0": - version: 8.0.0 - resolution: "file-entry-cache@npm:8.0.0" - dependencies: - flat-cache: ^4.0.0 - checksum: f67802d3334809048c69b3d458f672e1b6d26daefda701761c81f203b80149c35dea04d78ea4238969dd617678e530876722a0634c43031a0957f10cc3ed190f - languageName: node - linkType: hard - "file-loader@npm:^6.2.0": version: 6.2.0 resolution: "file-loader@npm:6.2.0" @@ -10402,6 +10540,20 @@ __metadata: languageName: node linkType: hard +"filter-iterator@npm:0.0.1": + version: 0.0.1 + resolution: "filter-iterator@npm:0.0.1" + checksum: 1dd34e0728183b3cc69d45c57ec58cbdd21c5160d53e70592e2db049ed4da81ba551b7bfaccb11731011ce5b07ee09961b09fa4573fe906145ce63d9a1813db0 + languageName: node + linkType: hard + +"filter-obj@npm:^1.1.0": + version: 1.1.0 + resolution: "filter-obj@npm:1.1.0" + checksum: cf2104a7c45ff48e7f505b78a3991c8f7f30f28bd8106ef582721f321f1c6277f7751aacd5d83026cb079d9d5091082f588d14a72e7c5d720ece79118fa61e10 + languageName: node + linkType: hard + "finalhandler@npm:1.2.0": version: 1.2.0 resolution: "finalhandler@npm:1.2.0" @@ -11108,13 +11260,6 @@ __metadata: languageName: node linkType: hard -"grapheme-splitter@npm:^1.0.4": - version: 1.0.4 - resolution: "grapheme-splitter@npm:1.0.4" - checksum: 0c22ec54dee1b05cd480f78cf14f732cb5b108edc073572c4ec205df4cd63f30f8db8025afc5debc8835a8ddeacf648a1c7992fe3dcd6ad38f9a476d84906620 - languageName: node - linkType: hard - "graphemer@npm:^1.4.0": version: 1.4.0 resolution: "graphemer@npm:1.4.0" @@ -11185,6 +11330,13 @@ __metadata: languageName: node linkType: hard +"has-own-property@npm:^0.1.0": + version: 0.1.0 + resolution: "has-own-property@npm:0.1.0" + checksum: 4754f42e8a54860ea1a397c231843937ba890f3aa556698c9a2160df5f9b1a02ddb321ef0528294aec3aaa3139d17744da048027aa7129a631cb6554b6faed6f + languageName: node + linkType: hard + "has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.1, has-property-descriptors@npm:^1.0.2": version: 1.0.2 resolution: "has-property-descriptors@npm:1.0.2" @@ -11716,6 +11868,13 @@ __metadata: languageName: node linkType: hard +"identity-function@npm:^1.0.0": + version: 1.0.0 + resolution: "identity-function@npm:1.0.0" + checksum: 0ec311050c69679334b12479f53226f67ca41bc3ba7283ede3dacfb80802ec07643868d16b274ab823ceb2e81291697f01b07e32c7796f92255bd81452b7ea15 + languageName: node + linkType: hard + "identity-obj-proxy@npm:3.0.0": version: 3.0.0 resolution: "identity-obj-proxy@npm:3.0.0" @@ -11732,7 +11891,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.0.4, ignore@npm:^5.0.5, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1, ignore@npm:~5.3.0": +"ignore@npm:^5.0.4, ignore@npm:^5.0.5, ignore@npm:^5.1.8, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1, ignore@npm:~5.3.0": version: 5.3.1 resolution: "ignore@npm:5.3.1" checksum: 71d7bb4c1dbe020f915fd881108cbe85a0db3d636a0ea3ba911393c53946711d13a9b1143c7e70db06d571a5822c0a324a6bcde5c9904e7ca5047f01f1bf8cd3 @@ -12157,6 +12316,13 @@ __metadata: languageName: node linkType: hard +"is-iterable@npm:^1.1.0": + version: 1.1.1 + resolution: "is-iterable@npm:1.1.1" + checksum: d059aaf00899cf351cdf4d71ea6b4e8912107c47b31b554d28205199b306420f3b5d30a419efa6b807f466f675fd945822f1651fd6d1fd45469a578573da671e + languageName: node + linkType: hard + "is-lambda@npm:^1.0.1": version: 1.0.1 resolution: "is-lambda@npm:1.0.1" @@ -12201,6 +12367,13 @@ __metadata: languageName: node linkType: hard +"is-number@npm:^4.0.0": + version: 4.0.0 + resolution: "is-number@npm:4.0.0" + checksum: e71962a5ae97400211e6be5946eff2b81d3fa85154dad498bfe2704999e63ac6b3f8591fdb7971a121122cc6e25915c2cfe882ff7b77e243d51b92ca6961267e + languageName: node + linkType: hard + "is-number@npm:^7.0.0": version: 7.0.0 resolution: "is-number@npm:7.0.0" @@ -12519,6 +12692,13 @@ __metadata: languageName: node linkType: hard +"iterable-lookahead@npm:^1.0.0": + version: 1.0.0 + resolution: "iterable-lookahead@npm:1.0.0" + checksum: 9d849bfbfafcaf83c6eec2835192088b1f7d1aadf9f33ec4e1d117664af2d47acb742e130179c35a6eec01d0e3ec2750ea8347ba6796e47e329b015455076e67 + languageName: node + linkType: hard + "iterator.prototype@npm:^1.1.2": version: 1.1.2 resolution: "iterator.prototype@npm:1.1.2" @@ -13031,7 +13211,7 @@ __metadata: languageName: node linkType: hard -"jiti@npm:^1.20.0": +"jiti@npm:1.21.0, jiti@npm:^1.20.0": version: 1.21.0 resolution: "jiti@npm:1.21.0" bin: @@ -13274,6 +13454,38 @@ __metadata: languageName: node linkType: hard +"knip@npm:^5.9.4": + version: 5.10.0 + resolution: "knip@npm:5.10.0" + dependencies: + "@ericcornelissen/bash-parser": 0.5.2 + "@nodelib/fs.walk": 2.0.0 + "@snyk/github-codeowners": 1.1.0 + easy-table: 1.2.0 + fast-glob: 3.3.2 + file-entry-cache: 8.0.0 + jiti: 1.21.0 + js-yaml: 4.1.0 + minimist: 1.2.8 + picocolors: 1.0.0 + picomatch: ^4.0.1 + pretty-ms: 9.0.0 + resolve: 1.22.8 + smol-toml: 1.1.4 + strip-json-comments: 5.0.1 + summary: 2.1.0 + zod: ^3.22.4 + zod-validation-error: ^3.0.3 + peerDependencies: + "@types/node": ">=18" + typescript: ">=5.0.4" + bin: + knip: bin/knip.js + knip-bun: bin/knip-bun.js + checksum: 632fcbbf27dbe21e6b9e2cc88c223cbc014dca00824eb995c02e4da313fb4215a43eac48a4da1aeaeeacf5415dc5522620e1f74da0cbf50a037bb48c0b19337c + languageName: node + linkType: hard + "known-css-properties@npm:^0.30.0": version: 0.30.0 resolution: "known-css-properties@npm:0.30.0" @@ -13490,6 +13702,13 @@ __metadata: languageName: node linkType: hard +"lodash.curry@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.curry@npm:4.1.1" + checksum: 9192b70fe7df4d1ff780c0260bee271afa9168c93fe4fa24bc861900240531b59781b5fdaadf4644fea8f4fbcd96f0700539ab294b579ffc1022c6c15dcc462a + languageName: node + linkType: hard + "lodash.debounce@npm:^4.0.8": version: 4.0.8 resolution: "lodash.debounce@npm:4.0.8" @@ -13660,6 +13879,15 @@ __metadata: languageName: node linkType: hard +"magic-string@npm:^0.16.0": + version: 0.16.0 + resolution: "magic-string@npm:0.16.0" + dependencies: + vlq: ^0.2.1 + checksum: f97e225062b600212e95fc8ed1948410bee3cb5248e03ed14fc45f12bb61a43960fdc0525f4aaaf62d6e79165526c9f8274ec225a92d421980cfcfcb8063be98 + languageName: node + linkType: hard + "magic-string@npm:^0.25.0, magic-string@npm:^0.25.7": version: 0.25.9 resolution: "magic-string@npm:0.25.9" @@ -13724,6 +13952,13 @@ __metadata: languageName: node linkType: hard +"map-obj@npm:^2.0.0": + version: 2.0.0 + resolution: "map-obj@npm:2.0.0" + checksum: 77d2b7b03398a71c84bd7df8ab7be2139e5459fc1e18dbb5f15055fe7284bec0fc37fe410185b5f8ca2e3c3e01fd0fd1f946c579607878adb26cad1cd75314aa + languageName: node + linkType: hard + "markdown-extensions@npm:^2.0.0": version: 2.0.0 resolution: "markdown-extensions@npm:2.0.0" @@ -14813,7 +15048,7 @@ __metadata: languageName: node linkType: hard -"minimist@npm:^1.2.0, minimist@npm:^1.2.6, minimist@npm:^1.2.8": +"minimist@npm:1.2.8, minimist@npm:^1.2.0, minimist@npm:^1.2.6, minimist@npm:^1.2.8": version: 1.2.8 resolution: "minimist@npm:1.2.8" checksum: 75a6d645fb122dad29c06a7597bddea977258957ed88d7a6df59b5cd3fe4a527e253e9bbf2e783e4b73657f9098b96a5fe96ab8a113655d4109108577ecf85b0 @@ -15389,6 +15624,20 @@ __metadata: languageName: node linkType: hard +"object-pairs@npm:^0.1.0": + version: 0.1.0 + resolution: "object-pairs@npm:0.1.0" + checksum: 8bde82dda701c84a27ba5bcf5e014283c6defbdab6df189af0b6582541711ed86ba2f0cce0a300a2220ba27b54ee11128c508982a191fa04f81770a7695b23d9 + languageName: node + linkType: hard + +"object-values@npm:^1.0.0": + version: 1.0.0 + resolution: "object-values@npm:1.0.0" + checksum: b86e7ef56349de1444e45b00f4aac7dcb76f2973f3e2cd5836cf86815b1ea4b2b3827bb2320cd5d1a50c78dd3068ce23cbcb5a1f024abe12296af8cf50d17a22 + languageName: node + linkType: hard + "object.assign@npm:^4.1.0, object.assign@npm:^4.1.4, object.assign@npm:^4.1.5": version: 4.1.5 resolution: "object.assign@npm:4.1.5" @@ -15743,6 +15992,13 @@ __metadata: languageName: node linkType: hard +"parse-ms@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-ms@npm:4.0.0" + checksum: 673c801d9f957ff79962d71ed5a24850163f4181a90dd30c4e3666b3a804f53b77f1f0556792e8b2adbb5d58757907d1aa51d7d7dc75997c2a56d72937cbc8b7 + languageName: node + linkType: hard + "parse-numeric-range@npm:^1.3.0": version: 1.3.0 resolution: "parse-numeric-range@npm:1.3.0" @@ -15907,7 +16163,7 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0": +"picocolors@npm:1.0.0, picocolors@npm:^1.0.0": version: 1.0.0 resolution: "picocolors@npm:1.0.0" checksum: a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 @@ -15921,6 +16177,13 @@ __metadata: languageName: node linkType: hard +"picomatch@npm:^4.0.1": + version: 4.0.2 + resolution: "picomatch@npm:4.0.2" + checksum: a7a5188c954f82c6585720e9143297ccd0e35ad8072231608086ca950bee672d51b0ef676254af0788205e59bd4e4deb4e7708769226bed725bf13370a7d1464 + languageName: node + linkType: hard + "pidtree@npm:0.6.0": version: 0.6.0 resolution: "pidtree@npm:0.6.0" @@ -16513,6 +16776,15 @@ __metadata: languageName: node linkType: hard +"pretty-ms@npm:9.0.0": + version: 9.0.0 + resolution: "pretty-ms@npm:9.0.0" + dependencies: + parse-ms: ^4.0.0 + checksum: 072b17547e09cb232e8e4c7be0281e256b6d8acd18dfb2fdd715d50330d1689fdaa877f53cf90c62ed419ef842f0f5fb94a2cd8ed1aa6d7608ad48834219435d + languageName: node + linkType: hard + "pretty-time@npm:^1.1.0": version: 1.1.0 resolution: "pretty-time@npm:1.1.0" @@ -17371,7 +17643,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.4, resolve@npm:~1.22.1": +"resolve@npm:1.22.8, resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.4, resolve@npm:~1.22.1": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -17407,7 +17679,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.12.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.4#~builtin, resolve@patch:resolve@~1.22.1#~builtin": +"resolve@patch:resolve@1.22.8#~builtin, resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.12.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.4#~builtin, resolve@patch:resolve@~1.22.1#~builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -17493,6 +17765,13 @@ __metadata: languageName: node linkType: hard +"reverse-arguments@npm:^1.0.0": + version: 1.0.0 + resolution: "reverse-arguments@npm:1.0.0" + checksum: 4dc725066adb35bccdee90545bab7e3ddd07e61c3622afa22a6a17cc84cf22166f9355f8f206c89d344f0afc78a53ae6a8d43a710ca9774a676e3632a5a3d9a1 + languageName: node + linkType: hard + "rfdc@npm:^1.3.0": version: 1.3.0 resolution: "rfdc@npm:1.3.0" @@ -17522,7 +17801,7 @@ __metadata: languageName: node linkType: hard -"rollup-plugin-terser@npm:^7.0.0, rollup-plugin-terser@npm:^7.0.2": +"rollup-plugin-terser@npm:^7.0.0": version: 7.0.2 resolution: "rollup-plugin-terser@npm:7.0.2" dependencies: @@ -17536,7 +17815,7 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^2.43.1, rollup@npm:^2.79.1": +"rollup@npm:^2.43.1": version: 2.79.1 resolution: "rollup@npm:2.79.1" dependencies: @@ -17585,7 +17864,7 @@ __metadata: languageName: node linkType: hard -"run-parallel@npm:^1.1.9": +"run-parallel@npm:^1.1.9, run-parallel@npm:^1.2.0": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" dependencies: @@ -17933,6 +18212,13 @@ __metadata: languageName: node linkType: hard +"shell-quote-word@npm:^1.0.1": + version: 1.0.1 + resolution: "shell-quote-word@npm:1.0.1" + checksum: 05c5df92acba3e7920dbd987b235276871d38cf360d339074cbfabea49bbca8406a6f06a822cd1e84912c3150277d73de5194ca21c37ef95e108dfe45372526f + languageName: node + linkType: hard + "shell-quote@npm:^1.7.3, shell-quote@npm:^1.8.1": version: 1.8.1 resolution: "shell-quote@npm:1.8.1" @@ -18092,6 +18378,13 @@ __metadata: languageName: node linkType: hard +"smol-toml@npm:1.1.4": + version: 1.1.4 + resolution: "smol-toml@npm:1.1.4" + checksum: 71537b27c18172c819778d54b6328d438af9d16dd63f0722a9df9fd77c7084eb163274224910c89e6dec0369f130ab050bc3cf4bdba34a4dc134b4faa74749de + languageName: node + linkType: hard + "sockjs@npm:^0.3.24": version: 0.3.24 resolution: "sockjs@npm:0.3.24" @@ -18393,6 +18686,13 @@ __metadata: languageName: node linkType: hard +"string.fromcodepoint@npm:^0.2.1": + version: 0.2.1 + resolution: "string.fromcodepoint@npm:0.2.1" + checksum: 6ba80f70c3e2a36dab87f5d68168936403295a73838564e701f5c861d397d77d9e97b0e2aa0f3c163a25a96c785dcc2145452b220753fb7b3e6c6fe431c9c411 + languageName: node + linkType: hard + "string.prototype.matchall@npm:^4.0.10, string.prototype.matchall@npm:^4.0.6": version: 4.0.10 resolution: "string.prototype.matchall@npm:4.0.10" @@ -18558,6 +18858,13 @@ __metadata: languageName: node linkType: hard +"strip-json-comments@npm:5.0.1": + version: 5.0.1 + resolution: "strip-json-comments@npm:5.0.1" + checksum: b314af70c6666a71133e309a571bdb87687fc878d9fd8b38ebed393a77b89835b92f191aa6b0bc10dfd028ba99eed6b6365985001d64c5aef32a4a82456a156b + languageName: node + linkType: hard + "strip-json-comments@npm:~2.0.1": version: 2.0.1 resolution: "strip-json-comments@npm:2.0.1" @@ -18689,6 +18996,13 @@ __metadata: languageName: node linkType: hard +"summary@npm:2.1.0": + version: 2.1.0 + resolution: "summary@npm:2.1.0" + checksum: 10ac12ce12c013b56ad44c37cfac206961f0993d98867b33b1b03a27b38a1cf8dd2db0b788883356c5335bbbb37d953772ef4a381d6fc8f408faf99f2bc54af5 + languageName: node + linkType: hard + "supports-color@npm:8.1.1, supports-color@npm:^8.0.0, supports-color@npm:~8.1.1": version: 8.1.1 resolution: "supports-color@npm:8.1.1" @@ -18958,6 +19272,22 @@ __metadata: languageName: node linkType: hard +"to-no-case@npm:^1.0.0": + version: 1.0.2 + resolution: "to-no-case@npm:1.0.2" + checksum: 1d85326eeb89f9f3a805bf5b395bcabb8556e882350164c1faa10846076732f4cec02ac95b016e7d6bb2f55e448ce5dd227c7699ec43e387c705a5b2b1ee2963 + languageName: node + linkType: hard + +"to-pascal-case@npm:^1.0.0": + version: 1.0.0 + resolution: "to-pascal-case@npm:1.0.0" + dependencies: + to-space-case: ^1.0.0 + checksum: 3956e209defc6df9de98c5db24a16fb2a1a11f711350ea3bdd9466240a04ab889fa09f1bd005e26fc31343c1cca341981daf2d80d4ec3f2d0706a557978f8b91 + languageName: node + linkType: hard + "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -18967,6 +19297,15 @@ __metadata: languageName: node linkType: hard +"to-space-case@npm:^1.0.0": + version: 1.0.0 + resolution: "to-space-case@npm:1.0.0" + dependencies: + to-no-case: ^1.0.0 + checksum: 157cebe3e98e7cb465fe1978cf26450cc8ea8e637a01039854fac7ed60ad074e5e18b32333cc5f30df81b81ca374d63df768cd4c1fa0fe672605f965376227f4 + languageName: node + linkType: hard + "toidentifier@npm:1.0.1": version: 1.0.1 resolution: "toidentifier@npm:1.0.1" @@ -19276,6 +19615,7 @@ __metadata: version: 0.0.0-use.local resolution: "typescript-eslint@workspace:packages/typescript-eslint" dependencies: + "@jest/types": 29.6.3 "@typescript-eslint/eslint-plugin": 7.8.0 "@typescript-eslint/parser": 7.8.0 "@typescript-eslint/utils": 7.8.0 @@ -19347,6 +19687,15 @@ __metadata: languageName: node linkType: hard +"unescape-js@npm:^1.0.5": + version: 1.1.4 + resolution: "unescape-js@npm:1.1.4" + dependencies: + string.fromcodepoint: ^0.2.1 + checksum: 97acf60a8f6c170f8a66b48b71f5c56bda728c2ff6b08c3443c5f21635bf5fa38a4265bcfcf46d17cb6ac9bbb8b913a34b1abc5cfe8db5d7cc5c8eecb1817472 + languageName: node + linkType: hard + "unicode-canonical-property-names-ecmascript@npm:^2.0.0": version: 2.0.0 resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0" @@ -19733,6 +20082,13 @@ __metadata: languageName: node linkType: hard +"vlq@npm:^0.2.1": + version: 0.2.3 + resolution: "vlq@npm:0.2.3" + checksum: 2231d8caeb5b2c1a438677ab029e9a94aa6fb61ab05819c72691b792aea0456dab29576aff5ae29309ee45bad0a309e832dc45173119bca1393f3b87709d8f8d + languageName: node + linkType: hard + "vscode-languageserver-textdocument@npm:^1.0.11": version: 1.0.11 resolution: "vscode-languageserver-textdocument@npm:1.0.11" @@ -19978,26 +20334,27 @@ __metadata: "@docusaurus/preset-classic": ^3.2.1 "@docusaurus/remark-plugin-npm2yarn": ^3.2.1 "@docusaurus/theme-common": ^3.2.1 - "@mdx-js/react": ^3.0.1 - "@prettier/sync": "*" + "@types/mdast": ^4.0.3 "@types/react": "*" - "@types/react-helmet": ^6.1.11 - "@types/react-router-dom": ^5.3.3 + "@types/unist": ^3.0.2 "@typescript-eslint/eslint-plugin": 7.8.0 "@typescript-eslint/parser": 7.8.0 "@typescript-eslint/rule-schema-to-typescript-types": 7.8.0 + "@typescript-eslint/scope-manager": 7.8.0 "@typescript-eslint/types": 7.8.0 + "@typescript-eslint/typescript-estree": 7.8.0 + "@typescript-eslint/utils": 7.8.0 "@typescript-eslint/website-eslint": 7.8.0 clsx: ^2.1.0 copy-webpack-plugin: ^12.0.0 cross-fetch: "*" eslint: "*" - globby: ^11.1.0 - json-schema: ^0.4.0 + history: ^4.9.0 json5: ^2.2.3 konamimojisplosion: ^0.5.2 lz-string: ^1.5.0 make-dir: "*" + mdast-util-mdx: ^3.0.0 monaco-editor: ~0.47.0 prettier: ^3.2.5 prism-react-renderer: ^1.3.5 @@ -20013,6 +20370,8 @@ __metadata: stylelint-order: ^6.0.4 tsx: "*" typescript: "*" + unified: ^11.0.4 + vfile: ^6.0.1 webpack: ^5.91.0 languageName: unknown linkType: soft @@ -20623,6 +20982,22 @@ __metadata: languageName: node linkType: hard +"zod-validation-error@npm:^3.0.3": + version: 3.2.0 + resolution: "zod-validation-error@npm:3.2.0" + peerDependencies: + zod: ^3.18.0 + checksum: 4d541566ff4bd54cc7c1c547ee69e50a11ff14c48d378f7c600146513e250067f8a9bac0170285d346d00095685cbc29a4cd84f9c6371bb4fd3ed29d0fb98be3 + languageName: node + linkType: hard + +"zod@npm:^3.22.4": + version: 3.23.3 + resolution: "zod@npm:3.23.3" + checksum: c5be5a79ec31c712db47ec8343140e626dcd647e91a896ae98a1ab29d0f17b09f4b2d6adb9db2c0f82aacacedc73e89f0c14453c7da02d70ea79a4298c1bbaa4 + languageName: node + linkType: hard + "zwitch@npm:^2.0.0": version: 2.0.4 resolution: "zwitch@npm:2.0.4" From 77fc366aa03f3cee1ebcf91a10dc0be8b669520e Mon Sep 17 00:00:00 2001 From: "typescript-eslint[bot]" Date: Mon, 13 May 2024 17:14:33 +0000 Subject: [PATCH 16/16] chore(release): publish 7.9.0 --- CHANGELOG.md | 20 +++ packages/ast-spec/CHANGELOG.md | 6 + packages/ast-spec/package.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 6 + packages/eslint-plugin-internal/package.json | 10 +- packages/eslint-plugin/CHANGELOG.md | 16 +++ packages/eslint-plugin/package.json | 14 +- packages/integration-tests/CHANGELOG.md | 6 + packages/integration-tests/package.json | 2 +- packages/parser/CHANGELOG.md | 6 + packages/parser/package.json | 10 +- packages/repo-tools/CHANGELOG.md | 6 + packages/repo-tools/package.json | 12 +- .../CHANGELOG.md | 6 + .../package.json | 6 +- packages/rule-tester/CHANGELOG.md | 16 +++ packages/rule-tester/package.json | 8 +- packages/scope-manager/CHANGELOG.md | 6 + packages/scope-manager/package.json | 8 +- packages/type-utils/CHANGELOG.md | 6 + packages/type-utils/package.json | 8 +- packages/types/CHANGELOG.md | 6 + packages/types/package.json | 2 +- packages/typescript-eslint/CHANGELOG.md | 6 + packages/typescript-eslint/package.json | 8 +- packages/typescript-estree/CHANGELOG.md | 16 +++ packages/typescript-estree/package.json | 6 +- packages/utils/CHANGELOG.md | 6 + packages/utils/package.json | 8 +- packages/visitor-keys/CHANGELOG.md | 6 + packages/visitor-keys/package.json | 4 +- packages/website-eslint/CHANGELOG.md | 6 + packages/website-eslint/package.json | 12 +- packages/website/CHANGELOG.md | 16 +++ packages/website/package.json | 18 +-- yarn.lock | 126 +++++++++--------- 36 files changed, 294 insertions(+), 132 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c371164fa2e0..0fba83da23b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +## 7.9.0 (2024-05-13) + + +### 🚀 Features + +- **rule-tester:** check for missing placeholder data in the message ([#9039](https://github.com/typescript-eslint/typescript-eslint/pull/9039)) + +### 🩹 Fixes + +- do not pass tsconfig canonical file name to typescript API to get program details for config file ([#9042](https://github.com/typescript-eslint/typescript-eslint/pull/9042)) +- **eslint-plugin:** [explicit-function-return-types] fix false positive on default parameters ([#9045](https://github.com/typescript-eslint/typescript-eslint/pull/9045)) + +### ❤️ Thank You + +- Kirk Waiblinger +- Sheetal Nandi +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 583d32ea8223..be4345a15879 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for ast-spec to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for ast-spec to align it with other projects, there were no code changes. diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index b33a0599570c..532b8ea083b9 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "7.8.0", + "version": "7.9.0", "description": "Complete specification for the TypeScript-ESTree AST", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 7b3c31b879c3..35f68499b9d0 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index f2afa1fb644f..92476c2e0767 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "7.8.0", + "version": "7.9.0", "private": true, "main": "dist/index.js", "types": "index.d.ts", @@ -15,10 +15,10 @@ }, "dependencies": { "@prettier/sync": "^0.5.1", - "@typescript-eslint/rule-tester": "7.8.0", - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/type-utils": "7.8.0", - "@typescript-eslint/utils": "7.8.0", + "@typescript-eslint/rule-tester": "7.9.0", + "@typescript-eslint/scope-manager": "7.9.0", + "@typescript-eslint/type-utils": "7.9.0", + "@typescript-eslint/utils": "7.9.0", "prettier": "^3.2.5" }, "devDependencies": { diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index d9a49e3a07b9..65f276cd215c 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,3 +1,19 @@ +## 7.9.0 (2024-05-13) + + +### 🩹 Fixes + +- **eslint-plugin:** [explicit-function-return-types] fix false positive on default parameters + + +### ❤️ Thank You + +- Kirk Waiblinger +- Sheetal Nandi +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 271a5096530e..c41a520661f9 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "7.8.0", + "version": "7.9.0", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -62,10 +62,10 @@ }, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/type-utils": "7.8.0", - "@typescript-eslint/utils": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0", + "@typescript-eslint/scope-manager": "7.9.0", + "@typescript-eslint/type-utils": "7.9.0", + "@typescript-eslint/utils": "7.9.0", + "@typescript-eslint/visitor-keys": "7.9.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -76,8 +76,8 @@ "@types/marked": "^5.0.2", "@types/mdast": "^4.0.3", "@types/natural-compare": "*", - "@typescript-eslint/rule-schema-to-typescript-types": "7.8.0", - "@typescript-eslint/rule-tester": "7.8.0", + "@typescript-eslint/rule-schema-to-typescript-types": "7.9.0", + "@typescript-eslint/rule-tester": "7.9.0", "ajv": "^6.12.6", "cross-env": "^7.0.3", "cross-fetch": "*", diff --git a/packages/integration-tests/CHANGELOG.md b/packages/integration-tests/CHANGELOG.md index e78f680a14a0..a9b7cb5d6867 100644 --- a/packages/integration-tests/CHANGELOG.md +++ b/packages/integration-tests/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for integration-tests to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for integration-tests to align it with other projects, there were no code changes. diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index b041c29a51b7..229b85bbf755 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/integration-tests", - "version": "7.8.0", + "version": "7.9.0", "private": true, "scripts": { "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 8a5414f2e012..eef254c79eeb 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for parser to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for parser to align it with other projects, there were no code changes. diff --git a/packages/parser/package.json b/packages/parser/package.json index 10540c522fb4..d8bbc3e686f8 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "7.8.0", + "version": "7.9.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "files": [ "dist", @@ -52,10 +52,10 @@ "eslint": "^8.56.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/typescript-estree": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0", + "@typescript-eslint/scope-manager": "7.9.0", + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/typescript-estree": "7.9.0", + "@typescript-eslint/visitor-keys": "7.9.0", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index 350e1ccfede4..fed0b7c4288c 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for repo-tools to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for repo-tools to align it with other projects, there were no code changes. diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index 350040e20bfc..41b1cb49dd32 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/repo-tools", - "version": "7.8.0", + "version": "7.9.0", "private": true, "//": "NOTE: intentionally no build step in this package", "scripts": { @@ -18,11 +18,11 @@ "devDependencies": { "@jest/types": "29.6.3", "@nx/devkit": "*", - "@typescript-eslint/eslint-plugin": "7.8.0", - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/typescript-estree": "7.8.0", - "@typescript-eslint/utils": "7.8.0", + "@typescript-eslint/eslint-plugin": "7.9.0", + "@typescript-eslint/scope-manager": "7.9.0", + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/typescript-estree": "7.9.0", + "@typescript-eslint/utils": "7.9.0", "cross-fetch": "*", "execa": "*", "prettier": "^3.2.5", diff --git a/packages/rule-schema-to-typescript-types/CHANGELOG.md b/packages/rule-schema-to-typescript-types/CHANGELOG.md index 1e45b77d4f3b..ba73ffbb365e 100644 --- a/packages/rule-schema-to-typescript-types/CHANGELOG.md +++ b/packages/rule-schema-to-typescript-types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index 55578284e29b..3397d0ea757e 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-schema-to-typescript-types", - "version": "7.8.0", + "version": "7.9.0", "private": true, "type": "commonjs", "exports": { @@ -34,8 +34,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/type-utils": "7.8.0", - "@typescript-eslint/utils": "7.8.0", + "@typescript-eslint/type-utils": "7.9.0", + "@typescript-eslint/utils": "7.9.0", "natural-compare": "^1.4.0", "prettier": "^3.2.5" }, diff --git a/packages/rule-tester/CHANGELOG.md b/packages/rule-tester/CHANGELOG.md index f48c165b13fc..5eecde9662f5 100644 --- a/packages/rule-tester/CHANGELOG.md +++ b/packages/rule-tester/CHANGELOG.md @@ -1,3 +1,19 @@ +## 7.9.0 (2024-05-13) + + +### 🚀 Features + +- **rule-tester:** check for missing placeholder data in the message + + +### ❤️ Thank You + +- Kirk Waiblinger +- Sheetal Nandi +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index 29608f39735a..2e448716464c 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-tester", - "version": "7.8.0", + "version": "7.9.0", "description": "Tooling to test ESLint rules", "files": [ "dist", @@ -48,8 +48,8 @@ }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { - "@typescript-eslint/typescript-estree": "7.8.0", - "@typescript-eslint/utils": "7.8.0", + "@typescript-eslint/typescript-estree": "7.9.0", + "@typescript-eslint/utils": "7.9.0", "ajv": "^6.12.6", "lodash.merge": "4.6.2", "semver": "^7.6.0" @@ -61,7 +61,7 @@ "devDependencies": { "@jest/types": "29.6.3", "@types/lodash.merge": "4.6.9", - "@typescript-eslint/parser": "7.8.0", + "@typescript-eslint/parser": "7.9.0", "chai": "^4.4.1", "eslint-visitor-keys": "^4.0.0", "espree": "^10.0.1", diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index d60b64e524b8..2730019df342 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for scope-manager to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for scope-manager to align it with other projects, there were no code changes. diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 6a0db284c452..4093438ccf9a 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "7.8.0", + "version": "7.9.0", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -46,13 +46,13 @@ "typecheck": "npx nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0" + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/visitor-keys": "7.9.0" }, "devDependencies": { "@jest/types": "29.6.3", "@types/glob": "*", - "@typescript-eslint/typescript-estree": "7.8.0", + "@typescript-eslint/typescript-estree": "7.9.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index d6303d905aba..5cb2ed1619fe 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for type-utils to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for type-utils to align it with other projects, there were no code changes. diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 42b4a98d256b..744d4d12c502 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "7.8.0", + "version": "7.9.0", "description": "Type utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -46,14 +46,14 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "7.8.0", - "@typescript-eslint/utils": "7.8.0", + "@typescript-eslint/typescript-estree": "7.9.0", + "@typescript-eslint/utils": "7.9.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, "devDependencies": { "@jest/types": "29.6.3", - "@typescript-eslint/parser": "7.8.0", + "@typescript-eslint/parser": "7.9.0", "ajv": "^6.12.6", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 3c123e3ac4d3..23de893c7747 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for types to align it with other projects, there were no code changes. diff --git a/packages/types/package.json b/packages/types/package.json index b854b4ec3c00..638bf71430c0 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "7.8.0", + "version": "7.9.0", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", diff --git a/packages/typescript-eslint/CHANGELOG.md b/packages/typescript-eslint/CHANGELOG.md index 57fd1e9c8fe9..a3ae1412d9d7 100644 --- a/packages/typescript-eslint/CHANGELOG.md +++ b/packages/typescript-eslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for typescript-eslint to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for typescript-eslint to align it with other projects, there were no code changes. diff --git a/packages/typescript-eslint/package.json b/packages/typescript-eslint/package.json index 240f2742ae74..320209544678 100644 --- a/packages/typescript-eslint/package.json +++ b/packages/typescript-eslint/package.json @@ -1,6 +1,6 @@ { "name": "typescript-eslint", - "version": "7.8.0", + "version": "7.9.0", "description": "Tooling which enables you to use TypeScript with ESLint", "files": [ "dist", @@ -55,9 +55,9 @@ "eslint": "^8.56.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "7.8.0", - "@typescript-eslint/parser": "7.8.0", - "@typescript-eslint/utils": "7.8.0" + "@typescript-eslint/eslint-plugin": "7.9.0", + "@typescript-eslint/parser": "7.9.0", + "@typescript-eslint/utils": "7.9.0" }, "devDependencies": { "@jest/types": "29.6.3", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 0eee2460cb1c..2c968c5c2660 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -1,3 +1,19 @@ +## 7.9.0 (2024-05-13) + + +### 🩹 Fixes + +- do not pass tsconfig canonical file name to typescript API to get program details for config file + + +### ❤️ Thank You + +- Kirk Waiblinger +- Sheetal Nandi +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 1105cfcc2ecb..d7bd2b975e85 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "7.8.0", + "version": "7.9.0", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "files": [ "dist", @@ -54,8 +54,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0", + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/visitor-keys": "7.9.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index a058729eae0d..382e4f0a6202 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for utils to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) diff --git a/packages/utils/package.json b/packages/utils/package.json index e474455899bd..da92137bdbe7 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "7.8.0", + "version": "7.9.0", "description": "Utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -68,9 +68,9 @@ }, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/typescript-estree": "7.8.0" + "@typescript-eslint/scope-manager": "7.9.0", + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/typescript-estree": "7.9.0" }, "peerDependencies": { "eslint": "^8.56.0" diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index cf9ada26c597..8541dcb5a1a5 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for visitor-keys to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index b9b47ad38bdb..927848b161b1 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "7.8.0", + "version": "7.9.0", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "files": [ "dist", @@ -47,7 +47,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/types": "7.9.0", "eslint-visitor-keys": "^3.4.3" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index 71d000353e17..a3bf73cddafd 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.9.0 (2024-05-13) + +This was a version bump only for website-eslint to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) This was a version bump only for website-eslint to align it with other projects, there were no code changes. diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index 64149c4dc296..537b5ebcc6dc 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "7.8.0", + "version": "7.9.0", "private": true, "description": "ESLint which works in browsers.", "files": [ @@ -24,11 +24,11 @@ }, "devDependencies": { "@eslint/js": "*", - "@typescript-eslint/eslint-plugin": "7.8.0", - "@typescript-eslint/parser": "7.8.0", - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/typescript-estree": "7.8.0", - "@typescript-eslint/visitor-keys": "7.8.0", + "@typescript-eslint/eslint-plugin": "7.9.0", + "@typescript-eslint/parser": "7.9.0", + "@typescript-eslint/scope-manager": "7.9.0", + "@typescript-eslint/typescript-estree": "7.9.0", + "@typescript-eslint/visitor-keys": "7.9.0", "esbuild": "~0.20.2", "eslint": "*", "esquery": "*", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index fb24be637e83..bf7a56394577 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -1,3 +1,19 @@ +## 7.9.0 (2024-05-13) + + +### 🩹 Fixes + +- do not pass tsconfig canonical file name to typescript API to get program details for config file + + +### ❤️ Thank You + +- Kirk Waiblinger +- Sheetal Nandi +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.8.0 (2024-04-29) diff --git a/packages/website/package.json b/packages/website/package.json index 74bd20a81312..8843df2e9bc7 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "7.8.0", + "version": "7.9.0", "private": true, "scripts": { "build": "docusaurus build", @@ -23,8 +23,8 @@ "@docusaurus/preset-classic": "^3.2.1", "@docusaurus/remark-plugin-npm2yarn": "^3.2.1", "@docusaurus/theme-common": "^3.2.1", - "@typescript-eslint/parser": "7.8.0", - "@typescript-eslint/website-eslint": "7.8.0", + "@typescript-eslint/parser": "7.9.0", + "@typescript-eslint/website-eslint": "7.9.0", "clsx": "^2.1.0", "eslint": "*", "json5": "^2.2.3", @@ -46,12 +46,12 @@ "@types/mdast": "^4.0.3", "@types/react": "*", "@types/unist": "^3.0.2", - "@typescript-eslint/eslint-plugin": "7.8.0", - "@typescript-eslint/rule-schema-to-typescript-types": "7.8.0", - "@typescript-eslint/scope-manager": "7.8.0", - "@typescript-eslint/types": "7.8.0", - "@typescript-eslint/typescript-estree": "7.8.0", - "@typescript-eslint/utils": "7.8.0", + "@typescript-eslint/eslint-plugin": "7.9.0", + "@typescript-eslint/rule-schema-to-typescript-types": "7.9.0", + "@typescript-eslint/scope-manager": "7.9.0", + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/typescript-estree": "7.9.0", + "@typescript-eslint/utils": "7.9.0", "copy-webpack-plugin": "^12.0.0", "cross-fetch": "*", "history": "^4.9.0", diff --git a/yarn.lock b/yarn.lock index dade7016498e..742feacbdcf6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5596,17 +5596,17 @@ __metadata: dependencies: "@jest/types": 29.6.3 "@prettier/sync": ^0.5.1 - "@typescript-eslint/rule-tester": 7.8.0 - "@typescript-eslint/scope-manager": 7.8.0 - "@typescript-eslint/type-utils": 7.8.0 - "@typescript-eslint/utils": 7.8.0 + "@typescript-eslint/rule-tester": 7.9.0 + "@typescript-eslint/scope-manager": 7.9.0 + "@typescript-eslint/type-utils": 7.9.0 + "@typescript-eslint/utils": 7.9.0 jest: 29.7.0 prettier: ^3.2.5 rimraf: "*" languageName: unknown linkType: soft -"@typescript-eslint/eslint-plugin@7.8.0, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": +"@typescript-eslint/eslint-plugin@7.9.0, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": version: 0.0.0-use.local resolution: "@typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin" dependencies: @@ -5615,12 +5615,12 @@ __metadata: "@types/marked": ^5.0.2 "@types/mdast": ^4.0.3 "@types/natural-compare": "*" - "@typescript-eslint/rule-schema-to-typescript-types": 7.8.0 - "@typescript-eslint/rule-tester": 7.8.0 - "@typescript-eslint/scope-manager": 7.8.0 - "@typescript-eslint/type-utils": 7.8.0 - "@typescript-eslint/utils": 7.8.0 - "@typescript-eslint/visitor-keys": 7.8.0 + "@typescript-eslint/rule-schema-to-typescript-types": 7.9.0 + "@typescript-eslint/rule-tester": 7.9.0 + "@typescript-eslint/scope-manager": 7.9.0 + "@typescript-eslint/type-utils": 7.9.0 + "@typescript-eslint/utils": 7.9.0 + "@typescript-eslint/visitor-keys": 7.9.0 ajv: ^6.12.6 cross-env: ^7.0.3 cross-fetch: "*" @@ -5665,16 +5665,16 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@7.8.0, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@7.9.0, @typescript-eslint/parser@workspace:packages/parser": version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: "@jest/types": 29.6.3 "@types/glob": "*" - "@typescript-eslint/scope-manager": 7.8.0 - "@typescript-eslint/types": 7.8.0 - "@typescript-eslint/typescript-estree": 7.8.0 - "@typescript-eslint/visitor-keys": 7.8.0 + "@typescript-eslint/scope-manager": 7.9.0 + "@typescript-eslint/types": 7.9.0 + "@typescript-eslint/typescript-estree": 7.9.0 + "@typescript-eslint/visitor-keys": 7.9.0 debug: ^4.3.4 downlevel-dts: "*" glob: "*" @@ -5696,11 +5696,11 @@ __metadata: dependencies: "@jest/types": 29.6.3 "@nx/devkit": "*" - "@typescript-eslint/eslint-plugin": 7.8.0 - "@typescript-eslint/scope-manager": 7.8.0 - "@typescript-eslint/types": 7.8.0 - "@typescript-eslint/typescript-estree": 7.8.0 - "@typescript-eslint/utils": 7.8.0 + "@typescript-eslint/eslint-plugin": 7.9.0 + "@typescript-eslint/scope-manager": 7.9.0 + "@typescript-eslint/types": 7.9.0 + "@typescript-eslint/typescript-estree": 7.9.0 + "@typescript-eslint/utils": 7.9.0 cross-fetch: "*" execa: "*" prettier: ^3.2.5 @@ -5710,27 +5710,27 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/rule-schema-to-typescript-types@7.8.0, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": +"@typescript-eslint/rule-schema-to-typescript-types@7.9.0, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/type-utils": 7.8.0 - "@typescript-eslint/utils": 7.8.0 + "@typescript-eslint/type-utils": 7.9.0 + "@typescript-eslint/utils": 7.9.0 natural-compare: ^1.4.0 prettier: ^3.2.5 languageName: unknown linkType: soft -"@typescript-eslint/rule-tester@7.8.0, @typescript-eslint/rule-tester@workspace:packages/rule-tester": +"@typescript-eslint/rule-tester@7.9.0, @typescript-eslint/rule-tester@workspace:packages/rule-tester": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-tester@workspace:packages/rule-tester" dependencies: "@jest/types": 29.6.3 "@types/lodash.merge": 4.6.9 - "@typescript-eslint/parser": 7.8.0 - "@typescript-eslint/typescript-estree": 7.8.0 - "@typescript-eslint/utils": 7.8.0 + "@typescript-eslint/parser": 7.9.0 + "@typescript-eslint/typescript-estree": 7.9.0 + "@typescript-eslint/utils": 7.9.0 ajv: ^6.12.6 chai: ^4.4.1 eslint-visitor-keys: ^4.0.0 @@ -5748,15 +5748,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/scope-manager@7.8.0, @typescript-eslint/scope-manager@workspace:packages/scope-manager": +"@typescript-eslint/scope-manager@7.9.0, @typescript-eslint/scope-manager@workspace:packages/scope-manager": version: 0.0.0-use.local resolution: "@typescript-eslint/scope-manager@workspace:packages/scope-manager" dependencies: "@jest/types": 29.6.3 "@types/glob": "*" - "@typescript-eslint/types": 7.8.0 - "@typescript-eslint/typescript-estree": 7.8.0 - "@typescript-eslint/visitor-keys": 7.8.0 + "@typescript-eslint/types": 7.9.0 + "@typescript-eslint/typescript-estree": 7.9.0 + "@typescript-eslint/visitor-keys": 7.9.0 glob: "*" jest-specific-snapshot: "*" make-dir: "*" @@ -5785,14 +5785,14 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@7.8.0, @typescript-eslint/type-utils@workspace:packages/type-utils": +"@typescript-eslint/type-utils@7.9.0, @typescript-eslint/type-utils@workspace:packages/type-utils": version: 0.0.0-use.local resolution: "@typescript-eslint/type-utils@workspace:packages/type-utils" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/parser": 7.8.0 - "@typescript-eslint/typescript-estree": 7.8.0 - "@typescript-eslint/utils": 7.8.0 + "@typescript-eslint/parser": 7.9.0 + "@typescript-eslint/typescript-estree": 7.9.0 + "@typescript-eslint/utils": 7.9.0 ajv: ^6.12.6 debug: ^4.3.4 downlevel-dts: "*" @@ -5809,7 +5809,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/types@7.8.0, @typescript-eslint/types@workspace:packages/types": +"@typescript-eslint/types@7.9.0, @typescript-eslint/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: @@ -5908,13 +5908,13 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/typescript-estree@7.8.0, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": +"@typescript-eslint/typescript-estree@7.9.0, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": version: 0.0.0-use.local resolution: "@typescript-eslint/typescript-estree@workspace:packages/typescript-estree" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/types": 7.8.0 - "@typescript-eslint/visitor-keys": 7.8.0 + "@typescript-eslint/types": 7.9.0 + "@typescript-eslint/visitor-keys": 7.9.0 debug: ^4.3.4 glob: "*" globby: ^11.1.0 @@ -5970,14 +5970,14 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@7.8.0, @typescript-eslint/utils@workspace:packages/utils": +"@typescript-eslint/utils@7.9.0, @typescript-eslint/utils@workspace:packages/utils": version: 0.0.0-use.local resolution: "@typescript-eslint/utils@workspace:packages/utils" dependencies: "@eslint-community/eslint-utils": ^4.4.0 - "@typescript-eslint/scope-manager": 7.8.0 - "@typescript-eslint/types": 7.8.0 - "@typescript-eslint/typescript-estree": 7.8.0 + "@typescript-eslint/scope-manager": 7.9.0 + "@typescript-eslint/types": 7.9.0 + "@typescript-eslint/typescript-estree": 7.9.0 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.2.5 @@ -6023,13 +6023,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@7.8.0, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": +"@typescript-eslint/visitor-keys@7.9.0, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": version: 0.0.0-use.local resolution: "@typescript-eslint/visitor-keys@workspace:packages/visitor-keys" dependencies: "@jest/types": 29.6.3 "@types/eslint-visitor-keys": "*" - "@typescript-eslint/types": 7.8.0 + "@typescript-eslint/types": 7.9.0 downlevel-dts: "*" eslint-visitor-keys: ^3.4.3 jest: 29.7.0 @@ -6059,16 +6059,16 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/website-eslint@7.8.0, @typescript-eslint/website-eslint@workspace:packages/website-eslint": +"@typescript-eslint/website-eslint@7.9.0, @typescript-eslint/website-eslint@workspace:packages/website-eslint": version: 0.0.0-use.local resolution: "@typescript-eslint/website-eslint@workspace:packages/website-eslint" dependencies: "@eslint/js": "*" - "@typescript-eslint/eslint-plugin": 7.8.0 - "@typescript-eslint/parser": 7.8.0 - "@typescript-eslint/scope-manager": 7.8.0 - "@typescript-eslint/typescript-estree": 7.8.0 - "@typescript-eslint/visitor-keys": 7.8.0 + "@typescript-eslint/eslint-plugin": 7.9.0 + "@typescript-eslint/parser": 7.9.0 + "@typescript-eslint/scope-manager": 7.9.0 + "@typescript-eslint/typescript-estree": 7.9.0 + "@typescript-eslint/visitor-keys": 7.9.0 esbuild: ~0.20.2 eslint: "*" esquery: "*" @@ -19616,9 +19616,9 @@ __metadata: resolution: "typescript-eslint@workspace:packages/typescript-eslint" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/eslint-plugin": 7.8.0 - "@typescript-eslint/parser": 7.8.0 - "@typescript-eslint/utils": 7.8.0 + "@typescript-eslint/eslint-plugin": 7.9.0 + "@typescript-eslint/parser": 7.9.0 + "@typescript-eslint/utils": 7.9.0 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.2.5 @@ -20337,14 +20337,14 @@ __metadata: "@types/mdast": ^4.0.3 "@types/react": "*" "@types/unist": ^3.0.2 - "@typescript-eslint/eslint-plugin": 7.8.0 - "@typescript-eslint/parser": 7.8.0 - "@typescript-eslint/rule-schema-to-typescript-types": 7.8.0 - "@typescript-eslint/scope-manager": 7.8.0 - "@typescript-eslint/types": 7.8.0 - "@typescript-eslint/typescript-estree": 7.8.0 - "@typescript-eslint/utils": 7.8.0 - "@typescript-eslint/website-eslint": 7.8.0 + "@typescript-eslint/eslint-plugin": 7.9.0 + "@typescript-eslint/parser": 7.9.0 + "@typescript-eslint/rule-schema-to-typescript-types": 7.9.0 + "@typescript-eslint/scope-manager": 7.9.0 + "@typescript-eslint/types": 7.9.0 + "@typescript-eslint/typescript-estree": 7.9.0 + "@typescript-eslint/utils": 7.9.0 + "@typescript-eslint/website-eslint": 7.9.0 clsx: ^2.1.0 copy-webpack-plugin: ^12.0.0 cross-fetch: "*"