[wp-trac] [WordPress Trac] #25979: jshint shouldn't throw errors: wp-admin/js/edit-comments.js

WordPress Trac noreply at wordpress.org
Thu Nov 14 02:45:24 UTC 2013


#25979: jshint shouldn't throw errors: wp-admin/js/edit-comments.js
-----------------------------+-----------------------------
 Reporter:  adamsilverstein  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Build Tools      |    Version:
 Severity:  normal           |   Keywords:  needs-patch
-----------------------------+-----------------------------
 51 errors:
 {{{
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L32:C13] W081: Too many var statements.
     var diff = $('#' + settings.element).is('.' + settings.dimClass) ? 1 :
 -1;
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L83:C106] W033: Missing semicolon.
           $('#comment-' + id).css('backgroundColor', '').fadeIn(300,
 function(){ $(this).show() });
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L147:C43] W041: Use '===' to compare with '0'.
       a.closest('.awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass'
 ]('count-0');
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L228:C52] W041: Use '===' to compare with '0'.
     if ( ! theExtraList || theExtraList.size() == 0 ||
 theExtraList.children().size() == 0 || untrash || unspam ) {
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L228:C91] W041: Use '===' to compare with '0'.
     if ( ! theExtraList || theExtraList.size() == 0 ||
 theExtraList.children().size() == 0 || untrash || unspam ) {
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L286:C72] W033: Missing semicolon.
         $('#undo-' + id).fadeIn(300, function(){ $(this).show() });
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L358:C47] W033: Missing semicolon.
       c.fadeIn(300, function(){ c.show() }).css('backgroundColor', '');
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L406:C70] W033: Missing semicolon.
         $('#replyrow').fadeIn(300, function(){ $(this).show() });
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L413:C1] W099: Mixed spaces and tabs.
      } else {
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L414:C1] W099: Mixed spaces and tabs.
        replyButton = $('#replybtn', editRow);
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L425:C66] W033: Missing semicolon.
       $('#replyrow').fadeIn(300, function(){ $(this).show() });
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L516:C20] W033: Missing semicolon.
     $(c).hide()
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L575:C14] W033: Missing semicolon.
       }
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L593:C14] W033: Missing semicolon.
       }
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L6:C1] W117: 'setCommentsList' is not defined.
 setCommentsList = function() {
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L22:C34] W117: 'adminCommentsL10n' is not defined.
         replyButton.text(adminCommentsL10n.replyApprove);
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L27:C34] W117: 'adminCommentsL10n' is not defined.
         replyButton.text(adminCommentsL10n.reply);
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L54:C13] W117: 'note' is not defined.
       note = $('#' + action + '-undo-holder').html();
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L58:C53] W117: 'commentReply' is not defined.
       if ( el.siblings('#replyrow').length && commentReply.cid == id )
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L59:C17] W117: 'commentReply' is not defined.
         commentReply.close();
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L64:C129] W117: 'note' is not defined.
         h = $('<tr id="undo-' + id + '" class="undo un' + action + '"
 style="display:none;"><td colspan="' + n + '">' + note + '</td></tr>');
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L67:C106] W117: 'note' is not defined.
         h = $('<div id="undo-' + id + '" style="display:none;" class="undo
 un' + action + '">' + note + '</div>');
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L134:C22] W117: 'thousandsSeparator' is not defined.
         n1 = thousandsSeparator + n.substr(n.length - 3) + n1;
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L216:C17] W117: 'total_items_i18n' is not defined.
         total_items_i18n =
 settings.parsed.responses[0].supplemental.total_items_i18n || '';
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L217:C22] W117: 'total_items_i18n' is not defined.
         if ( total_items_i18n ) {
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L218:C48] W117: 'total_items_i18n' is not defined.
           $('.displaying-num').text( total_items_i18n );
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L265:C26] W117: 'list_args' is not defined.
       'list_args': list_args,
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L270:C18] W117: 'ajaxurl' is not defined.
       url: ajaxurl,
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L290:C1] W117: 'commentReply' is not defined.
 commentReply = {
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L297:C54] W117: 'commentReply' is not defined.
     $('a.cancel', row).click(function() { return commentReply.revert();
 });
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L298:C52] W117: 'commentReply' is not defined.
     $('a.save', row).click(function() { return commentReply.send(); });
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L301:C17] W117: 'commentReply' is not defined.
         commentReply.send();
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L309:C13] W117: 'commentReply' is not defined.
       commentReply.toggle($(this).parent());
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L314:C17] W117: 'commentReply' is not defined.
         commentReply.close();
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L327:C17] W117: 'commentReply' is not defined.
         commentReply.toggle($(this).parent());
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L343:C13] W117: 'commentReply' is not defined.
       commentReply.close();
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L363:C13] W117: 'QTags' is not defined.
       QTags.closeAllTags('replycontent');
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L420:C34] W117: 'adminCommentsL10n' is not defined.
         replyButton.text(adminCommentsL10n.replyApprove);
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L422:C34] W117: 'adminCommentsL10n' is not defined.
         replyButton.text(adminCommentsL10n.reply);
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L434:C59] W117: 'self' is not defined.
       vp = document.documentElement.clientHeight || self.innerHeight || 0;
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L444:C21] W117: 'commentReply' is not defined.
           commentReply.revert(); // close on Escape
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L472:C19] W117: 'ajaxurl' is not defined.
       url : ajaxurl,
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L474:C37] W117: 'commentReply' is not defined.
       success : function(x) { commentReply.show(x); },
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L475:C35] W117: 'commentReply' is not defined.
       error : function(r) { commentReply.error(r); }
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L489:C13] W117: 'wpAjax' is not defined.
     r = wpAjax.parseAjaxResponse(xml);
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L491:C38] W117: 'wpAjax' is not defined.
       t.error({'responseText': wpAjax.broken});
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L562:C5] W117: 'setCommentsList' is not defined.
   setCommentsList();
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L563:C5] W117: 'commentReply' is not defined.
   commentReply.init();
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L602:C32] W117: 'adminCommentsL10n' is not defined.
       { highlight_first: adminCommentsL10n.hotkeys_highlight_first,
 highlight_last: adminCommentsL10n.hotkeys_highlight_last,
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 [L602:C91] W117: 'adminCommentsL10n' is not defined.
       { highlight_first: adminCommentsL10n.hotkeys_highlight_first,
 highlight_last: adminCommentsL10n.hotkeys_highlight_last,
 Linting src/wp-admin/js/edit-comments.js ...ERROR
 >> Too many errors. (98% scanned).
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25979>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list