Wrong error message: SyntaxError: Cannot read property 'type' of undefined (0:0)
#9226
Labels
lang:javascript
Issues affecting JS
locked-due-to-inactivity
Please open a new issue and fill out the template instead of commenting.
scope:dependency
Issues that cannot be solved inside Prettier itself, and must be fixed in a dependency
type:bug
Issues identifying ugly output, or a defect in the program
Environments:
Steps to reproduce:
Expected behavior:
SyntaxError: setter must have exactly one formal parameter (2:3)
is expected.npx prettier@1.18.2 sample.js
Actual behavior:
npx prettier@2.1.2 sample.js
FYI
It looks babel/parser throws right error but Prettier fails to parse the babel/parser error. may be.
npx @babel/parser sample.js
Thank you
The text was updated successfully, but these errors were encountered: