Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Standardized indentation across .js code #277

Closed
wants to merge 1 commit into from

4 participants

@mcandre

I applied JSHint to help standardize indentation. Tab width 4 seemed to be the most common for this project, so I applied it to the rest of the code.

Originally, jshint . showed 511 warnings. After standardizing indentation, it now shows 140 warnings.

$ jshint .
lib/assert/error.js: line 111, col 17, Bad line breaking before '+'.
lib/assert/error.js: line 112, col 17, Bad line breaking before '+'.
lib/assert/error.js: line 113, col 17, Bad line breaking before '+'.
lib/assert/error.js: line 114, col 17, Bad line breaking before '+'.
lib/assert/error.js: line 115, col 17, Bad line breaking before '+'.
lib/assert/error.js: line 116, col 17, Bad line breaking before '+'.

...

lib/assert/utils.js: line 63, col 9, 'ka' used out of scope.
lib/assert/utils.js: line 63, col 22, 'kb' used out of scope.
lib/assert/utils.js: line 65, col 5, 'ka' used out of scope.
lib/assert/utils.js: line 66, col 5, 'kb' used out of scope.
lib/assert/utils.js: line 67, col 10, 'i' used out of scope.
lib/assert/utils.js: line 67, col 14, 'ka' used out of scope.
lib/assert/utils.js: line 67, col 29, 'i' used out of scope.
lib/assert/utils.js: line 67, col 37, 'i' used out of scope.
lib/assert/utils.js: line 68, col 13, 'ka' used out of scope.
lib/assert/utils.js: line 68, col 16, 'i' used out of scope.
lib/assert/utils.js: line 68, col 22, 'kb' used out of scope.
lib/assert/utils.js: line 68, col 25, 'i' used out of scope.
lib/assert/utils.js: line 71, col 10, 'i' used out of scope.
lib/assert/utils.js: line 71, col 14, 'ka' used out of scope.
lib/assert/utils.js: line 71, col 29, 'i' used out of scope.
lib/assert/utils.js: line 71, col 37, 'i' used out of scope.
lib/assert/utils.js: line 72, col 9, 'key' used out of scope.
lib/assert/utils.js: line 72, col 15, 'ka' used out of scope.
lib/assert/utils.js: line 72, col 18, 'i' used out of scope.
lib/assert/utils.js: line 73, col 34, 'key' used out of scope.
lib/assert/utils.js: line 73, col 42, 'key' used out of scope.

...

test/vows-test.js: line 184, col 50, Missing '()' invoking a constructor.
test/vows-test.js: line 197, col 50, Missing '()' invoking a constructor.
test/vows-test.js: line 314, col 44, Missing '()' invoking a constructor.
test/vows-test.js: line 387, col 48, Missing '()' invoking a constructor.
test/vows-test.js: line 433, col 66, Missing semicolon.
test/vows-test.js: line 450, col 38, Missing '()' invoking a constructor.
test/vows-test.js: line 475, col 21, Missing semicolon.

140 errors

I don't know enough about the code base or the team's preferred coding style, so I've left the rest of the warnings alone for now. If you like the .jshintrc I've added, I'd be happy to work on this more.

@JerrySievert

simple, but effective. @indexzero any objections?

@mmalecki

As long as it's @cloudhead's preferred 4 space indent, I'm fine with that.
Looks good to me, overall.

@indexzero
Owner

Yeah, this is fine 4-space is the standard on this project.

@indexzero
Owner

Going to close this for now. We can handle this once all open pull-requests are merged in.

@indexzero indexzero closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 9, 2013
  1. @mcandre
Something went wrong with that request. Please try again.