Add commit hook

This commit is contained in:
Sarah Norris 2023-02-01 10:58:44 +00:00
parent 09b5c79ad1
commit ee7ff2bea2
3 changed files with 32425 additions and 31557 deletions

4
.husky/pre-commit Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged

63870
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,46 +1,66 @@
{
"name": "create-block-theme",
"version": "1.4.0",
"private": true,
"description": "Create a block-based theme",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
"keywords": [
"WordPress",
"block"
],
"homepage": "https://wordpress.org/plugins/create-block-theme/",
"repository": "git+https://github.com/WordPress/create-block-theme.git",
"bugs": {
"url": "https://wordpress.org/support/plugin/create-block-theme/"
},
"main": "build/index.js",
"devDependencies": {
"@actions/core": "^1.10.0",
"@wordpress/block-library": "^8.2.0",
"@wordpress/browserslist-config": "^5.8.0",
"@wordpress/element": "^5.2.0",
"@wordpress/prettier-config": "^2.8.0",
"@wordpress/scripts": "^25.2.0",
"babel-plugin-inline-json-import": "^0.3.2",
"semver": "^7.3.8",
"simple-git": "^3.14.1"
},
"engines": {
"node": ">=16.9.1",
"npm": ">=7 <8"
},
"scripts": {
"build": "wp-scripts build",
"format": "wp-scripts format",
"lint:css": "wp-scripts lint-style",
"lint:css:fix": "npm run lint:css -- --fix",
"lint:js": "wp-scripts lint-js",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:php": "./vendor/bin/phpcs",
"lint:php:fix": "./vendor/bin/phpcbf",
"packages-update": "wp-scripts packages-update",
"start": "wp-scripts start",
"update-version": "node update-version-and-changelog.js"
}
"name": "create-block-theme",
"version": "1.4.0",
"private": true,
"description": "Create a block-based theme",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
"keywords": [
"WordPress",
"block"
],
"homepage": "https://wordpress.org/plugins/create-block-theme/",
"repository": "git+https://github.com/WordPress/create-block-theme.git",
"bugs": {
"url": "https://wordpress.org/support/plugin/create-block-theme/"
},
"engines": {
"node": ">=16.9.1",
"npm": ">=7 <8"
},
"main": "build/index.js",
"devDependencies": {
"@actions/core": "^1.10.0",
"@wordpress/block-library": "^8.2.0",
"@wordpress/browserslist-config": "^5.8.0",
"@wordpress/element": "^5.2.0",
"@wordpress/prettier-config": "^2.8.0",
"@wordpress/scripts": "^25.2.0",
"babel-plugin-inline-json-import": "^0.3.2",
"husky": "^8.0.3",
"lint-staged": "^13.1.0",
"semver": "^7.3.8",
"simple-git": "^3.14.1"
},
"scripts": {
"build": "wp-scripts build",
"format": "wp-scripts format",
"lint:css": "wp-scripts lint-style",
"lint:css:fix": "npm run lint:css -- --fix",
"lint:js": "wp-scripts lint-js",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:php": "./vendor/bin/phpcs",
"lint:php:fix": "./vendor/bin/phpcbf",
"packages-update": "wp-scripts packages-update",
"start": "wp-scripts start",
"update-version": "node update-version-and-changelog.js",
"prepare": "husky install"
},
"lint-staged": {
"*.{js,json,yml}": [
"wp-scripts format"
],
"*.js": [
"npm run lint:js"
],
"*.{css,scss}": [
"npm run lint:css"
],
"*.php": [
"npm run lint:php"
],
"package.json": [
"wp-scripts lint-pkg-json"
]
}
}