From f536cc7421f689d1c8252d7f15114a435c179613 Mon Sep 17 00:00:00 2001 From: Ian Clanton-Thuon Date: Mon, 7 Jul 2025 18:08:42 -0700 Subject: [PATCH] Follow-ups to #5271. --- .../bump-versions-follow-up_2025-07-08-01-08.json | 11 +++++++++++ eslint/eslint-plugin/src/no-untyped-underscore.ts | 3 ++- .../eslint/flat/patch/custom-config-package-names.js | 4 ---- .../eslint/flat/patch/modern-module-resolution.js | 4 ---- 4 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 common/changes/@rushstack/eslint-plugin/bump-versions-follow-up_2025-07-08-01-08.json delete mode 100644 rigs/decoupled-local-node-rig/profiles/default/includes/eslint/flat/patch/custom-config-package-names.js delete mode 100644 rigs/decoupled-local-node-rig/profiles/default/includes/eslint/flat/patch/modern-module-resolution.js diff --git a/common/changes/@rushstack/eslint-plugin/bump-versions-follow-up_2025-07-08-01-08.json b/common/changes/@rushstack/eslint-plugin/bump-versions-follow-up_2025-07-08-01-08.json new file mode 100644 index 00000000000..5669a1df6aa --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin/bump-versions-follow-up_2025-07-08-01-08.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/eslint-plugin" + } + ], + "packageName": "@rushstack/eslint-plugin", + "email": "iclanton@users.noreply.github.com" +} \ No newline at end of file diff --git a/eslint/eslint-plugin/src/no-untyped-underscore.ts b/eslint/eslint-plugin/src/no-untyped-underscore.ts index fd291630a86..01f948f2873 100644 --- a/eslint/eslint-plugin/src/no-untyped-underscore.ts +++ b/eslint/eslint-plugin/src/no-untyped-underscore.ts @@ -26,7 +26,8 @@ const noUntypedUnderscoreRule: TSESLint.RuleModule = { } as TSESLint.RuleMetaDataDocs }, create: (context: TSESLint.RuleContext) => { - const parserServices: Partial | undefined = context.sourceCode.parserServices; + const parserServices: Partial | undefined = + context.sourceCode?.parserServices ?? context.parserServices; if (!parserServices || !parserServices.program || !parserServices.esTreeNodeToTSNodeMap) { throw new Error( 'This rule requires your ESLint configuration to define the "parserOptions.project"' + diff --git a/rigs/decoupled-local-node-rig/profiles/default/includes/eslint/flat/patch/custom-config-package-names.js b/rigs/decoupled-local-node-rig/profiles/default/includes/eslint/flat/patch/custom-config-package-names.js deleted file mode 100644 index 20341195020..00000000000 --- a/rigs/decoupled-local-node-rig/profiles/default/includes/eslint/flat/patch/custom-config-package-names.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See LICENSE in the project root for license information. - -require('@rushstack/eslint-patch/custom-config-package-names'); diff --git a/rigs/decoupled-local-node-rig/profiles/default/includes/eslint/flat/patch/modern-module-resolution.js b/rigs/decoupled-local-node-rig/profiles/default/includes/eslint/flat/patch/modern-module-resolution.js deleted file mode 100644 index d4ba8827123..00000000000 --- a/rigs/decoupled-local-node-rig/profiles/default/includes/eslint/flat/patch/modern-module-resolution.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See LICENSE in the project root for license information. - -require('@rushstack/eslint-patch/modern-module-resolution');