Skip to content

Commit a99d856

Browse files
mikeescobedoalrra
authored andcommitted
Add /.editorconfig file
The addition of the `/.editorconfig` file is made in order to encourage and help developers and their teams define and maintain consistent coding styles between their different editors and IDEs. By default, `/.editorconfig` includes some basic properties that reflect the coding styles from the files provided by default, but users can easily change them to better suit their needs. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Since users need to install a editor/IDE plugin in order for the properties from the `/.editorconfig` to be applied, we were reluctant to add this file in the past (see: #1124). Nowadays however, the EditorConfig project provides plugins for most of the popular editors/IDEs (see: http://editorconfig.org/#download), plus, more and more developers are using it. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ref: http://editorconfig.org/ Close: #1561 #1564
1 parent 973b845 commit a99d856

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_size = 4
8+
indent_style = space
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
### HEAD
22

3+
* Add `/.editorconfig` file
4+
([#1561](https://github.com/h5bp/html5-boilerplate/issues/1561),
5+
[#1564](https://github.com/h5bp/html5-boilerplate/issues/1564)).
36
* Add `auto` to the Google Universal Analytics tracker create method
47
([#1562](https://github.com/h5bp/html5-boilerplate/issues/1562)).
58
* Add `timeline` and `timelineEnd` to the list of `console` methods

doc/misc.md

+27-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ table of contents](TOC.md)
44
# Miscellaneous
55

66
* [.gitignore](#gitignore)
7+
* [.editorconfig](#editorconfig)
78
* [.htaccess](#htaccess)
89
* [crossdomain.xml](#crossdomainxml)
910

@@ -32,7 +33,31 @@ globally ignore:
3233
* Comprehensive set of ignores on GitHub: https://github.com/github/gitignore
3334

3435

35-
### `.htaccess`
36+
## .editorconfig
37+
38+
The `.editorconfig` file is provided in order to encourage and help you and
39+
your team define and maintain consistent coding styles between different
40+
editors and IDEs.
41+
42+
By default, `.editorconfig` includes some basic
43+
[properties](http://editorconfig.org/#supported-properties) that reflect the
44+
coding styles from the files provided by default, but you can easily change
45+
them to better suit your needs.
46+
47+
In order for your editor/IDE to apply the
48+
[properties](http://editorconfig.org/#supported-properties) from the
49+
`.editorconfig` file, you will need to [install a
50+
plugin]( http://editorconfig.org/#download).
51+
52+
__N.B.__ If you aren't using the server configurations provided by HTML5
53+
Boilerplate, we highly encourage you to configure your server to block
54+
access to `.editorconfig` files, as they can disclose sensitive information!
55+
56+
For more details, please refer to the [EditorConfig
57+
project](http://editorconfig.org/).
58+
59+
60+
### .htaccess
3661

3762
A `.htaccess` (hypertext access) file is a Apache HTTP server configuration
3863
file. The `.htaccess` file is mostly used for:
@@ -78,7 +103,7 @@ Notice that the original repo for the `.htaccess` file is [this
78103
one](https://github.com/h5bp/server-configs-apache/blob/master/src/.htaccess).
79104

80105

81-
### `crossdomain.xml`
106+
### crossdomain.xml
82107

83108
The _cross-domain policy file_ is an XML document that gives a web client —
84109
such as Adobe Flash Player, Adobe Reader, etc. — permission to handle data

0 commit comments

Comments
 (0)