ScriptaGames / zorbio

A 3D multiplayer WebGL game
MIT License
8 stars 1 forks source link

Automatically run eslint before git push #494

Closed Jared-Sprague closed 6 years ago

Jared-Sprague commented 6 years ago

it would be great to runs the eslint script before pushing code, I wonder if there is a way we can make this part of git?

mwcz commented 6 years ago

I'd suggest making it a pre-commit hook instead of a pre-push hook, so that we don't wind up in situations where we've made a commit we can't push and have to revert. The only downside of git hooks is they can't be bundled in the repo, but I've gotten around that by "distributing" the hook by installing it from an npm postinstall script. I can show you an example once the sun is up. :D