Skip to content

Add a prefix to Flow specific AST node type #9344

@fisker

Description

@fisker

Add a prefix to the type of Node.

  1. Avoid future conflicts with new ES syntax. Eg: we already support Match syntax, but there is a proposal ECMAScript Pattern Matching, once it reachs higher stage, most likly ESTree will use Pattern or Match as a prefix for these nodes.
  2. Prettier currently supports 330 types of node (exclude 8 from flow v0.294), sometimes it's hard to tell which node is from Flow, typescript-eslint prefixes the node with TS, and our Angular related node also use NG as a prefix, they are easy to identify.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions