EditorConfig
EditorConfig is a standard file format supported by multiple IDEs, including PhpStorm, which
helps maintain code styling standards for multiple developers. It does this by telling the IDE various settings to adhere to.
All one has to do is create a .editorconfig
file at the top level of your codebase.
Below is my default file that I will include in projects.
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[*.php]
max_line_length = 120
[*.md]
max_line_length = 100
[*.{yml,yaml}]
indent_size = 2
[docker-compose.yml]
indent_size = 4
Last updated: 2nd March 2022
First published: 2nd March 2022
First published: 2nd March 2022