-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!Code is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!
Description
Prettier 3.2.0
Playground link
--parser typescriptInput:
test()
.test2()
.test2(thing?.something);Output:
TypeError: Cannot read properties of undefined (reading 'type')
at Jn (https://prettier.io/lib/plugins/estree.js:7:16595)
at be (https://prettier.io/lib/plugins/estree.js:9:605)
at be (https://prettier.io/lib/plugins/estree.js:10:289)
at https://prettier.io/lib/plugins/estree.js:36:14282
at Array.every (<anonymous>)
at https://prettier.io/lib/plugins/estree.js:36:14273
at Array.some (<anonymous>)
at Oi (https://prettier.io/lib/plugins/estree.js:36:14252)
at Kr (https://prettier.io/lib/plugins/estree.js:36:14852)
at Ta (https://prettier.io/lib/plugins/estree.js:36:58423)Expected output:
Not exactly sure, it's an error.
Why?
This was not an error in 3.1.x.
sosukesuzuki, derekcicerone, hhollenstain, kachkaev, estrudels and 2 more
Metadata
Metadata
Assignees
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!Code is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!