Comment on page
Coding Standards
Basic standards and linting configuration
Besides the language specific standards below, we always include an .editorconfig file in code repositories for easier IDE configuration. Most IDEs either support this by default or need a plugin.
Since we depend on WordPress, PHP is the main language we use for backend development.
We follow PSR-12 as a base for coding standards, but with some exceptions and additions. To make it easier to lint our code, either in CI or locally in the IDE, we always include a phpcs.xml.dist file to the root of all of our code repositories.
Python is also being used for certain use cases. Mainly for scripting and functionality that needs to run in a pipeline. In most cases this is done to avoid writing shell scripts that are harder to read and maintain.
We follow PEP8 as a base for coding standards. We include a setup.cfg file in our code repositories to enable linting.
Besides using vanilla Javascript, in some cases we also rely on the React framework for most of our frontend work.
We are using ESlint to enforce coding standards that extends WordPress eslint configuration. We include an .eslintrc.json file in our code repositories.
Besides using vanilla CSS, when the complexity increases we rely on Sass to achieve better readability and maintenance.
We use SonarCloud for automated auditing of new code during our Pull Requests pipelines. We also have enabled vulnerability scanning and automated packages security updates on GitHub.
We use Playwright for “end to end” testing. It’s a Javascript based framework, used also by Wordpress.
For technical documentation we use Gitbook. Since the project is open source, the documentation is also publicly available and it’s automatically synced with a code repository.
Last modified 2mo ago