-
-
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.
Description
Prettier 2.2.0
Playground link
--parser babelInput:
module.exports = class A extends B {
method () {
console.log("foo");
}
};Output:
module.exports = class A extends (
B
) {
method() {
console.log("foo");
}
};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.
Ayfri, AurelienRibon and jobsteven
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.