Skip to content

Commit

Permalink
Support for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Dec 16, 2024
1 parent 047174b commit 29a5c59
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@
"roots/wordpress": "^6.7",
"wpackagist-plugin/contact-form-7": "^6.0",
"roots/wordpress-core-installer": "^1.100",
"wpackagist-theme/twentytwentyfive": "^1.0"
"wpackagist-theme/twentytwentyfive": "^1.0",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0"
},
"scripts": {
"lint": [
"phpcs",
"composer validate"
],
"format": [
"phpcbf"
]
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"lint": "npm-run-all lint:*",
"lint:js": "eslint *.js assets",
"lint:php": "composer lint",
"format": "npm-run-all format:*",
"format:js": "eslint --fix *.js assets",
"format:php": "composer format",
"build": "grunt build",
"deploy": "grunt deploy",
"deploy-trunk": "grunt deploy:trunk",
Expand Down
4 changes: 2 additions & 2 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
<config name="installed_paths" value="vendor/wp-coding-standards/wpcs" />
<arg name="extensions" value="php" />

<file>.</file>
Expand All @@ -16,5 +15,6 @@

<exclude-pattern>/node_modules</exclude-pattern>
<exclude-pattern>/vendor</exclude-pattern>
<exclude-pattern>/dist</exclude-pattern>
<exclude-pattern>/dist/</exclude-pattern>
<exclude-pattern>/tools/</exclude-pattern>
</ruleset>

0 comments on commit 29a5c59

Please sign in to comment.