From 00389743541a9964799cf565f9859017c0e12407 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 17 Dec 2022 18:29:03 -0500 Subject: [PATCH 1/3] chore(typescript-estree): remove visitor-keys backwards compat export --- packages/typescript-estree/src/index.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index bc7ed6024f3..7d859bc6b1c 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -16,9 +16,6 @@ export * from './create-program/getScriptKind'; export { typescriptVersionIsAtLeast } from './version-check'; export * from './getModifiers'; -// re-export for backwards-compat -export { visitorKeys } from '@typescript-eslint/visitor-keys'; - // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access export const version: string = require('../package.json').version; From 0cd88d4e06560719043c2394189ed1f053bccaed Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 17 Dec 2022 21:19:57 -0500 Subject: [PATCH 2/3] Fix our own internal import, haha --- packages/parser/src/parser.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/parser/src/parser.ts b/packages/parser/src/parser.ts index 4f9a099e48c..03557d6f297 100644 --- a/packages/parser/src/parser.ts +++ b/packages/parser/src/parser.ts @@ -9,10 +9,8 @@ import type { ParserServices, TSESTreeOptions, } from '@typescript-eslint/typescript-estree'; -import { - parseAndGenerateServices, - visitorKeys, -} from '@typescript-eslint/typescript-estree'; +import { parseAndGenerateServices } from '@typescript-eslint/typescript-estree'; +import { visitorKeys } from '@typescript-eslint/visitor-keys'; import debug from 'debug'; import type * as ts from 'typescript'; import { ScriptTarget } from 'typescript'; @@ -43,14 +41,14 @@ function validateBoolean( const LIB_FILENAME_REGEX = /lib\.(.+)\.d\.[cm]?ts$/; function getLib(compilerOptions: ts.CompilerOptions): Lib[] { if (compilerOptions.lib) { - return compilerOptions.lib.reduce((acc, lib) => { + return compilerOptions.lib.reduce((acc, lib) => { const match = LIB_FILENAME_REGEX.exec(lib.toLowerCase()); if (match) { acc.push(match[1] as Lib); } return acc; - }, [] as Lib[]); + }, []); } const target = compilerOptions.target ?? ScriptTarget.ES5; From e0e665f422957c6114ef26dd815933fa44fc60ca Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 17 Dec 2022 22:39:38 -0500 Subject: [PATCH 3/3] Add missing dependency --- packages/parser/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/parser/package.json b/packages/parser/package.json index 8b2190ded0a..d4102ec1f6c 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -48,6 +48,7 @@ "@typescript-eslint/scope-manager": "5.46.1", "@typescript-eslint/types": "5.46.1", "@typescript-eslint/typescript-estree": "5.46.1", + "@typescript-eslint/visitor-keys": "5.46.1", "debug": "^4.3.4" }, "devDependencies": {