AST Runner failed on filepath
Closed this issue · 2 comments
I'm testing out this package to get stats on the design system I'm managing and I'm getting a ton of AST Runner failed on filepath: [file path]
messages. I'm still getting a JSON dump at the end but it's very light. I also noticed that some of the files that failed do contain references to the package I'm searching for so it's not just a not found error.
The code I'm inspecting is React + TypeScript.
Any ideas how I can make this work better?
As I'm investigating more, it's looking like it's not parsing files that are using mobx-react
in its ESNext syntax with decorators. E.g.
// ---- ESNext syntax with decorators ----
@observer
class TodoView extends React.Component {
render() {
return <div>{this.props.todo.title}</div>
}
}
It seems to work fine with files using their ES6 syntax.
Ah – I'll add typescript support soon. :)
Right now there's no way to customize the parser being used, but I can add a flag for --parser=typescript