Open asirota opened 2 hours ago
https://editorconfig.org/#download -> plugins for IDEs that require a plugin to respect .editorconfig
#editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[*.js]
trim_trailing_whitespace = false
[*.css]
trim_trailing_whitespace = false
[*.php]
trim_trailing_whitespace = false
spaces or tabs? js formats, css formats, php formats.... let's discuss
Here are supported keys: https://spec.editorconfig.org/#supported-pairs
For reference, here's the one WordPress Core uses.
Aside from wp-config-sample.php
, I find this represents a typical setup.
On the "spaces or tabs" question, for me personally, I'd say tabs for most, spaces for YAML. Possibly spaces for JSON if that's the preference.
Need to make sure these are the same ones WPCS is using. Else phpcs will format it one way and the editor another way.
Yeah the core one is the way to go
We can get a PR up pretty quickly for this, so we just need to consider two things:
.editorconfig would also be added to the project: https://editorconfig.org/