I have configured lint-staged as following in my Angular 7 app.
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"linters": {
"*.ts": "ng lint --fix my-app --files"
},
"relative": true
},
I am using Intellij idea. When I am committing files in the editor, it runs husky. If there are any errors, it fixes them but commits the old files and not the ones which got changed after "ng lint --fix " and I have to commit the changed files again.
Basically I want the changed files to be committed after it executes "ng lint --fix" and not the old ones.
Any help on how to resolve this issue?