Tools: Rename lint/format scripts to match newer repos.

This commit is contained in:
Ian Dunn 2022-04-27 13:30:24 -07:00
parent f269c2a1ab
commit 61744dcbaa
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB
2 changed files with 6 additions and 5 deletions

View file

@ -46,9 +46,10 @@ If you are making changes to the plugins, you can run `composer update` at `/wp-
And lastly, you can run PHPCS for both the theme and the plugin at the root `/wp-content/` folder by running `composer install` there once, followed by `composer run phpcs` when you want to code scan. And lastly, you can run PHPCS for both the theme and the plugin at the root `/wp-content/` folder by running `composer install` there once, followed by `composer run phpcs` when you want to code scan.
* `composer run phpcs` - Lint the entire codebase * `composer run lint` - Lint the entire codebase
* `composer run phpcs -- -a themes/wporg-5ftf/` - Lint a specific folder, interactively * `composer run lint -- -a themes/wporg-5ftf/` - Lint a specific folder, interactively
* `composer run phpcbf` - Fix linter warnings (when possible) * `composer run lint $(pwd)/inc*/ac*` - List file(s) in the current directory without typing the full path
* `composer run format` - Fix linter warnings (when possible)
* `composer run test` - Run unit tests * `composer run test` - Run unit tests
* `composer run test:watch` - Run unit tests after each file change. * `composer run test:watch` - Run unit tests after each file change.

View file

@ -23,10 +23,10 @@
"spatie/phpunit-watcher": "^1.23" "spatie/phpunit-watcher": "^1.23"
}, },
"scripts": { "scripts": {
"phpcs": [ "lint": [
"phpcs --extensions=php -s -p" "phpcs --extensions=php -s -p"
], ],
"phpcbf": [ "format": [
"phpcbf -p" "phpcbf -p"
], ],
"test" : "phpunit", "test" : "phpunit",