From 17a1f8d3883e39b7b055c32a3ca792f5ebe5f595 Mon Sep 17 00:00:00 2001 From: Rami Yushuvaev Date: Tue, 4 Aug 2026 11:40:41 +0300 Subject: [PATCH 1/2] chore: remvoe husky --- .github/pre-commit | 3 +++ .gitignore | 2 ++ .husky/pre-commit | 6 ------ package-lock.json | 17 ----------------- package.json | 3 +-- 5 files changed, 6 insertions(+), 25 deletions(-) create mode 100644 .github/pre-commit delete mode 100755 .husky/pre-commit diff --git a/.github/pre-commit b/.github/pre-commit new file mode 100644 index 000000000..7e617c2c7 --- /dev/null +++ b/.github/pre-commit @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +npx --no-install lint-staged diff --git a/.gitignore b/.gitignore index fd2e1b3b6..453a38177 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ tmp .codex # Local environment overrides (license keys, secrets) /.env +.superpowers/ +docs/superpowers/ diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 60599ae35..000000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -# Run lint-staged (will autofix and stage fixed files). -# Exit non-zero only if non-fixable problems remain. -npx --no-install lint-staged diff --git a/package-lock.json b/package-lock.json index bb3e8332f..3e5e19005 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,7 +62,6 @@ "eslint-webpack-plugin": "^4.2.0", "glob": "^11.1.0", "globals": "^15.14.0", - "husky": "^8.0.0", "lint-staged": "^15.5.2", "mini-css-extract-plugin": "^2.9.2", "postcss": "^8.5.2", @@ -8626,22 +8625,6 @@ "node": ">=16.17.0" } }, - "node_modules/husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", - "dev": true, - "license": "MIT", - "bin": { - "husky": "lib/bin.js" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, "node_modules/iconv-lite": { "version": "0.6.3", "license": "MIT", diff --git a/package.json b/package.json index ecd8c138f..a1f0b4318 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "test": "tests" }, "scripts": { - "prepare": "husky install", + "prepare": "git config core.hooksPath .githooks || true", "test:php": "WP_TESTS_DIR=./.wp-tests-lib src/vendor/bin/phpunit -c phpunit.xml", "test:php:watch": "npm run test:php -- --testdox", "test:playwright": "playwright test -c config/playwright/playwright.config.ts", @@ -105,7 +105,6 @@ "eslint-webpack-plugin": "^4.2.0", "glob": "^11.1.0", "globals": "^15.14.0", - "husky": "^8.0.0", "lint-staged": "^15.5.2", "mini-css-extract-plugin": "^2.9.2", "postcss": "^8.5.2", From fd4016005b62e59f6792d0237ae26149439e1de4 Mon Sep 17 00:00:00 2001 From: Rami Yushuvaev Date: Tue, 4 Aug 2026 15:36:10 +0300 Subject: [PATCH 2/2] Use githooks --- {.github => .githooks}/pre-commit | 0 CONTRIBUTING.md | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename {.github => .githooks}/pre-commit (100%) mode change 100644 => 100755 diff --git a/.github/pre-commit b/.githooks/pre-commit old mode 100644 new mode 100755 similarity index 100% rename from .github/pre-commit rename to .githooks/pre-commit diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c52e4fba9..4949dde96 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,7 +71,7 @@ npm run watch ## Pre-commit hooks (automatic linting & autofix) 🔧 -We use Husky + lint-staged to run linters only on the files being committed. The hook will: +We use a native Git hook and lint-staged to run linters only on the files being committed. The hook will: - Run the appropriate autofix for the changed files (PHP, JS/TS, CSS/SCSS). - Automatically stage any files that were fixed so the fixes are included in the same commit. @@ -85,7 +85,7 @@ Files → actions (configured in this repository): Setup -1. Install node deps (this will also prepare Husky via the `prepare` script): +1. Install node deps. The `prepare` script configures Git to use this repository's hooks: ```shell npm install