Skip to content

Enable 'maxdepth' in JSHint #244

Closed
jakub-g opened this Issue Nov 28, 2012 · 0 comments

1 participant

@jakub-g
Aria Templates member
jakub-g commented Nov 28, 2012

In JSHint 0.9 there's a new option maxdepth to measure the deepness of code nesting (nested if, for etc.).

Too much nested code usually means that something should be extracted as a function, or refactored (e.g. using early return for pathological cases instead of an if wrapping almost whole function).

The sensible option for this would be probably 4 or 5 to start from (we currently get 12 warnings for maxdepth=5 and about 70 for maxdepth=4).

@piuccio piuccio added a commit to piuccio/ariatemplates that referenced this issue Jun 24, 2013
@piuccio piuccio refactor Stricter options on JsHint
Enable more strict option on JsHint and update the package dependencies.

Close #244 close #579
8c34b0c
@piuccio piuccio added a commit that closed this issue Jun 27, 2013
@piuccio piuccio refactor Stricter options on JsHint
Enable more strict option on JsHint and update the package dependencies.

Close #244 close #579

Conflicts:
	package.json
a7afd7a
@piuccio piuccio closed this in a7afd7a Jun 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.