Skip to content

Commit cbde657

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, the `/.editorconfig` file includes some default properties that apply to the coding styles used by HTML5 Boilerplate, 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 cbde657

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
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
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,6 +33,32 @@ globally ignore:
3233
* Comprehensive set of ignores on GitHub: https://github.com/github/gitignore
3334

3435

36+
## .editorconfig
37+
38+
HTML5 Boilerplate includes an `.editorconfig` file that helps you and your team
39+
define and maintain consistent coding styles between different editors and IDEs.
40+
EditorConfig files are easily readable and they work nicely with version control
41+
systems.
42+
43+
When opening any file, your IDE’s EditorConfig plugin will look for a file named
44+
`.editorconfig` in the directory of the opened file and in every parent
45+
directory until the root filepath is reached or an EditorConfig file with
46+
`root = true` is found.
47+
48+
The EditorConfig file provided by this project will inform your IDE to follow
49+
our current practices, which include UTF-8 charset encoding, use of the line
50+
feed character for line breaks, use of four space characters for indentations,
51+
the removal of any whitespace characters preceding newline characters, and the
52+
presence of a final line break character at the end of files.
53+
54+
If you will not be using a server configuration file provided by this project,
55+
remember to block access to `.editorconfig` files, as they may disclose
56+
sensitive information.
57+
58+
* [EditorConfig homepage](http://editorconfig.org/)
59+
* [Download IDE Plugin](http://editorconfig.org/#download)
60+
61+
3562
### `.htaccess`
3663

3764
A `.htaccess` (hypertext access) file is a Apache HTTP server configuration

0 commit comments

Comments
 (0)