Skip to content

Instantly share code, notes, and snippets.

@freeranger
Last active August 29, 2015 13:57
Show Gist options
  • Save freeranger/9481415 to your computer and use it in GitHub Desktop.
Save freeranger/9481415 to your computer and use it in GitHub Desktop.
JSHint failures that don't all show up in TeamCity Reporter
var noSemiColon = 'noSemiColon';
window.alert(noSemiColon)
if (noSemiColon == "must use single quotes") {
window.alert('this was a test for single quotes');
}
// ahould have curly braces
while (false)
window.alert('hello');
window.alert('goodbye');
// Empty block
{
}
// Defined but not used and == error
function compareNullUsingTripleEquals(a) {
return a == null;
}
if (notYetDefined == '') {
window.alert('blah');
}
var notYetDefined = 'XX';
[16:49:39] : [Step 4/6] JSHint: app/scripts/JSHintfailures.js
[16:49:39] : [JSHint: app/scripts/JSHintfailures.js] app/scripts/JSHintfailures.js: line 3, col 26, Missing semicolon.
[16:49:39] : [app/scripts/JSHintfailures.js: line 3, col 26, Missing semicolon.] W033: Missing semicolon.
[16:49:39] : [app/scripts/JSHintfailures.js: line 3, col 26, Missing semicolon.] app/scripts/JSHintfailures.js: line 5, col 44, Strings must use singlequote.
[16:49:39] : [app/scripts/JSHintfailures.js: line 5, col 44, Strings must use singlequote.] W109: Strings must use singlequote.
[16:49:39] : [app/scripts/JSHintfailures.js: line 5, col 44, Strings must use singlequote.] app/scripts/JSHintfailures.js: line 5, col 17, Expected '===' and instead saw '=='.
[16:49:39] : [app/scripts/JSHintfailures.js: line 5, col 17, Expected '===' and instead saw '=='.] W116: Expected '===' and instead saw '=='.
[16:49:39] : [app/scripts/JSHintfailures.js: line 5, col 17, Expected '===' and instead saw '=='.] app/scripts/JSHintfailures.js: line 11, col 14, Trailing whitespace.
[16:49:39] : [app/scripts/JSHintfailures.js: line 11, col 14, Trailing whitespace.] W102: Trailing whitespace.
[16:49:39] : [app/scripts/JSHintfailures.js: line 11, col 14, Trailing whitespace.] app/scripts/JSHintfailures.js: line 12, col 3, Expected '{' and instead saw 'window'.
[16:49:39] : [app/scripts/JSHintfailures.js: line 12, col 3, Expected '{' and instead saw 'window'.] W116: Expected '{' and instead saw 'window'.
[16:49:39] : [app/scripts/JSHintfailures.js: line 12, col 3, Expected '{' and instead saw 'window'.] app/scripts/JSHintfailures.js: line 13, col 3, Expected 'window' to have an indentation at 1 instead at 3.
[16:49:39] : [app/scripts/JSHintfailures.js: line 13, col 3, Expected 'window' to have an indentation at 1 instead at 3.] W015: Expected 'window' to have an indentation at 1 instead at 3.
[16:49:39] : [app/scripts/JSHintfailures.js: line 13, col 3, Expected 'window' to have an indentation at 1 instead at 3.] app/scripts/JSHintfailures.js: line 17, col 2, Trailing whitespace.
[16:49:39] : [app/scripts/JSHintfailures.js: line 17, col 2, Trailing whitespace.] W102: Trailing whitespace.
[16:49:39] : [app/scripts/JSHintfailures.js: line 17, col 2, Trailing whitespace.] app/scripts/JSHintfailures.js: line 21, col 3, Missing "use strict" statement.
[16:49:39] : [app/scripts/JSHintfailures.js: line 21, col 3, Missing "use strict" statement.] E007: Missing "use strict" statement.
[16:49:39] : [app/scripts/JSHintfailures.js: line 21, col 3, Missing "use strict" statement.] app/scripts/JSHintfailures.js: line 21, col 12, Expected '===' and instead saw '=='.
[16:49:39] : [app/scripts/JSHintfailures.js: line 21, col 12, Expected '===' and instead saw '=='.] W116: Expected '===' and instead saw '=='.
[16:49:39] : [app/scripts/JSHintfailures.js: line 21, col 12, Expected '===' and instead saw '=='.] app/scripts/JSHintfailures.js: line 24, col 19, Expected '===' and instead saw '=='.
[16:49:39] : [app/scripts/JSHintfailures.js: line 24, col 19, Expected '===' and instead saw '=='.] W116: Expected '===' and instead saw '=='.
[16:49:39] : [app/scripts/JSHintfailures.js: line 24, col 19, Expected '===' and instead saw '=='.] app/scripts/JSHintfailures.js: line 28, col 19, 'notYetDefined' was used before it was defined.
[16:49:39] : [app/scripts/JSHintfailures.js: line 28, col 19, 'notYetDefined' was used before it was defined.] W003: 'notYetDefined' was used before it was defined.
[16:49:39] : [app/scripts/JSHintfailures.js: line 28, col 19, 'notYetDefined' was used before it was defined.] app/scripts/JSHintfailures.js: line 20, col 38, 'compareNullUsingTripleEquals' is defined but never used.
[16:49:39] : [app/scripts/JSHintfailures.js: line 20, col 38, 'compareNullUsingTripleEquals' is defined but never used.] W098: 'compareNullUsingTripleEquals' is defined but never used.
app/scripts/JSHintfailures.js
line 3 col 26 Missing semicolon.
line 5 col 44 Strings must use singlequote.
line 5 col 17 Expected '===' and instead saw '=='.
line 11 col 14 Trailing whitespace.
line 12 col 5 Expected '{' and instead saw 'window'.
line 17 col 2 Trailing whitespace.
line 21 col 3 Missing "use strict" statement.
line 21 col 12 Expected '===' and instead saw '=='.
line 24 col 19 Expected '===' and instead saw '=='.
line 28 col 19 'notYetDefined' was used before it was defined.
line 20 col 38 'compareNullUsingTripleEquals' is defined but never used.
JSHint: app/scripts/JSHintfailures.js: app/scripts/JSHintfailures.js (5)
line 20, col 38, 'compareNullUsingTripleEquals' is defined but never used.
line 21, col 12, Expected '===' and instead saw '=='.
line 21, col 3, Missing "use strict" statement.
line 24, col 19, Expected '===' and instead saw '=='.
line 28, col 19, 'notYetDefined' was used before it was defined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment