We have our own set of style guides for projects we work on. While we follow the WordPress style guidelines for the most part, there’s a lot of things those don’t cover.
- Markup Guidelines
Guidelines specifically for the output in the DOM.
-
Guidelines specifically for writing CSS.
-
Extra guidelines for writing modern (ES6+) JS.
-
Guidelines specifically for writing React apps.
-
Extra guidelines for writing modern (namespaced) PHP.
Note that these are simply guidelines, and you’re free to deviate from them if you want to. We’re always improving these, so if you come up with something better, propose a change!
We also check our code against these coding standards programmatically, with packages available via Composer (humanmade/coding-standards) and npm (@humanmade/eslint-config and @humanmade/stylelint-config).