|
| 1 | +// Jest Snapshot v1, https://goo.gl/fbAQLP |
| 2 | + |
| 3 | +exports[`show usage with --help (stderr) 1`] = `""`; |
| 4 | + |
| 5 | +exports[`show usage with --help (stdout) 1`] = ` |
| 6 | +" |
| 7 | + prettier 3.3.3 |
| 8 | + |
| 9 | + USAGE |
| 10 | + |
| 11 | + prettier [file/dir/glob...] [options] |
| 12 | + prettier "src/**/*.js" --check |
| 13 | + prettier "src/**/*.js" -l --no-cache |
| 14 | + prettier "src/**/*.js" --write --no-parallel |
| 15 | + prettier ./path/to/target/file.js --cache-location ./path/to/cache/file.json |
| 16 | + |
| 17 | + ARGUMENTS |
| 18 | + |
| 19 | + [file/dir/glob...] Files, directories or globs to format |
| 20 | + |
| 21 | + OUTPUT OPTIONS |
| 22 | + |
| 23 | + --check, -c Check if the given files are formatted, print a human-friendly summary (see also --list-different) |
| 24 | + --list-different, -l Print the names of files that are different from Prettier's formatting (see also --check) |
| 25 | + --write, -w Edit files in-place (Beware!) |
| 26 | + |
| 27 | + FORMAT OPTIONS |
| 28 | + |
| 29 | + --arrow-parens <always|avoid> |
| 30 | + Include parentheses around a sole arrow function parameter |
| 31 | + Defaults to "always" |
| 32 | + --bracket-same-line Put ">" of opening tags on the last line instead of on a new line |
| 33 | + Defaults to "false" |
| 34 | + --no-bracket-spacing Do not print spaces between brackets |
| 35 | + Defaults to "true" |
| 36 | + --embedded-language-formatting <auto|off> |
| 37 | + Control how Prettier formats quoted code embedded in the file |
| 38 | + Defaults to "auto" |
| 39 | + --end-of-line <lf|crlf|cr|auto> |
| 40 | + Which end of line characters to apply |
| 41 | + Defaults to "lf" |
| 42 | + --experimental-ternaries |
| 43 | + Use curious ternaries, with the question mark after the condition |
| 44 | + Defaults to "false" |
| 45 | + --html-whitespace-sensitivity <css|strict|ignore> |
| 46 | + How to handle whitespaces in HTML |
| 47 | + Defaults to "css" |
| 48 | + --jsx-single-quote Use single quotes in JSX |
| 49 | + Defaults to "false" |
| 50 | + --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc> |
| 51 | + Which parser to use |
| 52 | + --print-width <int> The line length where Prettier will try wrap |
| 53 | + Defaults to "80" |
| 54 | + --prose-wrap <always|never|preserve> |
| 55 | + How to wrap prose |
| 56 | + Defaults to "preserve" |
| 57 | + --quote-props <as-needed|consistent|preserve> |
| 58 | + Change when properties in objects are quoted |
| 59 | + Defaults to "as-needed" |
| 60 | + --no-semi Do not print semicolons, except at the beginning of lines which may need them |
| 61 | + Defaults to "true" |
| 62 | + --single-attribute-per-line |
| 63 | + Enforce single attribute per line in HTML, Vue and JSX |
| 64 | + Defaults to "false" |
| 65 | + --single-quote Use single quotes instead of double quotes |
| 66 | + Defaults to "false" |
| 67 | + --tab-width <int> Number of spaces per indentation level |
| 68 | + Defaults to "2" |
| 69 | + --trailing-comma <all|es5|none> |
| 70 | + Print trailing commas wherever possible when multi-line |
| 71 | + Defaults to "all" |
| 72 | + --use-tabs Indent with tabs instead of spaces |
| 73 | + Defaults to "false" |
| 74 | + --vue-indent-script-and-style |
| 75 | + Indent script and style tags in Vue files |
| 76 | + Defaults to "false" |
| 77 | + |
| 78 | + CONFIG OPTIONS |
| 79 | + |
| 80 | + --no-config Do not look for a configuration file |
| 81 | + --config-path <path> Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js) |
| 82 | + --config-precedence <cli-override|file-override> |
| 83 | + Define in which order config files and CLI options should be evaluated. |
| 84 | + Defaults to "cli-override" |
| 85 | + --no-editorconfig Don't take .editorconfig into account when parsing configuration |
| 86 | + --no-ignore Do not look for an ignore file |
| 87 | + --ignore-path <path...> Path to a file with patterns describing files to ignore |
| 88 | + Multiple values are accepted |
| 89 | + Defaults to [.gitignore, .prettierignore] |
| 90 | + --plugin <package...> Add a plugin |
| 91 | + Multiple plugins are accepted |
| 92 | + Defaults to [] |
| 93 | + --with-node-modules Process files inside the "node_modules" directory |
| 94 | + |
| 95 | + EDITOR OPTIONS |
| 96 | + |
| 97 | + --cursor-offset <int> Print (to stderr) where a cursor at the given position would move to after formatting |
| 98 | + Defaults to "-1" |
| 99 | + --range-end <int> Format code ending at a given character offset (exclusive) |
| 100 | + The range will extend forwards to the end of the selected statement |
| 101 | + Defaults to "Infinity" |
| 102 | + --range-start <int> Format code starting at a given character offset |
| 103 | + The range will extend backwards to the start of the first line containing the selected statement |
| 104 | + Defaults to "0" |
| 105 | + |
| 106 | + OTHER OPTIONS |
| 107 | + |
| 108 | + --help Display help for the command |
| 109 | + --version, -v Display the version number |
| 110 | + --no-cache Do not use the built-in caching mechanism |
| 111 | + --cache-location <path> Path to the cache file |
| 112 | + --no-color Do not colorize output messages |
| 113 | + --no-error-on-unmatched-pattern |
| 114 | + Prevent errors when pattern is unmatched |
| 115 | + --ignore-unknown, -u Ignore unknown files |
| 116 | + --insert-pragma Insert @format pragma into file's first docblock comment |
| 117 | + Defaults to "false" |
| 118 | + --log-level <silent|error|warn|log|debug> |
| 119 | + What level of logs to report |
| 120 | + Defaults to "log" |
| 121 | + --no-parallel Process files in parallel |
| 122 | + Defaults to "true" |
| 123 | + --parallel-workers <int> Number of parallel workers to use |
| 124 | + Defaults to "0" |
| 125 | + --require-pragma Require either "@prettier" or "@format" to be present in the file's first docblock comment in order for it to be formatted |
| 126 | + Defaults to "false" |
| 127 | + --stdin-filepath <path> Path to the file to pretend that stdin comes from |
| 128 | + " |
| 129 | +`; |
| 130 | +
|
| 131 | +exports[`show usage with --help (write) 1`] = `[]`; |
| 132 | +
|
| 133 | +exports[`show version with --version (stderr) 1`] = `""`; |
| 134 | +
|
| 135 | +exports[`show version with --version (write) 1`] = `[]`; |
| 136 | +
|
| 137 | +exports[`throw error with --check + --list-different (stderr) 1`] = ` |
| 138 | +" |
| 139 | + Incompatible options: "check" and "list-different" cannot be used together |
| 140 | +" |
| 141 | +`; |
| 142 | +
|
| 143 | +exports[`throw error with --check + --list-different (stdout) 1`] = `""`; |
| 144 | +
|
| 145 | +exports[`throw error with --check + --list-different (write) 1`] = `[]`; |
| 146 | +
|
| 147 | +exports[`throw error with --check + --write (stderr) 1`] = ` |
| 148 | +" |
| 149 | + Incompatible options: "check" and "write" cannot be used together |
| 150 | +" |
| 151 | +`; |
| 152 | +
|
| 153 | +exports[`throw error with --check + --write (stdout) 1`] = `""`; |
| 154 | +
|
| 155 | +exports[`throw error with --check + --write (write) 1`] = `[]`; |
| 156 | +
|
| 157 | +exports[`throw error with --list-different + --write (stderr) 1`] = ` |
| 158 | +" |
| 159 | + Incompatible options: "list-different" and "write" cannot be used together |
| 160 | +" |
| 161 | +`; |
| 162 | +
|
| 163 | +exports[`throw error with --list-different + --write (stdout) 1`] = `""`; |
| 164 | +
|
| 165 | +exports[`throw error with --list-different + --write (write) 1`] = `[]`; |
| 166 | +
|
| 167 | +exports[`throw error with something unexpected (stderr) 1`] = ` |
| 168 | +" |
| 169 | + Expected at least one target file/dir/glob |
| 170 | +" |
| 171 | +`; |
| 172 | +
|
| 173 | +exports[`throw error with something unexpected (stdout) 1`] = `""`; |
| 174 | +
|
| 175 | +exports[`throw error with something unexpected (write) 1`] = `[]`; |
| 176 | +
|
| 177 | +exports[`throw unsupported error with --file-info (stderr) 1`] = ` |
| 178 | +" |
| 179 | + The "--file-info" option is not currently supported, please open an issue on GitHub if you need it |
| 180 | +" |
| 181 | +`; |
| 182 | +
|
| 183 | +exports[`throw unsupported error with --file-info (stdout) 1`] = `""`; |
| 184 | +
|
| 185 | +exports[`throw unsupported error with --file-info (write) 1`] = `[]`; |
| 186 | +
|
| 187 | +exports[`throw unsupported error with --find-config-path (stderr) 1`] = ` |
| 188 | +" |
| 189 | + Unknown option: "find-config-path" |
| 190 | +" |
| 191 | +`; |
| 192 | +
|
| 193 | +exports[`throw unsupported error with --find-config-path (stdout) 1`] = `""`; |
| 194 | +
|
| 195 | +exports[`throw unsupported error with --find-config-path (write) 1`] = `[]`; |
| 196 | +
|
| 197 | +exports[`throw unsupported error with --support-info (stderr) 1`] = ` |
| 198 | +" |
| 199 | + The "--support-info" option is not currently supported, please open an issue on GitHub if you need it |
| 200 | +" |
| 201 | +`; |
| 202 | +
|
| 203 | +exports[`throw unsupported error with --support-info (stdout) 1`] = `""`; |
| 204 | +
|
| 205 | +exports[`throw unsupported error with --support-info (write) 1`] = `[]`; |
0 commit comments