Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !10512

Upgrade husky to v5

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/alexandr-g/deps/husky-v5 into main Feb 05, 2021
  • Overview 6
  • Commits 3
  • Pipelines 0
  • Changes 3

Created by: alexandr-g

Hi folks! I’ve upgraded from husky v4 to v5, and updated lint-staged. Please have a look 🙂

Let me know if there any comments regarding the pre-commit config.

If you’re curious about what’s new in Husky 5 you can find more details here - https://dev.to/typicode/what-s-new-in-husky-5-32g5

TLDR; faster and smaller, zero dependencies

Some benefits of using the newer husky version

  • Zero dependencies
  • Lightweight (~0.02MB vs ~1MB for husky 4)
  • Fast (~0.01s vs ~0.5s for husky 4)

How to test:

  1. Modify a file
  2. Stash it and commit
  3. Make sure the pre-commit hook runs as before

Let's say a file that you modified, was formatted by prettier --write, meaning lint-staged was triggered correctly.

Screen_Shot_2021-02-05_at_4_59_32_PM

References/Resources: https://typicode.github.io/husky/#/ https://github.com/typicode/husky-4-to-5 https://github.com/typicode/husky/issues/618#issuecomment-737736354

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/alexandr-g/deps/husky-v5