Closed alexzurbonsen closed 4 months ago
Hi @alexzurbonsen agree that having the unstaged changes included in the precommit hook is too frictionful - however, we probably do want to keep running all tests at the moment. We are doing a QA review this week though so this might change. We'd be happy to merge this if you can limit the scope to just updating the precommit hook to ignore unstaged changes.
Hi @jmcook1186, I pulled the tests out of lint staged again. In my test it worked as expected.
Hi @narekhovhannisyan can you take another look at this and approve if you are happy. Thanks
@jmcook1186 tried locally, works as expected
Types of changes
A description of the changes proposed in the Pull Request
The current pre-commit hook is a bit could profit from these changes. 1) Safety: Currently, if the pre-commit hook takes into account unstaged changes as well. So technically you can have some unstaged linter fixes which will be not be commited, but the hook will pass anyways. 2) Efficiency: Currently, the entire test suite will be run. With these changes only tests relevant to staged files will be executed.
If this PR finds acceptance, I would add similar changes to the other if repos.