diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..afee954d52 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0d7c875c16..3028102a53 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -265,6 +265,14 @@ style of the existing OpenLayers 3 code, which includes: * Use uppercase for `@const` variables. +### Configure your editor + +If possible, configure your editor to follow the coding conventions of the +library. A `.editorconfig` file is included at the root of the repository that +can be used to configure whitespace and charset handling in your editor. See +that file for a description of the conventions. The [EditorConfig]( +http://editorconfig.org/#download) site links to plugins for various editors. + ### Pass the integration tests run automatically by the Travis CI system The integration tests contain a number of automated checks to ensure that the