Implement Husky for git pre-commit hooks to lint before you commit

This commit is contained in:
kitajchuk
2021-04-29 17:00:52 -07:00
parent 28a922b4bc
commit f37d79bf80
5 changed files with 16 additions and 0 deletions

View File

@@ -18,6 +18,10 @@ Clone this repository and install [yarn](https://yarnpkg.com/getting-started/ins
- `yarn install`
- Installs node packages
- Installs [husky](https://typicode.github.io/husky/) for git `pre-commit` hooks
- If the `prepare` script doesn't run (issue with yarn v2+) you can run `npx husky install`
- Be warned this code-base is NOT tested with `yarn` v2+ (breaking changes)
- Husky will run `yarn lint` before a git commit and stop the commit if `ESLint` fails
- `yarn dev`
- Serves local dev at [localhost:3000](http://localhost:3000)
- `yarn lint`