-
-
Notifications
You must be signed in to change notification settings - Fork 377
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃搸 Deprecate the CLI option --indent-size
and create --indent-width
#89
Comments
--indent-size
and create --indent-with
--indent-size
and create --indent-width
I will try to do this |
Should I use/create a diagnostic struct for this? Where should I check the provided option? I'm thinking of doing based on #107 if you have any tips better. |
Yes, you'll have to create a new diagnostic. biome/crates/rome_cli/src/diagnostics.rs Lines 23 to 60 in ef3af45
You could create a generic
Yes that's right! |
Should I create an array to store all the deprecated arguments, in order to leave it generic for future uses? |
It's possible that in the future we don't deprecate an option for another, that's why a generic message is more future proof |
When I run the CLI command (cargo run --bin biome -- --help), it gives the following error: I'm using Windows. |
To run the CLI, do
|
I tested this command now, and it also gave the same error. |
Oh, I guess the previous windows users didn't use this command 馃様 not sure how to fix that, I don't use windows You can still write a test, they are very reliable, and we have many of them |
I'm sorry I didn't ask for this information sooner What would be the best or correct way to add this option? I tried putting it in the formatter configuration in the rome_service crate, but that breaks tests that apparently don't use the indent-size option through the CLI. I checked the deprecated option in the Is there anything I forgot to do or did wrong? |
That's the correct place. I'm not sure what you mean when tests break, maybe the best option is opening a draft PR so we can look a it, when code at hand. |
Explaining better: the way I used to check the indent-size option (very similar to #107) apparently takes the settings from the configuration file, which causes the diagnostic to be run even without pass the deprecated CLI option. If you still don't understand, I committed an early version (without tests) of what I tried to do, and I can make a draft pull request. |
I understand now. Still, it would be great to see some code, so I can better understand the implementation, and give suggestions. It's fine there aren't any tests, that's what draft PRs are also good for: get feedback |
I first thought this was a good idea. However, I am starting to wonder if it is still. Prettier and |
|
Description
--indent-width
CLI option;--indent-size
is provided;--indent-size
and--indent-width
are provided, and use the latter;The text was updated successfully, but these errors were encountered: