[wp-trac] [WordPress Trac] #25957: jshint shouldn't throw errors: wp-includes/js/utils.js

WordPress Trac noreply at wordpress.org
Wed Nov 13 23:09:44 UTC 2013


#25957: jshint shouldn't throw errors: wp-includes/js/utils.js
-----------------------------+-----------------------------
 Reporter:  adamsilverstein  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Build Tools      |    Version:
 Severity:  normal           |   Keywords:  needs-patch
-----------------------------+-----------------------------
 fixing these:
 {{{
 Linting src/wp-includes/js/utils.js ...ERROR
 [L67:C56] W109: Strings must use singlequote.
     var cookie = document.cookie, e, p = name + "=", b;
 Linting src/wp-includes/js/utils.js ...ERROR
 [L72:C32] W109: Strings must use singlequote.
     b = cookie.indexOf("; " + p);
 Linting src/wp-includes/js/utils.js ...ERROR
 [L77:C20] W041: Use '!==' to compare with '0'.
       if ( b != 0 )
 Linting src/wp-includes/js/utils.js ...ERROR
 [L84:C31] W109: Strings must use singlequote.
     e = cookie.indexOf(";", b);
 Linting src/wp-includes/js/utils.js ...ERROR
 [L110:C37] W109: Strings must use singlequote.
     document.cookie = name + "=" + encodeURIComponent(value) +
 Linting src/wp-includes/js/utils.js ...ERROR
 [L111:C38] W109: Strings must use singlequote.
       ((expires) ? "; expires=" + expires : "") +
 Linting src/wp-includes/js/utils.js ...ERROR
 [L111:C53] W109: Strings must use singlequote.
       ((expires) ? "; expires=" + expires : "") +
 Linting src/wp-includes/js/utils.js ...ERROR
 [L112:C32] W109: Strings must use singlequote.
       ((path) ? "; path=" + path : "") +
 Linting src/wp-includes/js/utils.js ...ERROR
 [L112:C44] W109: Strings must use singlequote.
       ((path) ? "; path=" + path : "") +
 Linting src/wp-includes/js/utils.js ...ERROR
 [L113:C36] W109: Strings must use singlequote.
       ((domain) ? "; domain=" + domain : "") +
 Linting src/wp-includes/js/utils.js ...ERROR
 [L113:C50] W109: Strings must use singlequote.
       ((domain) ? "; domain=" + domain : "") +
 Linting src/wp-includes/js/utils.js ...ERROR
 [L114:C35] W109: Strings must use singlequote.
       ((secure) ? "; secure" : "");
 Linting src/wp-includes/js/utils.js ...ERROR
 [L114:C40] W109: Strings must use singlequote.
       ((secure) ? "; secure" : "");
 Linting src/wp-includes/js/utils.js ...ERROR
 [L146:C35] W117: 'userSettings' is not defined.
   var cookie = 'wp-settings-' + userSettings.uid, all =
 wpCookies.getHash(cookie) || {}, path = userSettings.url,
 Linting src/wp-includes/js/utils.js ...ERROR
 [L146:C99] W117: 'userSettings' is not defined.
   var cookie = 'wp-settings-' + userSettings.uid, all =
 wpCookies.getHash(cookie) || {}, path = userSettings.url,
 Linting src/wp-includes/js/utils.js ...ERROR
 [L156:C39] W117: 'userSettings' is not defined.
   wpCookies.set('wp-settings-time-'+userSettings.uid, userSettings.time,
 31536000, path);
 Linting src/wp-includes/js/utils.js ...ERROR
 [L156:C57] W117: 'userSettings' is not defined.
   wpCookies.set('wp-settings-time-'+userSettings.uid, userSettings.time,
 31536000, path);
 Linting src/wp-includes/js/utils.js ...ERROR
 [L170:C47] W117: 'userSettings' is not defined.
   return wpCookies.getHash('wp-settings-' + userSettings.uid) || {};
 Linting src/wp-includes/js/utils.js ...ERROR
 [L128:C24] W098: 'getUserSetting' is defined but never used.
 function getUserSetting( name, def ) {
 Linting src/wp-includes/js/utils.js ...ERROR
 [L161:C27] W098: 'deleteUserSetting' is defined but never used.
 function deleteUserSetting( name ) {
 }}}

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


More information about the wp-trac mailing list