gohypergiant / react-component-hierarchy

A CLI app for visualizing how React components are structured in a project.
https://medium.com/bpxl-craft/introducing-react-component-hierarchy-35d5cc4d3782
MIT License
119 stars 25 forks source link

Show parsing errors #17

Open fhd opened 2 years ago

fhd commented 2 years ago

Description of Pull Request

I found this quite useful for debugging, but I suppose the errors were being swallowed for a reason, so it's behind an option.

Test Case (Optional)

Before and after this change, the following will simply output nothing:

echo '?' > invalid.jsx
node bin/rch.js invalid.jsx

But after this change, running node bin/rch.js -e invalid.jsx will show the actual parsing error.

Reviewer(s)

(Not sure who to add here)