Standardized indentation across .js code #277

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants

mcandre commented May 9, 2013

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.

Contributor

JerrySievert commented May 9, 2013

simple, but effective. @indexzero any objections?

Contributor

mmalecki commented May 9, 2013

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

Owner

indexzero commented May 23, 2013

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

Owner

indexzero commented Nov 4, 2014

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

indexzero closed this Nov 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment