lint-staged 13.2.2 → 13.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/lint-staged.js +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -131,7 +131,7 @@ Options:
|
|
|
131
131
|
- **`--diff`**: By default linters are filtered against all files staged in git, generated from `git diff --staged`. This option allows you to override the `--staged` flag with arbitrary revisions. For example to get a list of changed files between two branches, use `--diff="branch1...branch2"`. You can also read more from about [git diff](https://git-scm.com/docs/git-diff) and [gitrevisions](https://git-scm.com/docs/gitrevisions). This option also implies `--no-stash`.
|
|
132
132
|
- **`--diff-filter`**: By default only files that are _added_, _copied_, _modified_, or _renamed_ are included. Use this flag to override the default `ACMR` value with something else: _added_ (`A`), _copied_ (`C`), _deleted_ (`D`), _modified_ (`M`), _renamed_ (`R`), _type changed_ (`T`), _unmerged_ (`U`), _unknown_ (`X`), or _pairing broken_ (`B`). See also the `git diff` docs for [--diff-filter](https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---diff-filterACDMRTUXB82308203).
|
|
133
133
|
- **`--max-arg-length`**: long commands (a lot of files) are automatically split into multiple chunks when it detects the current shell cannot handle them. Use this flag to override the maximum length of the generated command string.
|
|
134
|
-
- **`--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. Can be re-enabled with `--stash
|
|
134
|
+
- **`--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. Can be re-enabled with `--stash`.
|
|
135
135
|
- **`--quiet`**: Supress all CLI output, except from tasks.
|
|
136
136
|
- **`--relative`**: Pass filepaths relative to `process.cwd()` (where `lint-staged` runs) to tasks. Default is `false`.
|
|
137
137
|
- **`--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. To use a specific shell, use a path like `--shell "/bin/bash"`.
|
package/bin/lint-staged.js
CHANGED
|
@@ -42,9 +42,11 @@ cli.option('--cwd [path]', 'run all tasks in specific directory, instead of the
|
|
|
42
42
|
|
|
43
43
|
cli.option('-d, --debug', 'print additional debug information', false)
|
|
44
44
|
|
|
45
|
-
cli.
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
cli.addOption(
|
|
46
|
+
new Option(
|
|
47
|
+
'--diff [string]',
|
|
48
|
+
'override the default "--staged" flag of "git diff" to get list of files. Implies "--no-stash".'
|
|
49
|
+
).implies({ stash: false })
|
|
48
50
|
)
|
|
49
51
|
|
|
50
52
|
cli.option(
|