Skip to content

Commit

Permalink
Add /.editorconfig file
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mikeescobedo authored and alrra committed Jul 19, 2014
1 parent 973b845 commit cbde657
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
### HEAD

* Add `/.editorconfig` file
([#1561](https://github.com/h5bp/html5-boilerplate/issues/1561),
[#1564](https://github.com/h5bp/html5-boilerplate/issues/1564)).
* Add `auto` to the Google Universal Analytics tracker create method
([#1562](https://github.com/h5bp/html5-boilerplate/issues/1562)).
* Add `timeline` and `timelineEnd` to the list of `console` methods
Expand Down
27 changes: 27 additions & 0 deletions doc/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ table of contents](TOC.md)
# Miscellaneous

* [.gitignore](#gitignore)
* [.editorconfig](#editorconfig)
* [.htaccess](#htaccess)
* [crossdomain.xml](#crossdomainxml)

Expand Down Expand Up @@ -32,6 +33,32 @@ globally ignore:
* Comprehensive set of ignores on GitHub: https://github.com/github/gitignore


## .editorconfig

HTML5 Boilerplate includes an `.editorconfig` file that helps you and your team
define and maintain consistent coding styles between different editors and IDEs.
EditorConfig files are easily readable and they work nicely with version control
systems.

When opening any file, your IDE’s EditorConfig plugin will look for a file named
`.editorconfig` in the directory of the opened file and in every parent
directory until the root filepath is reached or an EditorConfig file with
`root = true` is found.

The EditorConfig file provided by this project will inform your IDE to follow
our current practices, which include UTF-8 charset encoding, use of the line
feed character for line breaks, use of four space characters for indentations,
the removal of any whitespace characters preceding newline characters, and the
presence of a final line break character at the end of files.

If you will not be using a server configuration file provided by this project,
remember to block access to `.editorconfig` files, as they may disclose
sensitive information.

* [EditorConfig homepage](http://editorconfig.org/)
* [Download IDE Plugin](http://editorconfig.org/#download)


### `.htaccess`

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

0 comments on commit cbde657

Please sign in to comment.