Open swashata opened 3 years ago
Sounds great to me. Write it up and we'll take a look at it together.
Hello @theMikeD, I have made the first draft as the primary README.md
of this repository.
https://github.com/swashata/wp-plugin-wpcs-setup
Please let me know what you think.
Would you prefer a PR or comments?
A PR sounds great. We can collaborate and communicate very easily.
I have added you as a collaborator to make the process easier!
Hi, I have taken a little vacation. I would reply after 21st this month.
Updated the PR.
Any updates @theMikeD?
Heads up @docs-reviewers - the "[Status] Review" label was applied to this issue.
What is the new page you are requesting?
In the Plugin Developer Handbook, we have a section Developer Tools, which outlines using two WordPress Plugins. I want to add a page, describing the usage of
wpcs
with theWordPress-Extra
sniff rules so that a plugin developer can be made aware of possible security related issues. These issues do come up during the first submission of a plugin, and could be immensely helpful for both the plugin developer and the reviewer.How will this new page help you?
In the #pluginreview channel, we were having some discussions using wpcs, especially the
WordPress-Extra
sniff rules to detect and prevent potential security (sanitization, validation and escaping) issues while developing a plugin. Personally, I feel, if I knew this prior to submitting my plugin to the repository, it would’ve saved both the reviewer and me, some valuable time. I had read the guides on Plugin Security available on plugin developer’s handbook, but definitely knowing that the WordPress-Extra sniff exists to automatically detect many of such issues is very helpful.So I would like to contribute to the plugin developer handbook outlining setting up wpcs with the sane defaults as explained in the wpcs repository. I would like to explain both the cli setup and editor setup, with some examples and screenshots. Previously I had contributed to the (now archived) eslint config wordpress repository, so I have some experience writing documentation for WordPress related dev-tools.
Please let me know how to proceed. These are the rough outline of the documentation I have in mind.
phpcs.xml
file with a default config.