Coding manual
Our coding manual represents everything we need to know in order to keep a consistent coding style and make collaboration a breeze.
Table of contents
Guidelines
See the ./guidelines folder for a collection of language specific coding guidelines.
IDEs / Editors
To maintain consistent coding styles between different editors and IDEs, we use EditorConfig.
Have a look at the .editorconfig file for any details.
Linters
[…] generically, lint or a linter is any tool that flags suspicious usage in software written in any computer language. […] Lint-like tools generally perform static analysis of source code.1
Currently we have configuration files prepared for those linters:
- ESLint (
.eslintrc) - stylelint (
.stylelintrc) - PHP_CodeSniffer for Drupal 8 (
phpcs.xml.dist)
1 https://en.wikipedia.org/wiki/Lint_(software)
Recipes
Have a look at the repository’s Wiki for a collection of recipes regarding specific coding challenges / topics.
Best practices
Want to know how we write constructors, handle state delegation or use the factory pattern? Or what’s in general the best practice to write a, b or c? Have a look at our CodePen account or check out the Wiki.
gridonic.ch ・ gridonic.github.io ・ @gridonic