mozilla/fxa-content-server — pull request #1059 by pdehaan (2014-05-03 17:55:06+00:00)
Title: Let's lint the app/test/ files

This should pass Travis since we're still excluding the app/tests/** via Grunt [/grunttasks/jshint.js:25](https://github.com/mozilla/fxa-content-server/blob/master/grunttasks/jshint.js#L25) task.
Remove the `'!<%= yeoman.app %>/tests/**'` line (and preceeding comma) and you should see the following errors when running `$ grunt lint`:

```
Running "jshint:app" (jshint) task

app/tests/mocks/window.js
line 55 col 54 'bubbles' is defined but never used.
line 63 col 28 'y' is defined but never used.
line 63 col 25 'x' is defined but never used.
line 66 col 46 'timeoutMS' is defined but never used.
line 66 col 35 'callback' is defined but never used.
line 75 col 36 'timeout' is defined but never used.

app/tests/spec/lib/channels/web.js
line 14 col 13 'assert' is defined but never used.
line 13 col 49 'afterEach' is defined but never used.

app/tests/spec/lib/fxa-client.js
line 422 col 13 'done' is not defined.
line 207 col 35 'info' is defined but never used.
line 209 col 31 'err' is defined but never used.
line 402 col 35 'complete' is defined but never used.

app/tests/spec/lib/session.js
line 13 col 49 'beforeEach' is defined but never used.
line 13 col 49 'afterEach' is defined but never used.

app/tests/spec/lib/translator.js
line 51 col 53 ['Show'] is better written in dot notation.
line 65 col 55 ['Show'] is better written in dot notation.

app/tests/spec/lib/url.js
line 16 col 14 'channel' is defined but never used.
line 14 col 34 'Constants' is defined but never used.

app/tests/spec/lib/validate.js
line 16 col 14 'channel' is defined but never used.

app/tests/spec/lib/xss.js
line 16 col 14 'channel' is defined but never used.

app/tests/spec/views/button_progress_indicator.js
line 13 col 49 'afterEach' is defined but never used.

app/tests/spec/views/complete_reset_password.js
line 240 col 55 'email' is defined but never used.

app/tests/spec/views/confirm.js
line 49 col 26 'routerMock' is not defined.

app/tests/spec/views/force_auth.js
line 20 col 20 'wrapAssertion' is defined but never used.

app/tests/spec/views/pp.js
line 18 col 21 'router' is defined but never used.

app/tests/spec/views/settings.js
line 19 col 20 'wrapAssertion' is defined but never used.

app/tests/spec/views/tos.js
line 37 col 7 Unreachable 'assert' after 'return'.
line 18 col 21 'router' is defined but never used.

✖ 28 problems

Warning: Task "jshint:app" failed. Use --force to continue.

Aborted due to warnings. Running "jshint:app" (jshint) task

app/tests/mocks/window.js
line 55 col 54 'bubbles' is defined but never used.
line 63 col 28 'y' is defined but never used.
line 63 col 25 'x' is defined but never used.
line 66 col 46 'timeoutMS' is defined but never used.
line 66 col 35 'callback' is defined but never used.
line 75 col 36 'timeout' is defined but never used.

app/tests/spec/lib/channels/web.js
line 14 col 13 'assert' is defined but never used.
line 13 col 49 'afterEach' is defined but never used.

app/tests/spec/lib/fxa-client.js
line 422 col 13 'done' is not defined.
line 207 col 35 'info' is defined but never used.
line 209 col 31 'err' is defined but never used.
line 402 col 35 'complete' is defined but never used.

app/tests/spec/lib/session.js
line 13 col 49 'beforeEach' is defined but never used.
line 13 col 49 'afterEach' is defined but never used.

app/tests/spec/lib/translator.js
line 51 col 53 ['Show'] is better written in dot notation.
line 65 col 55 ['Show'] is better written in dot notation.

app/tests/spec/lib/url.js
line 16 col 14 'channel' is defined but never used.
line 14 col 34 'Constants' is defined but never used.

app/tests/spec/lib/validate.js
line 16 col 14 'channel' is defined but never used.

app/tests/spec/lib/xss.js
line 16 col 14 'channel' is defined but never used.

app/tests/spec/views/button_progress_indicator.js
line 13 col 49 'afterEach' is defined but never used.

app/tests/spec/views/complete_reset_password.js
line 240 col 55 'email' is defined but never used.

app/tests/spec/views/confirm.js
line 49 col 26 'routerMock' is not defined.

app/tests/spec/views/force_auth.js
line 20 col 20 'wrapAssertion' is defined but never used.

app/tests/spec/views/pp.js
line 18 col 21 'router' is defined but never used.

app/tests/spec/views/settings.js
line 19 col 20 'wrapAssertion' is defined but never used.

app/tests/spec/views/tos.js
line 37 col 7 Unreachable 'assert' after 'return'.
line 18 col 21 'router' is defined but never used.

✖ 28 problems

Warning: Task "jshint:app" failed. Use --force to continue.

Aborted due to warnings.
```

We can merge this beast and start a separate PR for addressing unused variables and the few other remaining issues. For things like "better written in dot notation" we can have JSHint ignore those lines or selectively disable that rule for those few lines of select code.