Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

chore(ts-estree): draft of estree structure (replacement for ESTreeNode)#137

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bradzacher merged 2 commits intotypescript-eslint:migrate-plugin-to-tsfromarmano2:es-tree-nodes
Jan 26, 2019

Conversation

armano2
Copy link
Collaborator

No description provided.

@armano2armano2 changed the titlechore(estree): draft of estree structure (replacement for ESTreeNode)chore(ts-estree): draft of estree structure (replacement for ESTreeNode)Jan 25, 2019
@armano2armano2 added the enhancementNew feature or request labelJan 25, 2019
@bradzacher
Copy link
Member

bradzacher commentedJan 25, 2019
edited
Loading

I started doing this by hand on my plugin types branch!

https://github.com/typescript-eslint/typescript-eslint/pull/120/files/e44fba51ff881b642a3a96232488c3380ffabf2b..9bfbb86125c1d7c4ebe200ef1adec6462f0673e8

I was going through each case 1-by-1 and mapping the types together, and mirroring the same names for reusable type groupings that Typescript uses:

typeBindingPattern=ArrayPattern|ObjectPattern;
typeBindingName=Identifier|BindingPattern;
typeExpression=null;// TODO - get lists from ts source and convert to estree nodes
typeForInitialiser=Expression|VariableDeclaration;
typeObjectLiteralElementLike=
|MethodDefinition
|Property
|RestElement
|SpreadElement
|TSAbstractMethodDefinition;
typeParameter=AssignmentPattern|RestElement|TSParameterProperty;
typePropertyName=Identifier|Literal;
typeStatement=null;// TODO - get lists from ts source and convert to estree nodes

It's probably better to use these generated types and do a manual pass overconvert.ts to make sure things match up

armano2 reacted with thumbs up emoji

@armano2
Copy link
CollaboratorAuthor

during generation i'm able to group nodes (i have functionality for this)

@bradzacher
Copy link
Member

That's awesome! But we'd have to go through the typescript AST to find out all of the reusable type groupings they use, then map those types in ESTree nodes. It's simple to do, but it's far from a trivial thing time-wise, so it's probably better left till after.

Anyways, we'd probably want to do a manual pass over these types to triple check they aren't missing anything from our conversion logic inconvert.ts.

armano2 reacted with thumbs up emoji

@armano2
Copy link
CollaboratorAuthor

this is first step, i have in plans to use types in converter itself

this PR is to your branch not to master

@bradzacher
Copy link
Member

I didn't notice that. Awesome, feel free to merge it in.
I'll reconcile the two lists, delete mine and keep plugging through the logic.
I'm about 1/3 of the way through.

@bradzacherbradzacher merged commita47e536 intotypescript-eslint:migrate-plugin-to-tsJan 26, 2019
@armano2armano2 deleted the es-tree-nodes branchJanuary 26, 2019 02:11
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsApr 21, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bradzacherbradzacherbradzacher approved these changes

Assignees
No one assigned
Labels
enhancementNew feature or request
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@armano2@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp