From 706640d6ddbbdc58bba413a7b62f4ad682aa4daa Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Wed, 19 Apr 2017 18:04:47 +0200 Subject: [PATCH] Optimize `prettier --help` for humans (#1340) --- bin/prettier.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/bin/prettier.js b/bin/prettier.js index 41aa0c96e..dc8547422 100755 --- a/bin/prettier.js +++ b/bin/prettier.js @@ -182,24 +182,21 @@ if (argv["help"] || (!filepatterns.length && !stdin)) { "Usage: prettier [opts] [filename ...]\n\n" + "Available options:\n" + " --write Edit the file in-place. (Beware!)\n" + - " --list-different or -l Print filenames of files that are different from prettier formatting\n" + + " --list-different or -l Print filenames of files that are different from Prettier formatting.\n" + " --stdin Read input from stdin.\n" + " --print-width Specify the length of line that the printer will wrap on. Defaults to 80.\n" + " --tab-width Specify the number of spaces per indentation-level. Defaults to 2.\n" + - " --use-tabs Indent lines with tabs instead of spaces. Defaults to false.\n" + - " --no-semi Do not print semicolons, except at the beginning of lines which may need them. Defaults to false.\n" + - " --single-quote Use single quotes instead of double.\n" + - " --bracket-spacing Put spaces between brackets. Defaults to true.\n" + - " --jsx-bracket-same-line Put > on the last line. Defaults to false.\n" + + " --use-tabs Indent lines with tabs instead of spaces.\n" + + " --no-semi Do not print semicolons, except at the beginning of lines which may need them.\n" + + " --single-quote Use single quotes instead of double quotes.\n" + + " --no-bracket-spacing Do not print spaces between brackets.\n" + + " --jsx-bracket-same-line Put > on the last line instead of at a new line.\n" + " --trailing-comma \n" + " Print trailing commas wherever possible. Defaults to none.\n" + " --parser Specify which parse to use. Defaults to babylon.\n" + - " --color Colorize error messages. Defaults to true.\n" + - " --version or -v Print prettier version.\n" + - "\n" + - "Boolean options can be turned off like this:\n" + - " --no-bracket-spacing\n" + - " --bracket-spacing=false" + " --no-color Do not colorize error messages.\n" + + " --version or -v Print Prettier version.\n" + + "\n" ); process.exit(argv["help"] ? 0 : 1); }