Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

refactor(ts-estree): add types to converter #156

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

Merged
merged 27 commits into from
Feb 3, 2019
Merged

refactor(ts-estree): add types to converter #156

merged 27 commits into from
Feb 3, 2019

Conversation

armano2
Copy link
Collaborator

@armano2 armano2 commented Jan 28, 2019

This is prototype of converter with types, with small improvement to performance (this is not goal of this PR).

Changes:

  • type checking of AST structure
  • reduces amount of calls for location data (location is calculated once per node)
  • provides easier way to support range compiler flag (its not supported yet)
  • remove old/unused estree definition files
  • migrates ParserOptions from temp-types-based-on-js-source.ts to parser-options.ts
...

before
Complex File: ts-estree x 238 ops/sec ±2.14% (86 runs sampled)
Simple File: ts-estree x 10,706 ops/sec ±3.19% (87 runs sampled)

after
Complex File: ts-estree x 262 ops/sec ±1.78% (84 runs sampled)
Simple File: ts-estree x 11,049 ops/sec ±3.26% (80 runs sampled)

@armano2 armano2 added the DO NOT MERGE PRs which should not be merged yet label Jan 28, 2019
@armano2 armano2 self-assigned this Jan 28, 2019
@codecov
Copy link

codecov bot commented Jan 28, 2019

Codecov Report

Merging #156 into master will decrease coverage by 0.14%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #156      +/-   ##
==========================================
- Coverage   95.82%   95.68%   -0.15%     
==========================================
  Files          51       51              
  Lines        2541     2458      -83     
  Branches      373      372       -1     
==========================================
- Hits         2435     2352      -83     
- Misses         63       65       +2     
+ Partials       43       41       -2
Impacted Files Coverage Δ
packages/typescript-estree/src/tsconfig-parser.ts 88.05% <ø> (ø) ⬆️
packages/typescript-estree/src/convert.ts 94.59% <ø> (-0.57%) ⬇️
packages/typescript-estree/src/ast-converter.ts 100% <100%> (ø) ⬆️
packages/typescript-estree/src/node-utils.ts 96.39% <100%> (-0.08%) ⬇️
packages/typescript-estree/src/parser.ts 91.3% <100%> (ø) ⬆️
packages/typescript-estree/src/convert-comments.ts 96% <100%> (-0.08%) ⬇️

@armano2 armano2 requested review from a team and removed request for JamesHenry and bradzacher January 28, 2019 21:52
@armano2 armano2 removed the DO NOT MERGE PRs which should not be merged yet label Jan 29, 2019
@bradzacher
Copy link
Member

we should really raise a separate PR to remove all of the JSDoc types from the codebase...

@JamesHenry
Copy link
Member

@armano2 On spectrum I believe you said this should wait until after #120 is merged. Is that still the case, or were you referring to something else?

@armano2
Copy link
Collaborator Author

armano2 commented Jan 30, 2019

both PR adds same file (ast structure), and they are not blocking each other.

On spectrum i was referring to different change :)

@armano2 armano2 changed the title refactor(ts-estree): prototype of typed converter refactor(ts-estree): add types to converter Jan 31, 2019
@armano2
Copy link
Collaborator Author

armano2 commented Feb 2, 2019

@bradzacher @JamesHenry i aligned types (typedefs.ts) from #120

packages/typescript-estree/src/convert.ts Outdated Show resolved Hide resolved
packages/typescript-estree/src/convert.ts Outdated Show resolved Hide resolved
@JamesHenry
Copy link
Member

I manually ran some real-world "benchmarks" by building from this PR and including it in a build of Prettier and running it on a real codebase (angular.io documentation website) and can confirm there are not any performance regressions/issues

@JamesHenry
Copy link
Member

Thanks for all the work on this!

@armano2 armano2 merged commit 773723b into typescript-eslint:master Feb 3, 2019
@armano2 armano2 deleted the prototype-types-estree branch February 3, 2019 20:32
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
Luckeu pushed a commit to Luckeu/typescript-eslint that referenced this pull request Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.