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
Add EditorConfig file denoting indentation styles #715
Conversation
This should wait until after we've phased out the existing build system. |
@treyhunner, thanks for this pull request. I thought our files were pretty consistent, didn't realize how much variation there was across everything. Once we get the new build system in place we'll be nearly all JavaScript and can apply the core style guidelines consistently across everything. EditorConfig will help us do that for sure. |
@dmethvin I also learned of these inconsistencies while building the grunt system - I think it was simply a result of their ad-hoc nature, which we also leave behind |
No problem. If you post back to this request or PM me when the new build system is in place I can update the pull request. |
@treyhunner Awesome, thanks! |
@treyhunner I think we're ready for your lovin' touch on this. Or at least we're close enough for a first pass. I've created a ticket to track this so it will be in the release notes: http://bugs.jquery.com/ticket/11777 |
@dmethvin It looks better than before. I updated the build/*.jsAll build/lib/*.jsThe following The exceptions to the 8 space indentation used in those files include:
The file test/It looks like the test/unit/*.jsThe |
The |
@rwldrn updated pull request to remove |
There are still some tweaks that should be done here, but I figured it would be easier to spot and fix them once the file landed in master. Thanks @treyhunner! |
This
.editorconfig
file defines the indentation style used in all JavaScript files undersrc/
and also for theMakefile
. Request related to jquery/jquery-ui#606.I did not add definitions for HTML, JS, or CSS files in the
build/
speed/
, ortest/
directories because the indentation styles were not consistent enough for me to judge how they should be defined.Below I noted some of the nuances of the indentation styles in the
build/
andspeed/
directories. Thetest/
directory also suffers from mixed indentation styles (sometimes in the same file).build/
tabs:
4 spaces:
8 spaces with 4 spaces for half indentation:
speed/
tabs:
primarily 2 spaces (with 2 column width tabstops mixed in occasionally):
no idea (heavily mixed spacing and tabbing style)
If maintaining consistent indentation for the files in these directories is desirable, I suggest that each file's indentation style should be made self-consistent first.
For example something like this may be appropriate for
build/
: