Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# @bsu/wp-coding-standards

PHP tool binaries for BSU WordPress development. Installed via npm, ships the following tools in `vendor/bin/`:

| Binary | Version | Purpose |
|---|---|---|
| `phpcs` | 4.x | PHP CodeSniffer — enforces BSUWordPressCS coding standards |
| `phpcbf` | 4.x | PHP Code Beautifier — auto-fixes PHPCS violations |
| `phpstan` | 1.x | PHPStan — static analysis for type safety and correctness |

## Usage in bsuwp

These binaries are referenced directly by path in `bsuwp/package.json` scripts:

```bash
npm run lint:php # phpcs via this package
npm run fix:php # phpcbf via this package
npm run analyse:php # phpstan via this package
```

## Updating

To update tool versions, modify `composer.json` and run `composer update`, then commit the updated `composer.lock` and `vendor/` in a PR to `release`.
5 changes: 5 additions & 0 deletions vendor/phpcsstandards/php_codesniffer/CodeSniffer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
$phpCodeSnifferConfig = array (
'installed_paths' => '../../phpcsstandards/phpcsextra,../../phpcsstandards/phpcsutils,../../wp-coding-standards/wpcs,../../../../BSUWordPressCS',
);
?>