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