AssignmentExpression with ClassExpression are systematically wrapped regardless of length #9740
Labels
lang:javascript
Issues affecting JS
locked-due-to-inactivity
Please open a new issue and fill out the template instead of commenting.
type:bug
Issues identifying ugly output, or a defect in the program
Prettier 2.2.0
Playground link
Input:
Output:
Expected behavior:
The input should not be modified by Prettier when the superclass name is of reasonable length and/or does not have any namespaces. This behavior was changed in Prettier 2.2.0 and is probably caused by this new feature which was implemented in #9341. The intent was to wrap assignments with long superclass names when using the Google Closure library for example. However, it applies to everything, even if the superclass name is a single letter. This seems to do more harm than good on code readability.
The text was updated successfully, but these errors were encountered: