New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding an editorconfig file to maintain consistent coding #1124
Conversation
@@ -0,0 +1,11 @@ | |||
; http://editorconfig.org/ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
That file works as long as jQuery and Modernizr are not expected to be edited. I personally prefer to be more explicit (also doesn't catch jQuery and Modernizr this way):
However, the less verbose (and less explicit) style might be more fitting for HTML 5 Boilerplate. |
Not sure this is going to be very useful for the project. I suspect the reality is that most people won't have their editor set up to use it, or will follow their own style independent of our source style. |
Yes, using a different independent style could be an issue (bad documentation is worse than none at all). If an Example:
|
I like the idea of including it. Users who do not want to use this kind of style in their editor might change/remove the file. The same goes for the other files mentioned. I think it does not hurt anyone's project. I'm +1 on this. |
The reasons I had for including this were exactly the same as @drublic's. I see this file more like a boilerplate than a strict standard that everybody must follow. Everybody has their own opinions on style individually and when working with a team. Having this included in the H5BP repo, would allow people to easily change it to match their defaults. If they don't want to use it, the boilerplate is delete key friendly. |
We've also attempted to remove a lot of clutter from the project. Ignores, Robots - they serve an important function. I don't think "delete key friendly" should be used as a justification for adding more to the project without serious consideration. The amount of content in the boilerplate, the number of dirs, the large number of inline comments, etc., seemed to be putting some people off and perpetuating the myth that the boilerplate was "bloated". We removed the build script, which is really useful, because not enough people were using it. I suspect even fewer people are going to use an editorconfig or take the time to download a plugin (if there is one) for their IDE. So I want to be sure of the value and use of things before we start adding more. |
I'm -1 on this. As @necolas said, there is already a perception amongst some that the project is bloated. The inclusion of this sort of file which many people won't understand, and which may or may not be supported by their chosen editor seems like a bad idea. Besides, are there really that many issues with people using different editors that this is a must-include? The boilerplate is supposed to be about providing a solid starting point for web development, and should only address those issues that are widespread and pressing. Smaller issues like discrepancies between editors seem to fall outside of the range of the project. |
@AndrewBrinker I don't see this as a discrepancy between editors. I see this more as a way for contributors of web projects to have a clear set of rules to follow on a project-by-project basis. Which is something a boilerplate can handle. Regarding bloat of the H5BP project, could this be solved with #1048 or removing 5 of the apple touch icons? |
Removing the touch icons would remove end-user features. |
The primary purpose of a In H5BP this would be a suggested solution to a common problem and may be removed/ignored when it is unnecessary (like |
As Trey said, HTML5BP is a role-model and if we suggest to use a certain syntax we should be sure about it. I think it will help the HTML5BP project, as we encourage users to stick to a certain syntax they decided on and not to mix stuff. For my projects I'm currently using another configuration and I think everyone who wants to have other styles may change the .editorconfig. Many people may not respect the editor-config at all for their own projects. |
I think this should be included. Indentation, EOL, etc, inconsistencies has been an issue in almost all OS projects I've been involved with. IMHO provide sane defaults and let the user customize if needed. EditorConfig is soon getting more properties like; |
I like the idea of enforcing code consistency, but I'm not entirely sold on EditorConfig yet (and its inclusion by default here) since it requires the use of an appropriate editor plugin to have any effect. |
Would it help if I said I was working on a grunt plugin :p Also, most of the popular text editors are supported:
I can see your concern with the user having to install a plugin. But this is really a chicken/egg problem. User won't have the plugin if they don't know about it, and you're concerned about including it since user probably don't have the plugin. Having this in H5BP would really help the adoption and would in my opinion make Open Source codebases more sane. And remember it's not all or nothing. Some people might have the plugin and get the benefit, some don't. You would still have the guidelines in written form. The EditorConfig plugins are just an automatic enforcement convenience. |
I guess it doesn't help that the Vim plugin doesn't fill me with confidence, as it requires Vim to be compiled with python (or you have to install the EditorConfig core too). If I can do all this in a couple of lines of code in Vim, I'm not that excited about having to add all that stuff to have it happen via an EditorConfig instead. |
I agree that the difficulty of installing some of the plugins is a problem. As Sindre noted, this is a bit of a chicken and egg problem. Most text editors probably won't add support unless the file format is widely used and many developers won't add support until they can actually use the file format with their text editor of choice. The editor plugins will hopefully serve as a compromise until we can get native editor support for the file format. As for the vim plugin specifically, I've considered re-implementing a version in pure VimScript (we actually used to have one that didn't quite work), but we haven't heard any complaints about Vim being compiled without Python support yet so I delayed that project. |
I am opposed to this inclusion. I don't see how this in any way affects a site. It only affects the style of development which each person has their own style as previously stated. I think the Boilerplate should remain aimed towards getting a site going quickly, not editor preferences. |
I agree with this inclusion, but as noted before, for me the greater benefit for is that by providing an Recently I added this file to all of my current projects and never had a problem again with white space configuration and team collaboration. Providing a file with comments and some reasonable defaults, IMHO will be beneficial to every project that uses HT5BP. |
^ +1 |
The humans.txt file has no benefit, but is lovely for the developer group working on the project (i just saw this xoogler startup one today ) the editorconfig file, similarly, is part of an emerging defacto standard. But helps greatly in keeping editors consistent and avoiding bad merges and repetitive communication about coding standards. I would love to see it in h5bp and have also been quite happy with its inclusion in my projects. |
* 'master' of git://github.com/h5bp/html5-boilerplate: (36 commits) Fix broken links to issues in CHANGELOG Small adjustments to documentation Remove placeholder link styles Remove duplicate line from htaccess Adding a link to Issue Tracker in Reporting Issues section Adding link to issues from Changelog Formatting headings. More general compression configuration for Apache Correct typo in the clearfix code New image replacement approach Minor update to README Minor update to clearfix Update to Normalize.css 1.0.1 Add a HiDPI example media query Docs: update FAQ Add "Hello world" to index.html htaccess: include a SymLinksIfOwnerMatch comment Docs: adjust line length and whitespace Update to normalize.css v1.0.0 Update doc/extend.md ...
Update .editorconfig with new properties
Using We're web developers. Let's make a standard, and stick to it. |
Only if you use an appropriate plugin. At the moment, we don't have any significant style issues in the code and none that would have been prevented by using something like editorconfig. I'm going to close this for now. |
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
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
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
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: h5bp/html5-boilerplate#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: h5bp/html5-boilerplate#1561 h5bp/html5-boilerplate#1564
See http://editorconfig.org/