fac26 / week1-server-karol-natalia-laura-gareth

Haiku
0 stars 0 forks source link

Love the use of `eslint` #46

Open ivan-unfolds opened 1 year ago

ivan-unfolds commented 1 year ago

You could also add a script in the package.json so that it's easier to check, something like:

"lint": "eslint ."

You could then run this script before pushing up to make sure your codebase is following all the rules.

Or even better you could use a tool like husky to add a git hook which will stop you pushing up to Github if there are errors. Another way to do this would be to add a Github action that would prevent anyone from merging to main if there are any errors.

This would have prevented something like the following line where you have a variable that's not being used

https://github.com/fac26/week1-server-karol-natalia-laura-gareth/blob/8a7077396874066ce5d38589cc5ceab54cb915e8/src/template.js#L1

nataliarusu commented 1 year ago

Thank you, Ivan. It was fixed yesterday on the other branch which we planned to merge today.