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, `/.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
  • Loading branch information
mikeescobedo authored and alrra committed Jul 21, 2014
1 parent 973b845 commit a99d856
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 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
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
29 changes: 27 additions & 2 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,7 +33,31 @@ globally ignore:
* Comprehensive set of ignores on GitHub: https://github.com/github/gitignore


### `.htaccess`
## .editorconfig

The `.editorconfig` file is provided in order to encourage and help you and
your team define and maintain consistent coding styles between different
editors and IDEs.

By default, `.editorconfig` includes some basic
[properties](http://editorconfig.org/#supported-properties) that reflect the
coding styles from the files provided by default, but you can easily change
them to better suit your needs.

In order for your editor/IDE to apply the
[properties](http://editorconfig.org/#supported-properties) from the
`.editorconfig` file, you will need to [install a
plugin]( http://editorconfig.org/#download).

__N.B.__ If you aren't using the server configurations provided by HTML5
Boilerplate, we highly encourage you to configure your server to block
access to `.editorconfig` files, as they can disclose sensitive information!

For more details, please refer to the [EditorConfig
project](http://editorconfig.org/).


### .htaccess

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


### `crossdomain.xml`
### crossdomain.xml

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

0 comments on commit a99d856

Please sign in to comment.