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 |
|
@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.