PracticaDS / pdes-tp-team_prog

Pdes-tp-team_prog
0 stars 0 forks source link

Updating eslint config #29

Closed FedeLochbaum closed 5 years ago

FedeLochbaum commented 5 years ago

The pre-commit does:

LaimeJesus commented 5 years ago

I think doing eslint some.files --fix and then git add . is a terrible practice to add as a precommit hook. For the following reasons

FedeLochbaum commented 5 years ago

I think doing eslint some.files --fix and then git add . is a terrible practice to add as a precommit hook. For the following reasons

* First, run eslint some.file --fix doesn't secure you that it fixed every existing eslint error, so we can't trust that we are committing free linter errors changes.

* Second, mix 'normal' changes with eslint fixing changes in a single commit is not ok for me because what happen if we want to roll back the 'normal' changes but we want to keep the eslint fixes, we will not be able to do that.

* Lastly, I think we should add some precommit hook, but it doesn't have to do a lot of stuff, it could be something simple like showing linter errors.

Ok! feel free to make the changes