Fix jshint warnings.

Review Request #4302 — Created July 6, 2013 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Fix jshint warnings.

This fixes a bunch of warnings in our JavaScript that JSHint reported.

A .jshintrc has been created which will suppress warnings about
__proto__ being used (needed in _.super), and operators like "&&", "?"
and ":" being at the beginning of lines.

This also turns on a bunch of jshint options for things we want to
enforce, like one var statement at the top of a function, unused
variable checks, trailing comma detection, and more.

One thing to note is that we use some reserved keywords as keys, which
causes warnings in JSHint unless they're always quoted. This so far only
came up with the new RepositoryBranch. I've quoted them, but we may want
to consider coming up with new standardized names, such as "isDefault".
Didn't see any issues using the site.

Unit tests passed.

JSHint was happy, except for diffviewer.js, which is gone with my other
changes.
    Loading...