Skip to content

Commit

Permalink
Preserve unstaged changes with the --no-stash flag
Browse files Browse the repository at this point in the history
As of #523, the new `--no-hide-partially-staged` flag in lint-staged 15.2 is automatically enabled when `--no-stash` is used, so this commit tells lint-staged to run with that option.

This prevents data loss in cases where earlier versions of lint-staged would discard unstaged changes when committing partially staged files.

See https://github.com/lint-staged/lint-staged/releases/tag/v15.2.0.

Signed-off-by: Roger Sheen <[email protected]>
  • Loading branch information
infotexture committed Jan 5, 2024
1 parent 6276903 commit 691e7cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"fix:style": "stylelint \"**/*.css\" --fix",
"fmt": "npm run format",
"format": "prettier --write \"**/*.{css,dita*,json,md,scss,xml,yaml,yml}\"",
"lint-staged": "lint-staged",
"lint-staged": "lint-staged --no-stash",
"prepare": "husky install",
"prettier": "prettier --write \"**/*.{css,dita*,json,md,scss,xml,yaml,yml}\"",
"prettier-check": "prettier --check \"**/*.{css,dita*,json,md,scss,xml,yaml,yml}\"",
Expand Down

0 comments on commit 691e7cd

Please sign in to comment.