prettier/tests_integration/__tests__/__snapshots__/early-exit.js.snap

136 lines
7.0 KiB
Plaintext
Raw Normal View History

2017-09-03 16:31:33 +03:00
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`show usage with --help 1`] = `
"Usage: prettier [opts] [filename ...]
2017-09-10 08:37:21 +03:00
Command options:
--find-config-path <path>
Finds and prints the path to a configuration file for a given input file.
--help or -h Show help.
--list-different or -l Print filenames of files that are different from Prettier formatting.
--version or -v Print Prettier version.
--write Edit the file in-place. (Beware!)
2017-09-08 11:52:09 +03:00
Format options:
2017-09-03 16:31:33 +03:00
--jsx-bracket-same-line Put > on the last line instead of at a new line.
2017-09-07 08:39:39 +03:00
--no-bracket-spacing Do not print spaces between brackets.
--no-semi Do not print semicolons, except at the beginning of lines which may need them.
2017-09-03 16:31:33 +03:00
--parser <flow|babylon|typescript|postcss|json|graphql>
Specify which parse to use. Defaults to babylon.
2017-09-07 08:39:39 +03:00
--print-width <int> Specify the length of line that the printer will wrap on. Defaults to 80.
2017-09-03 16:31:33 +03:00
--range-end <int> Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement.
This option cannot be used with --cursor-offset.
Defaults to Infinity.
2017-09-07 08:39:39 +03:00
--range-start <int> Format code starting at a given character offset.
The range will extend backwards to the start of the first line containing the selected statement.
This option cannot be used with --cursor-offset.
Defaults to 0.
--single-quote Use single quotes instead of double quotes.
--tab-width <int> Specify the number of spaces per indentation-level. Defaults to 2.
--trailing-comma <none|es5|all>
Print trailing commas wherever possible when multi-line. Defaults to none.
--use-tabs Indent lines with tabs instead of spaces.
2017-09-08 11:52:09 +03:00
2017-09-10 08:45:18 +03:00
Config options:
--config <path> Path to a prettier configuration file (.prettierrc, package.json, prettier.config.js).
--config-precedence <cli-override|file-override|prefer-file>
Defines how config file should be evaluated in combination of CLI options
cli-override | default config => config file => CLI options
file-override | default config => CLI options => config file
prefer-file | default config => config file (if config file is found) or
default config => CLI options (if no config file is found)
Defaults to cli-override
--ignore-path <path> Path to a file containing patterns that describe files to ignore.
Defaults to ./.prettierignore.
--no-config Do not look for a configuration file.
--with-node-modules Process files inside 'node_modules' directory.
2017-09-10 08:37:21 +03:00
Other options:
2017-09-08 11:52:09 +03:00
--cursor-offset <int> Print (to stderr) where a cursor at the given position would move to after formatting.
This option cannot be used with --range-start and --range-end
--no-color Do not colorize error messages.
--stdin Read input from stdin.
--stdin-filepath <path> Path to the file used to read from stdin.
2017-09-03 16:31:33 +03:00
"
`;
2017-09-09 06:49:22 +03:00
exports[`throw error and show usage with something unexpected 1`] = `
"Usage: prettier [opts] [filename ...]
2017-09-10 08:37:21 +03:00
Command options:
--find-config-path <path>
Finds and prints the path to a configuration file for a given input file.
--help or -h Show help.
--list-different or -l Print filenames of files that are different from Prettier formatting.
--version or -v Print Prettier version.
--write Edit the file in-place. (Beware!)
2017-09-09 06:49:22 +03:00
Format options:
--jsx-bracket-same-line Put > on the last line instead of at a new line.
--no-bracket-spacing Do not print spaces between brackets.
--no-semi Do not print semicolons, except at the beginning of lines which may need them.
--parser <flow|babylon|typescript|postcss|json|graphql>
Specify which parse to use. Defaults to babylon.
--print-width <int> Specify the length of line that the printer will wrap on. Defaults to 80.
--range-end <int> Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement.
This option cannot be used with --cursor-offset.
Defaults to Infinity.
--range-start <int> Format code starting at a given character offset.
The range will extend backwards to the start of the first line containing the selected statement.
This option cannot be used with --cursor-offset.
Defaults to 0.
--single-quote Use single quotes instead of double quotes.
--tab-width <int> Specify the number of spaces per indentation-level. Defaults to 2.
--trailing-comma <none|es5|all>
Print trailing commas wherever possible when multi-line. Defaults to none.
--use-tabs Indent lines with tabs instead of spaces.
2017-09-10 08:45:18 +03:00
Config options:
--config <path> Path to a prettier configuration file (.prettierrc, package.json, prettier.config.js).
--config-precedence <cli-override|file-override|prefer-file>
Defines how config file should be evaluated in combination of CLI options
cli-override | default config => config file => CLI options
file-override | default config => CLI options => config file
prefer-file | default config => config file (if config file is found) or
default config => CLI options (if no config file is found)
Defaults to cli-override
--ignore-path <path> Path to a file containing patterns that describe files to ignore.
Defaults to ./.prettierignore.
--no-config Do not look for a configuration file.
--with-node-modules Process files inside 'node_modules' directory.
2017-09-10 08:37:21 +03:00
Other options:
2017-09-09 06:49:22 +03:00
--cursor-offset <int> Print (to stderr) where a cursor at the given position would move to after formatting.
This option cannot be used with --range-start and --range-end
--no-color Do not colorize error messages.
--stdin Read input from stdin.
--stdin-filepath <path> Path to the file used to read from stdin.
"
`;
exports[`throw error and show usage with something unexpected 2`] = `""`;
2017-09-03 16:31:33 +03:00
exports[`throw error with --find-config-path + multiple files 1`] = `
"Cannot use --find-config-path with multiple files
"
`;
exports[`throw error with --write + --debug-check 1`] = `
"Cannot use --write and --debug-check together.
"
`;