xnt / react-something-nice

A very simple component to display nice messages for your team
https://www.npmjs.com/package/react-something-nice
MIT License
4 stars 27 forks source link

Force babel compilation check on pre-commit #34

Open xnt opened 5 years ago

xnt commented 5 years ago

I've had a couple of instances where I (or another contributor) forget to add a , to one of the items in the messages array. I thought this would be caught by eslint, but apparently it isn't 🤷‍♂️.

So let's try to hook the full babel compilation (and assert a successful result) to the pre-commit. I suspect this might be as easy as adding the command to the pre-commit hook in husky.

saichandernagamalla commented 5 years ago

Hello @xnt eslint is able to caught the missing commas at pre-commit stage. I'm able to test it and it is failing the commit. Possible reason might be, non availability of husky package in node_modules.