Skip to content

Commit

Permalink
docs: improve verbose description
Browse files Browse the repository at this point in the history
  • Loading branch information
iiroj committed Apr 26, 2020
1 parent e749a0b commit 2c6f3ad
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ Options:
-r, --relative pass relative filepaths to tasks (default: false)
-x, --shell skip parsing of tasks for better shell support (default:
false)
-v, --verbose always show task output (default: false)
-h, --help output usage information
-v, --verbose show task output even when tasks succeed; by default only
failed output is shown (default: false)
-h, --help display help for command
```
- **`--allow-empty`**: By default, when linter tasks undo all staged changes, lint-staged will exit with an error and abort the commit. Use this flag to allow creating empty git commits.
Expand Down
6 changes: 5 additions & 1 deletion bin/lint-staged.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ cmdline
.option('-q, --quiet', 'disable lint-staged’s own console output', false)
.option('-r, --relative', 'pass relative filepaths to tasks', false)
.option('-x, --shell', 'skip parsing of tasks for better shell support', false)
.option('-v, --verbose', 'always show task output', false)
.option(
'-v, --verbose',
'show task output even when tasks succeed; by default only failed output is shown',
false
)
.parse(process.argv)

if (cmdline.debug) {
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function loadConfig(configPath) {
* @param {boolean} [options.relative] - Pass relative filepaths to tasks
* @param {boolean} [options.shell] - Skip parsing of tasks for better shell support
* @param {boolean} [options.stash] - Enable the backup stash, and revert in case of errors
* @param {boolean} [options.verbose] - Always show task output
* @param {boolean} [options.verbose] - Show task output even when tasks succeed; by default only failed output is shown
* @param {Logger} [logger]
*
* @returns {Promise<boolean>} Promise of whether the linting passed or failed
Expand Down
2 changes: 1 addition & 1 deletion lib/runAll.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ const createError = (ctx) => Object.assign(new Error('lint-staged failed'), { ct
* @param {Object} [options.cwd] - Current working directory
* @param {boolean} [options.debug] - Enable debug mode
* @param {number} [options.maxArgLength] - Maximum argument string length
* @param {boolean} [options.verbose] - Always show task output
* @param {boolean} [options.quiet] - Disable lint-staged’s own console output
* @param {boolean} [options.relative] - Pass relative filepaths to tasks
* @param {boolean} [options.shell] - Skip parsing of tasks for better shell support
* @param {boolean} [options.stash] - Enable the backup stash, and revert in case of errors
* @param {boolean} [options.verbose] - Show task output even when tasks succeed; by default only failed output is shown
* @param {Logger} logger
* @returns {Promise}
*/
Expand Down

0 comments on commit 2c6f3ad

Please sign in to comment.