Personally, I find Git’s own documentation on Git hooks to be woefully inadequate. Fortunately there are some good tutorials out there for creating Git hooks. In some cases, Git hooks don’t need to be complicated. Fortunately, for those cases, there’s Husky. Using Tenon is one of those times.
Step-by-step adding Tenon as a Git hook
The first step is to install Husky by running
npm install husky --save-dev
Next, all you need to do is add the relevant command to your package.json file. For example:
"test": "grunt tenon",
"prepush": "npm test"
This hook will prevent any code from being pushed to your repository if it doesn’t pass Tenon’s tests. Errors, if any, will be output to terminal.
By far, the best way to manage accessibility is to avoid problems in the first place. This is one of the easiest ways to do so.