CassidyDC default code formatting, linting, and build toolset for WordPress Block Theme and Plugin development.
-
Add the files in this repo's
files/wp-contentdirectory to your local developmentwp-contentdirectory. -
Add the files in this repo's
files/themeand/orfiles/plugindirectory to your specific theme or plugin directories you are developing. -
Add your theme and/or plugin directories to your
wp-content/package.jsonfile in theworkspacesobject, and add the build and start commands for each theme and/or plugin to thescriptsobject in the same file using the same format that is included there. -
Update the following config files to replace or add your theme/plugin directories to the linting and formatting rules:
.gitignore(under mu-plugins, plugins, and/or themes)composer.json(inscripts > syntax > themes/cassidydc-block-theme)phpcs.xml(under "Directories and files to check")phpstan.neon(under "paths")
-
OPTIONAL: Install the recommended VSCode extensions listed in this repo's
files/wp-content/.vscode/extensions.jsonfile. Not all extensions are required, but I recommend at least installing the formatting and linting extensions if you want VSCode show linting errors and format your files without needing to go through the command line.