I'm running lint-staged (v11.0.0) as part of my pre-commit hook through Husky (v4.3.8). My lint-staged performs eslint (v7.27.0) and Prettier (v2.3.0). However, after Prettier runs, the "prettified" files aren't added to the commit.
How can files modified by Prettier as part of the lint-staged process be automatically added to the commit?
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"{src,test}/**/*.ts": {
"eslint ./src --ext .ts",
"prettier ./src --write"
}
}