Skip to content
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

Prettier configuration changed #160

Merged
merged 6 commits into from
Nov 3, 2024
Merged

Prettier configuration changed #160

merged 6 commits into from
Nov 3, 2024

Conversation

AtibQur
Copy link
Contributor

@AtibQur AtibQur commented Oct 31, 2024

No description provided.

package.json Outdated
@@ -10,7 +10,7 @@
"typescript": "^5.2.2"
},
"prettier": {
"trailingComma": "all",
"trailingComma": "none",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to only remove the trailing commas for functions, but not on objects or arrays? I would like to minimize the impact on the repo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no option for that with prettier. You can only set trailing commas for "all", "es5" or "none".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see what is the impact of es5. The objective is to remove trailing commas in function calls, since it's really confusing and sloppy. If es5 does not do what we want we can use none

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"es5" keeps trailing commas for objects and arrays, but does not add them for function parameters.
I think "none" is the closest to what we want.

Copy link
Member

@alexp-sssup alexp-sssup Nov 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"es5" keeps trailing commas for objects and arrays, but does not add them for function parameters.

This seems pretty much what I want

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah than I misunderstood! I'll be fixing it right now

@AtibQur AtibQur requested review from alexp-sssup and removed request for alexp-sssup November 2, 2024 14:54
@alexp-sssup alexp-sssup merged commit b4a7101 into main Nov 3, 2024
9 checks passed
@alexp-sssup alexp-sssup deleted the prettier-conf branch November 3, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants