-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can the format of the chain call be consistent? #14733
Comments
Do you mean that method chain should break first rather than each argument and it's different from #7884? |
Answering "how", using a comment might help you as a workaround: Route
// Hey prettier, would you break here, please?
.put('/user/location-abc','User/ProfileController.updateLocation')
.middleware('auth') But probably, you want prettier to format as you suggested without workaround. (Though I'm interested in it, I don't intend to work on it as of now. Go ahead if someone want to work on it.) |
Oops, probably duplicated? #14628 |
Showing the method in several lines is ugly and I don't understand why the expected behavior is this way. And for different situations, it seems that there are different formatting strategies. If they can be consistent, it will seem easier to understand. |
Yes, I confirmed the duplicate, close this first. |
Prettier 2.8.7
Playground link
Input:
Output:
Expected behavior:
OR
The text was updated successfully, but these errors were encountered: