I am using Husky in my ReactJs project. The idea is when user will commit the changes there should be run some lint commands.For this i added in my package.json:
"lint": "next lint --fix",
"lint:fix": "lint && git add -A .",
Before committing the message i run lint:fix. Everything is working.
Also i know that this command git add -A . will add the changes if they will occur after lint command, so if the dev will commit => lint will fix the issues => and if there are some changes git automatically will add these changes to the commit without doing again git add . and git commit -m ....
Question: Have this command git add -A . any disadvantages and is it ok to add there?