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

feat: split types into their own package #2229

Merged
merged 1 commit into from Jun 25, 2020
Merged

Conversation

bradzacher
Copy link
Member

@bradzacher bradzacher commented Jun 19, 2020

As part of the scope analysis work, I want to remove its runtime dependency on typescript-estree, so it doesn't need to depend on typescript.

This moves the following to a new package, @typescript-eslint/types:

  • AST_NODE_TYPES
  • AST_TOKEN_TYPES
  • TSESTree (aka the types for the typescript-estree AST)
  • ParserOptions (moved out of experimental-utils)

This has the added bonus of getting us very close to removing the need for parser to depend on experimental-utils, which will reduce its dependency tree significantly.

@bradzacher bradzacher added the refactor PRs that refactor code only label Jun 19, 2020
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@codecov
Copy link

codecov bot commented Jun 19, 2020

Codecov Report

Merging #2229 into master will decrease coverage by 0.16%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##           master    #2229      +/-   ##
==========================================
- Coverage   93.46%   93.29%   -0.17%     
==========================================
  Files         174      173       -1     
  Lines        7953     7788     -165     
  Branches     2282     2284       +2     
==========================================
- Hits         7433     7266     -167     
- Misses        246      247       +1     
- Partials      274      275       +1     
Flag Coverage Δ
#unittest 93.29% <91.66%> (-0.17%) ⬇️
Impacted Files Coverage Δ
...-internal/src/rules/no-typescript-estree-import.ts 87.50% <77.77%> (-12.50%) ⬇️
.../experimental-utils/src/ts-eslint/ParserOptions.ts 100.00% <100.00%> (ø)
packages/parser/src/analyze-scope.ts 95.14% <100.00%> (+0.01%) ⬆️
packages/parser/src/scope/scope-manager.ts 100.00% <100.00%> (ø)
packages/parser/src/scope/scopes.ts 100.00% <100.00%> (ø)
...pt-estree/src/ts-estree/estree-to-ts-node-types.ts 100.00% <100.00%> (ø)
packages/typescript-estree/src/ts-estree/index.ts 100.00% <100.00%> (ø)

As part of the scope analysis work, I want to remove its runtime dependency on `typescript-estree`, so it doesn't need to depend on `typescript`.
It only needs a few pieces from the package; AST_NODE_TYPES, and the visitor keys.

This moves the following the to a new package, `@typescript-eslint/types`:
- `AST_NODE_TYPES`
- `AST_TOKEN_TYPES`
- `TSESTree` (aka the types for the typescript-estree AST)
- `ParserOptions` (moved out of `experimental-utils`)

This has the added bonus of getting us very close to removing the need for `parser` to depend on `experimental-utils`, which will reduce its dependency tree significantly.
@bradzacher bradzacher merged commit 5f45918 into master Jun 25, 2020
@bradzacher bradzacher deleted the add-package-types branch June 25, 2020 00:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
refactor PRs that refactor code only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant