Skip to content
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

Disable husky git hooks by default, opt-in using npx husky #1472

Merged
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
10 changes: 10 additions & 0 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Thank you for contributing to the Dependabot for Azure DevOps project.
- [Static code analyzers and linters](#static-code-analyzers-and-linters)
- [Formatters](#formatters)
- [Spelling](#spelling)
- [Automatically run quality checks on commit](#automatically-run-quality-checks-on-commit)

# Contribution workflow

Expand Down Expand Up @@ -61,3 +62,12 @@ pip install codespell
codespell # to check for misspellings
codespell --write-changes # to automatically fix misspellings
```

## Automatically run quality checks on commit

If you'd like spelling, formatting, and linting checks to be run automatically on commit, enable the [Husky](https://typicode.github.io/husky/how-to.html) git hooks using:
```bash
npx husky
```

When enabled, your local commits will be rejected if any of the quality checks fail; Unit tests are **not** run due to their long execution time, you must still run them manually.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.0.0",
"private": true,
"scripts": {
"prepare": "husky",
"postinstall": "npm --prefix extension install",
"format": "prettier --write .",
"format:check": "prettier --check ."
Expand Down