eslint-traverse
Create a sub-traversal of an AST node in your ESLint plugin
- Very fast
- Supports "Skipping" & "Stopping" (See below)
- Provides AST ancestor information for every node (Babel-style "Path" object)
Install
npm install --save eslint-traverse
Example
{ return { } }
Skipping
If you want to completely ignore a branch of the AST, without visiting any of its
children, you can return traverse.SKIP
from the visitor.
Stopping
If you want to stop the traversal completely, without visiting any more nodes
anywhere in the AST, you can return traversal.STOP
from the visitor.