scaffold-command
scaffold-command copied to clipboard
wp scaffold and WPCS
Files generated by wp scaffold command are not WordPress coding standard compliant!
For example cpt generated:

https://github.com/wp-cli/wp-cli/issues/4589
Close via https://github.com/wp-cli/scaffold-command/pull/110
Oops, maybe the other files apart from CPT aren't compliant?
Edit: no there're not - taxonomy for one.
Edit2: Taxonomy fixed now via https://github.com/wp-cli/scaffold-command/pull/112, need to check if there's others...
@schlessera, @danielbachhuber - is there any Behat logic that would run linters on generated files? That would be great to ensure we scaffold files that are WordPress compliant.
@gziolo No, but that would be a good addition. I'll create an issue for that.
Awesome, thanks 🙇
to keep track what else needs work
- [ ] wp scaffold _s
- [x] wp scaffold block -- marking as complete ( i couldn't find any errors )
- [x] wp scaffold child-theme
- [ ] wp scaffold plugin
- [ ] wp scaffold plugin-tests
- [x] wp scaffold post-type
- [x] wp scaffold taxonomy
- [x] wp scaffold theme-tests
@gitlost @schlessera @gziolo I am checking commands I did that were merged
@gziolo you fixed scaffold block
right?
Good idea @thrijith !
Going to remove this from the 1.1.2 milestone as incomplete at this late stage...
@gziolo you fixed scaffold block right?
Yes, I fixed using Gutenberg's configuration. For PHP, it should be the same as core uses. JS part follows Eslint setup, but I hope it is similar to what JSHint promotes.
Looks like plugin
and plugin-tests
are mostly good to go. I did find an error generated on bootstrap.php. It is a false positive so I added a PR that uses a wpcs exclusion on the line to suppress the error.