Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(experimental-utils): Avoid typescript import at runtime #584

Merged
merged 1 commit into from Jun 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/experimental-utils/src/index.ts
Expand Up @@ -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';