From ee481b45e9a708594f2799eb48da94bbc7546db9 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Mon, 3 Jun 2019 08:20:27 -0700 Subject: [PATCH] fix(experimental-utils): Avoid typescript import at runtime See: https://github.com/typescript-eslint/typescript-eslint/pull/425#issuecomment-498162293 --- packages/experimental-utils/src/index.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/experimental-utils/src/index.ts b/packages/experimental-utils/src/index.ts index 93b3831817c7..137aa956cfcb 100644 --- a/packages/experimental-utils/src/index.ts +++ b/packages/experimental-utils/src/index.ts @@ -6,9 +6,15 @@ export { ESLintUtils, TSESLint, TSESLintScope }; // for convenience's sake - export the types directly from here so consumers // don't need to reference/install both packages in their code + +// NOTE - this uses hard links inside ts-estree to avoid initing the entire package +// via its main file (which imports typescript at runtime). +// Not every eslint-plugin written in typescript requires typescript at runtime. export { AST_NODE_TYPES, AST_TOKEN_TYPES, - ParserServices, TSESTree, -} from '@typescript-eslint/typescript-estree'; +} from '@typescript-eslint/typescript-estree/dist/ts-estree'; +export { + ParserServices, +} from '@typescript-eslint/typescript-estree/dist/parser-options'; 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