Issue #1684810 by nod_: JSHint states.js.

PR for https://drupal.org/node/1684810