Skip to content

Ugly object destructing and function #5928

@sourabhv

Description

@sourabhv

I updated to latest version of prettier today and prettier added these type of changes

-    reducer(state, { payload: { id, aspects } }) {
+    reducer(
+      state,
+      {
+        payload: { id, aspects },
+      }
+    ) {
-export default connect(mapStateToProps, mapDispatchToProps)(Account);
+export default connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(Account);

Which looks ugly, makes it harder to read (first one especially) and IMHO is kinda unnecessary.

Can we add an option to disable this if it's within printWidth?


Prettier RC:

---
singleQuote: true
trailingComma: es5

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.status:awaiting responseIssues that require answers to questions from maintainers before action can be taken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions