-
Notifications
You must be signed in to change notification settings - Fork 657
fix(rome_cli): remove unsupported options in the ci
help text
#3457
Conversation
✅ Deploy Preview for docs-rometools ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Good catch that the Does this change also fix the issue that
|
Didn't catch that.. Thanks for pointing that out! Will fix the issue here Edit:
|
This comment was marked as resolved.
This comment was marked as resolved.
crates/rome_cli/src/commands/help.rs
Outdated
"<Emphasis>"OPTIONS:"</Emphasis>" | ||
"<Dim>"--indent-style <tabs|space>"</Dim>" Change the indention character (default: tabs) | ||
"<Dim>"--indent-size <number>"</Dim>" If the indentation style is set to spaces, determine how many spaces should be used for indentation (default: 2) | ||
"<Dim>"--line-width <number>"</Dim>" Change how many characters the formatter is allowed to print in a single line (default: 80) | ||
"<Dim>"--quote-style <single|double>"</Dim>" Changes the quotation character for strings (default: \") | ||
"<Dim>"--quote-properties <as-needed|preserve>"</Dim>" Changes when properties in object should be quoted (default: as-needed) | ||
"<Dim>"--trailing-comma <all|es5>"</Dim>" Changes trailing commas in multi-line comma-separated syntactic structures (default: all) | ||
" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer it if we change FORMAT_OPTIONS
to only contain the markup for the format options (without the OPTIONS
header and then compose it in format
and rome ci
const FORMAT_OPTIONS: Markup = markup! {
"<Dim>"--indent-style <tabs|space>"</Dim>" Change the indention character (default: tabs)
"<Dim>"--indent-size <number>"</Dim>" If the indentation style is set to spaces, determine how many spaces should be used for indentation (default: 2)
"<Dim>"--line-width <number>"</Dim>" Change how many characters the formatter is allowed to print in a single line (default: 80)
"<Dim>"--quote-style <single|double>"</Dim>" Changes the quotation character for strings (default: \")
"<Dim>"--quote-properties <as-needed|preserve>"</Dim>" Changes when properties in object should be quoted (default: as-needed)
"<Dim>"--trailing-comma <all|es5>"</Dim>" Changes trailing commas in multi-line comma-separated syntactic structures (default: all)
}
"<Emphasis>"OPTIONS:"</Emphasis>" | |
"<Dim>"--indent-style <tabs|space>"</Dim>" Change the indention character (default: tabs) | |
"<Dim>"--indent-size <number>"</Dim>" If the indentation style is set to spaces, determine how many spaces should be used for indentation (default: 2) | |
"<Dim>"--line-width <number>"</Dim>" Change how many characters the formatter is allowed to print in a single line (default: 80) | |
"<Dim>"--quote-style <single|double>"</Dim>" Changes the quotation character for strings (default: \") | |
"<Dim>"--quote-properties <as-needed|preserve>"</Dim>" Changes when properties in object should be quoted (default: as-needed) | |
"<Dim>"--trailing-comma <all|es5>"</Dim>" Changes trailing commas in multi-line comma-separated syntactic structures (default: all) | |
" | |
"<Emphasis>"OPTIONS:"</Emphasis>" | |
{FORMAT_OPTIONS} | |
" |
and for rome_format
...
"<Emphasis>"OPTIONS:"</Emphasis>""
"<Dim>"--write"</Dim>" Edit the files in place (beware!) instead of printing the diff to the console
"<Dim>"--skip-errors"</Dim>" Skip over files containing syntax errors instead of emitting an error diagnostic.
{FORMAT_OPTIONS}
"<Dim>"--stdin-file-path <string>"</Dim>" A file name with its extension to pass when reading from standard in, e.g. echo 'let a;' | rome format --stdin-file-path file.js
};
This allows us to keep the format option documentation centralized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e5ab712 I tested the formatting of the help text
Brilliant. Thank you! |
Summary
Resolves 🐛
rome ci --help
prints unsupported options #3456Per
apply_format_settings_from_cli
tools/crates/rome_cli/src/commands/ci.rs
Line 10 in 745464f
rome ci
supports the following options:Test Plan
cargo run --bin rome ci --help
should print out the supported options