Add JSHint and make dygraphs pass its checks.