-
-
Notifications
You must be signed in to change notification settings - Fork 496
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(ast): rename serialized fields to camel case #2566
fix(ast): rename serialized fields to camel case #2566
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @overlookmotel and the rest of your teammates on Graphite |
@ArnaudBarre Was there a reason why you didn't do these already in #2522? ( |
CodSpeed Performance ReportMerging #2566 will not alter performanceComparing Summary
|
I didn't include this one because I think tailing comma part of ESTree and I let discussing skip vs camelCase for later |
Ah I see. Well maybe they should be skipped. But regardless of whether they're in ESTree or not, I think it's better all properties in JSON AST are camelCase - snake_case would be unexpected to JS users. |
Yeah this could be added to all nodes for potential future field if the cost is 0, if there is a small cost I think this is fine adding it when needed |
I don't think there's any runtime cost to field renaming, as the serializers are built at compile-time. Maybe yes we should add to all AST structs. |
Fixes a few more AST fields names which are currently snake case in serialized JSON.
Fixes a few more AST fields names which are currently snake case in serialized JSON.