You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-4
Original file line number
Diff line number
Diff line change
@@ -60,13 +60,18 @@ Usage: lint-staged [options]
60
60
61
61
Options:
62
62
-V, --version output the version number
63
-
--allow-empty allow empty commits when tasks undo all staged changes (default: false)
63
+
--allow-empty allow empty commits when tasks revert all staged changes
64
+
(default: false)
64
65
-c, --config [path] path to configuration file
65
66
-d, --debug print additional debug information (default: false)
66
-
-p, --concurrent <parallel tasks> the number of tasks to run concurrently, or false to run tasks serially (default: true)
67
+
--no-stash disable the backup stash, and do not revert incase of
68
+
errors
69
+
-p, --concurrent <parallel tasks> the number of tasks to run concurrently, or false to run
70
+
tasks serially (default: true)
67
71
-q, --quiet disable lint-staged’s own console output (default: false)
68
72
-r, --relative pass relative filepaths to tasks (default: false)
69
-
-x, --shell skip parsing of tasks for better shell support (default: false)
73
+
-x, --shell skip parsing of tasks for better shell support (default:
74
+
false)
70
75
-h, --help output usage information
71
76
```
72
77
@@ -79,6 +84,7 @@ Options:
79
84
- `false`: Run all tasks serially
80
85
- `true` (default) : _Infinite_ concurrency. Runs as many tasks in parallel as possible.
81
86
- `{number}`: Run the specified number of tasks in parallel, where `1` is equivalent to `false`.
87
+
- **`--no-stash`**: By default a backup stash will be created before running the tasks, and all task modifications will be reverted in case of an error. This option will disable creating the stash, and instead leave all modifications in the index when aborting the commit.
82
88
- **`--quiet`**: Supress all CLI output, except from tasks.
83
89
- **`--relative`**: Pass filepaths relative to `process.cwd()` (where `lint-staged` runs) to tasks. Default is `false`.
84
90
- **`--shell`**: By default linter commands will be parsed for speed and security. This has the side-effect that regular shell scripts might not work as expected. You can skip parsing of commands with this option.
@@ -168,7 +174,7 @@ Pass arguments to your commands separated by space as you would do in the shell.
168
174
169
175
## Running multiple commands in a sequence
170
176
171
-
You can run multiple commands in a sequence on every glob. To do so, pass an array of commands instead of a single one. This is useful for running autoformatting tools like `eslint --fix` or `stylefmt` but can be used for any arbitrary sequences.
177
+
You can run multiple commands in a sequence on every glob. To do so, pass an array of commands instead of a single one. This is useful for running autoformatting tools like `eslint --fix` or `stylefmt` but can be used for any arbitrary sequences.
0 commit comments