Skip to content

➡️ Move TypeScript and Husky to devDependencies, document SCM hooks #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
- [Jest](#jest)
- [Semantic Release](#semantic-release)
- [Lint Staged](#lint-staged)
- [Source Control Hooks](#source-control-hooks)
- [Husky Example](#husky-example)
- [License](#license)
- [Maintenance](#maintenance)

Expand Down Expand Up @@ -194,6 +196,36 @@ used with your custom command.
}
```

### Source Control Hooks

This package includes a couple scripts designed to be run as part of your
project's source control workflow. The most common workflow is using
[Husky](https://github.com/typicode/husky) to manage
[Git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks), but they
should work with other solutions as well.

#### Husky Example

1. Install Husky

```sh
yarn add -D husky
```

2. Configure hooks in `package.json`

```json
{
"name": "my-package",
"husky": {
"hooks": {
"pre-commit": "hover-scripts pre-commit",
"commit-msg": "hover-scripts commit-msg"
}
}
}
```

## License

MIT
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"glob": "^7.1.6",
"husky": "^4.3.8",
"is-ci": "^3.0.0",
"jest": "^26.6.3",
"jest-watch-typeahead": "^0.6.1",
Expand All @@ -83,7 +82,6 @@
"prettier": "^2.2.1",
"read-pkg-up": "^7.0.1",
"rimraf": "^3.0.2",
"typescript": "^4.2.2",
"which": "^2.0.2",
"yargs-parser": "^20.2.4"
},
Expand Down Expand Up @@ -120,8 +118,10 @@
"@babel/preset-env": "^7.13.9",
"babel-jest": "^26.6.3",
"eslint-config-kentcdodds": "^17.5.0",
"husky": "^4.3.8",
"jest-in-case": "^1.0.2",
"npm-run-all": "^4.1.5",
"slash": "^3.0.0"
"slash": "^3.0.0",
"typescript": "^4.2.3"
}
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8305,10 +8305,10 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typescript@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.2.tgz#1450f020618f872db0ea17317d16d8da8ddb8c4c"
integrity sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ==
typescript@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3"
integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==

underscore@~1.10.2:
version "1.10.2"
Expand Down