diff --git a/packages/parser/package.json b/packages/parser/package.json index f2f1ac4574c0..0f9cb1662aa3 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -48,6 +48,7 @@ "@typescript-eslint/scope-manager": "5.48.2", "@typescript-eslint/types": "5.48.2", "@typescript-eslint/typescript-estree": "5.48.2", + "@typescript-eslint/visitor-keys": "5.48.2", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/parser/src/parser.ts b/packages/parser/src/parser.ts index 78894bc7a58e..22a210892e99 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; diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index 4a6187ac2cc4..498082385a27 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -21,9 +21,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; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy