Husky 9 shows "husky - DEPRECATED" during yarn install. what’s the correct setup?
19:51 14 Feb 2026

I’m trying to configure Husky (v9.1.7) together with lint‑staged in a React/TypeScript project.

Every time I run yarn install I see the message below message printed in the console:

“husky - DEPRECATED”

My goal is simply to run lint-staged on every re-commit without warnings. Below is my current package.json and .husky/pre-commit configuration. I’d like to understand why Husky prints this deprecation message and what the recommended Husky v9 configuration looks like.

package.json:

{
  "scripts": {
    //...
    "prepare": "husky install"
    //...
  },
  "devDependencies": {
    //...
    "husky": "^9.1.7"
    //...
  }
  "lint-staged": {
    "*.{ts,tsx,js,jsx}": [
      "eslint --fix"
    ],
    "*.{css,scss}": [
      "stylelint --fix"
    ]
  }
}

.husky/pre-commit

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged

Why is Husky printing husky - DEPRECATED on install? What is the recommended configuration for Husky v9 (or newer) to run lint-staged on pre‑commit without this warning?
node.js tags husky lint-staged yarn