Skip to content

Commit

Permalink
Remove extremely frustrating auto-git add behavior from lint-staged.
Browse files Browse the repository at this point in the history
Anyone who uses `git add -p` or `git commit -p` to contruct their commits
from a careful subset of current changes has been bitten by this
thoughtless policy many times. I'm done working around it.
  • Loading branch information
benjamn committed Dec 19, 2018
1 parent cfc8fdf commit d5a9dd1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,10 @@
},
"lint-staged": {
"*.ts*": [
"prettier --ignore-path \"./config/prettierignore\" --trailing-comma all --single-quote --write",
"git add"
"prettier --ignore-path \"./config/prettierignore\" --trailing-comma all --single-quote --write"
],
"*.js*": [
"prettier --ignore-path \"./config/prettierignore\" --trailing-comma all --single-quote --write",
"git add"
"prettier --ignore-path \"./config/prettierignore\" --trailing-comma all --single-quote --write"
]
},
"pre-commit": "lint-staged",
Expand Down

2 comments on commit d5a9dd1

@hwillson
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉🎉🎉

@SimenB
Copy link
Contributor

@SimenB SimenB commented on d5a9dd1 Dec 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partially staged files has been fixed, hasn't it (if that's what you're referring to)? Just upgrade to lint-staged@8: lint-staged/lint-staged@v7.3.0...v8.0.0

Please sign in to comment.