Fix inconsistent style and add EditorConfig file #2577

wants to merge 5 commits into


None yet

3 participants


For ticket 22463.

I haven't yet analyzed the inconsistencies between final newlines in the JSON files.

Some more potential changes that could be made:

  • Change code style of JS files to all use 4 spaces for indentation
  • Explicitly list each code style (py, xml, js, rst, etc.) instead of using a * catch-all section
  • Analyze code in tests directory to determine whether some of the inconsistent files (json/xml/po files mostly) should be made consistent

You can confirm that this commit is purely a whitespace change (except for the addition of the .editorconfig file) by running git diff -w or using ?w=1 on Github.

Check for more details on EditorConfig.

treyhunner added some commits Apr 16, 2014
@treyhunner treyhunner Add newlines to the ends of files missing them
- Ensure all CSS files have a final newline
- Ensure all HTML files have a final newline
- Ensure all JavaScript files have a final newline
@treyhunner treyhunner Remove tab indentation (use spaces) 2785b48
@treyhunner treyhunner Add EditorConfig file declaring current code style a6807f8
@treyhunner treyhunner Add a basic JSHint configuration file for JS code
Install jshint with:

    npm install -g jshint

Check code with:

    jshint .

I'd simply ignore the .graffle files as they are machine-generated.


In the .graffle files will never be edited manually, I would just remove their reference from EditorConfig and treat them as if they were a binary file (note that .png and many other file types are not listed because they are binary).

Yes, that's what I meant. We are in agreement.

@treyhunner treyhunner referenced this pull request in django/deps May 5, 2014

Add DEP: JavaScript Tests #4


I merged the newline/tab fixes. Are you still working on this? I think we should add documentation about the lint configs before we merge it.


@timgraham #3003 fixes most of the JS configuration so jshint works as expected. I made a branch that finishes the JS linting started by that pull request but I have not made a pull request for it:


Okay, well I guess this PR (the editor config) cannot be merged as it is, so closing for now.

@timgraham timgraham closed this Nov 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment