Skip to content

Commit 4116a56

Browse files
committed
Add composer validation to lint-staged
1 parent 5c89ef4 commit 4116a56

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "westonruter/wp-plugin-template",
3+
"description": "Just another WordPress plugin",
4+
"license": "GPL-2.0-or-later",
35
"type": "wordpress-plugin",
4-
"version": "dev-main",
56
"require": {
67
"php": "^8.1"
78
},

lint-staged.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
*/
44
const config = {
55
'*.{js,ts,mjs}': [ 'npx wp-scripts lint-js', () => 'npx tsc' ],
6-
'composer.{json,lock}': () => 'composer normalize --dry-run',
6+
'composer.{json,lock}': [
7+
() => 'composer validate --strict',
8+
() => 'composer normalize --dry-run',
9+
],
710
'*.php': [ 'composer phpcs', () => 'composer phpstan' ],
811
};
912

0 commit comments

Comments
 (0)