-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
fix(configuration): deprecate trailingComma
in favor of trailingCommas
#2492
Conversation
102737d
to
3213de3
Compare
✅ Deploy Preview for biomejs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
3213de3
to
6b2b104
Compare
CodSpeed Performance ReportMerging #2492 will not alter performanceComparing Summary
|
javascript.trailingComma
in favor of javascript.traiilingCommas
javascript.trailingComma
in favor of javascript.trailingCommas
6b2b104
to
3b59a05
Compare
@Sec-ant sorry, I missed that you wanted to know how to deprecate an option. Overall it looks good. To create a warning, we usually do it via migration. Here's an example of |
Don't be sorry, I was planning to dig a little deeper, and thanks for the tips. But unfortunately I'm a little occupied these days. Still trying to figure out a way to better balance the time here and in my real life. |
4f07426
to
2a6fd20
Compare
2a6fd20
to
ad6c2e6
Compare
What's left for this PR to land? Happy to help |
TLDR, this PR now is not backward compatible, because I changed all the test cases to use When I first created this PR I was trying to find a solution to map both the From what you suggested on how we handled |
So, configuration wise (biome.json and CLI), we will create a new field/option, the one that you want to create. Then, when we do the deserialization to Workspace settings is an internal type, this means that we can rename it without repercussions. Sure, users might have the two options at the same time, and we could create an error/warning, but we can do it later. |
ad6c2e6
to
1ba66d6
Compare
javascript.trailingComma
in favor of javascript.trailingCommas
trailingComma
in favor of trailingCommas
ab61546
to
f82ad61
Compare
f82ad61
to
eb4cfc2
Compare
Summary
Attempt to address this #1948 (comment).
trailingCommas
) instead of the old one, so there're many snapshot updates.indentSize
. For example, when--indent-size
and--indent-width
are both provided, the code lacks the logic to prioritize--indent-width
over--indent-size
. I also fixed them in this PR."trailingComma"
node matches the path["javascript", "formatter", "trailingComma"]
. I also updated theindentSize
migration rule to use this function.indentSize
, I updated them to useindentWidth
.Indent size
row from therage
output.indentSize
.Test Plan
I added test cases to ensure the old name is still functional in CLI mode, and both of the old and new names are valid configurations.