Skip to content

Commit 951860d

Browse files
authored
fix(rstack): align CLI help messages (#324)
1 parent 95dd081 commit 951860d

9 files changed

Lines changed: 16 additions & 14 deletions

File tree

packages/rstack/src/cli/commands.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { hasHelpFlag, renderHelp } from './help.ts';
55

66
const renderRootHelp = (): string =>
77
renderHelp({
8-
usage: 'rs [command] [...options]',
8+
usage: 'rs [command] [options]',
99
sections: [
1010
{
1111
title: 'Commands',
@@ -48,6 +48,7 @@ const renderCheckHelp = (): string =>
4848
title: 'Options',
4949
items: [
5050
['--type-check', 'Enable TypeScript type checking'],
51+
['-c, --config <path>', 'Specify Rstack config file path'],
5152
['-h, --help', 'Display this help message'],
5253
],
5354
},
@@ -182,10 +183,7 @@ const renderDocEjectHelp = (): string =>
182183
sections: [
183184
{
184185
title: 'Options',
185-
items: [
186-
['-c, --config <path>', 'Specify Rstack config file path'],
187-
['-h, --help', 'Display this help message'],
188-
],
186+
items: [['-h, --help', 'Display this help message']],
189187
},
190188
],
191189
});

packages/rstack/src/fmt/cli.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const renderFmtHelp = (): string =>
4646
['--with-node-modules', 'Process files inside node_modules'],
4747
['--parallel-workers <count>', 'Number of parallel workers'],
4848
['--stdin-filepath <path>', 'Format stdin as if it were saved at <path>'],
49+
['-c, --config <path>', 'Specify Rstack config file path'],
4950
['-h, --help', 'Display this help message'],
5051
],
5152
},

packages/rstack/src/setup/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { installHooks } from './install.ts';
66
const renderSetupHelp = (): string =>
77
renderHelp({
88
usage: 'rs setup [options]',
9-
description: 'Install Git hooks in the current repository.',
9+
description: 'Install Git hooks in the current repository',
1010
sections: [
1111
{
1212
title: 'Options',

packages/rstack/src/staged.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ const renderStagedHelp = (): string =>
3636
],
3737
['--cwd <path>', 'Working directory to run all tasks in'],
3838
['-d, --debug', 'Print additional debug information'],
39-
['--no-stash', 'Disable the backup stash. Implies "--no-revert".'],
39+
['--no-stash', 'Disable backup stash and automatic revert'],
4040
['-q, --quiet', "Disable lint-staged's own console output"],
4141
['-r, --relative', 'Pass relative filepaths to tasks'],
4242
[
4343
'-v, --verbose',
4444
'Show task output even when tasks succeed; by default only failed output is shown',
4545
],
46+
['-c, --config <path>', 'Specify Rstack config file path'],
4647
['-h, --help', 'Display this help message'],
4748
],
4849
},

packages/rstack/tests/cli/__snapshots__/check.test.ts.snap

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ Usage:
99
Run static checks, including lint and format
1010
1111
Options:
12-
--type-check Enable TypeScript type checking
13-
-h, --help Display this help message
12+
--type-check Enable TypeScript type checking
13+
-c, --config <path> Specify Rstack config file path
14+
-h, --help Display this help message
1415
"
1516
`;

packages/rstack/tests/cli/__snapshots__/help.test.ts.snap

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ Usage:
5959
Eject a theme component
6060
6161
Options:
62-
-c, --config <path> Specify Rstack config file path
63-
-h, --help Display this help message
62+
-h, --help Display this help message
6463
"
6564
`;
6665
@@ -340,7 +339,7 @@ exports[`displays top-level help 1`] = `
340339
"Rstack v<version>
341340
342341
Usage:
343-
$ rs [command] [...options]
342+
$ rs [command] [options]
344343
345344
Commands:
346345
dev Run the app dev server

packages/rstack/tests/cli/fmt/__snapshots__/files.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Options:
2020
--with-node-modules Process files inside node_modules
2121
--parallel-workers <count> Number of parallel workers
2222
--stdin-filepath <path> Format stdin as if it were saved at <path>
23+
-c, --config <path> Specify Rstack config file path
2324
-h, --help Display this help message
2425
"
2526
`;

packages/rstack/tests/cli/setup/__snapshots__/index.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exports[`displays setup help 1`] = `
66
Usage:
77
$ rs setup [options]
88
9-
Install Git hooks in the current repository.
9+
Install Git hooks in the current repository
1010
1111
Options:
1212
--hooks-dir <path> Specify hooks directory relative to the Git repository root

packages/rstack/tests/cli/staged/__snapshots__/index.test.ts.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ Options:
1313
-p, --concurrent <number|boolean> The number of tasks to run concurrently, or false for serial
1414
--cwd <path> Working directory to run all tasks in
1515
-d, --debug Print additional debug information
16-
--no-stash Disable the backup stash. Implies "--no-revert".
16+
--no-stash Disable backup stash and automatic revert
1717
-q, --quiet Disable lint-staged's own console output
1818
-r, --relative Pass relative filepaths to tasks
1919
-v, --verbose Show task output even when tasks succeed; by default only failed output is shown
20+
-c, --config <path> Specify Rstack config file path
2021
-h, --help Display this help message
2122
"
2223
`;

0 commit comments

Comments
 (0)