mirror of
https://github.com/jambonz/next-static-site.git
synced 2025-12-19 04:47:44 +00:00
Implement Husky for git pre-commit hooks to lint before you commit
This commit is contained in:
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user