Search code examples
abstract-syntax-treeeslint

Where can I view all the eslint ast node types?


There are many node types to detect, ie:

  • VariableDeclarator
  • FunctionExpression
  • MemberExpression
  • AssignmentExpression

The eslint website explains the rules but doesn't provide all of the available node type detections.

I found a tutorial example detecting IfStatement but this is not picking up my if statement, so wondering if I have a syntax error.


Solution

  • It's ok. The reason my ifstatement wasn't working was because i didn't have an if statement in the code I was testing.

    Regarding the reference to all the ast node types I found that too - https://github.com/estree/estree/blob/master/es5.md