mediamonks / frontend-coding-standards

Media.Monks - Frontend Coding Standards
60 stars 23 forks source link

Add pre-commit hook to run `generate-table-of-contents` and `format` scripts #95

Open leroykorterink opened 2 years ago

leroykorterink commented 2 years ago

We should run the generate-table-of-contents and format script so that the files in this repository are automatically updated and formatted to avoid conflicts and keep consistency.

We can use husky to implement this.

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run generate-table-of-contents
npm run format