[wp-trac] [WordPress Trac] #31488: Update grunt-contrib-jshint to v0.11.0

WordPress Trac noreply at wordpress.org
Sat Feb 28 06:55:05 UTC 2015


#31488: Update grunt-contrib-jshint to v0.11.0
------------------------------+-----------------
 Reporter:  netweb            |      Owner:
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  4.2
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:  javascript        |
------------------------------+-----------------
 Upstream changes:

 * https://github.com/gruntjs/grunt-contrib-
 jshint/compare/v0.10.0...v0.11.0

 Patch includes adding `JSON` to `globals` ignore in `.jshintrc` which
 avoids the errors below.
 ----

 Updating to v0.11.0 results in the following Core errors during `grunt
 jshint:core`

 {{{
 #!sh

    src/wp-admin/js/customize-controls.js
    2348 |                    customized: JSON.stringify( dirtyCustomized
 ),
                                          ^ 'JSON' is not defined.
    src/wp-admin/js/customize-widgets.js
    1025 |                data += '&' + $.param( {
 'sanitized_widget_setting': JSON.stringify( instanceOverride ) } );
 ^ 'JSON' is not defined.
    src/wp-admin/js/image-edit.js
     114 |            history = JSON.parse(history);
                                ^ 'JSON' is not defined.
     151 |            return JSON.stringify(op);
                             ^ 'JSON' is not defined.
     274 |            var ret = JSON.parse(r);
                                ^ 'JSON' is not defined.
     410 |        $('#imgedit-selection-' + postid).val(
 JSON.stringify(sel) );
                                                         ^ 'JSON' is not
 defined.
     442 |            history = ( h !== '' ) ? JSON.parse(h) : [],
                                               ^ 'JSON' is not defined.
     456 |        history = ( elem.val() !== '' ) ? JSON.parse( elem.val()
 ) : [],
                                                    ^ 'JSON' is not
 defined.
     467 |        elem.val( JSON.stringify(history) );
                            ^ 'JSON' is not defined.
     500 |        sel = JSON.parse(sel);
                        ^ 'JSON' is not defined.
     519 |            history = ( elem.val() !== '' ) ? JSON.parse(
 elem.val() ) : [];
                                                        ^ 'JSON' is not
 defined.
    src/wp-includes/js/autosave.js
     124 |                        stored_obj = JSON.parse( stored_obj );
                                               ^ 'JSON' is not defined.
     145 |                    sessionStorage.setItem( key, JSON.stringify(
 stored_obj ) );
                                                           ^ 'JSON' is not
 defined.
    src/wp-includes/js/customize-base.js
     578 |            message = JSON.parse( event.data );
                                ^ 'JSON' is not defined.
     603 |            this.targetWindow().postMessage( JSON.stringify(
 message ), this.origin() );
                                                       ^ 'JSON' is not
 defined.
    src/wp-includes/js/plupload/wp-plupload.js
     260 |                response = JSON.parse( response.response );
                                     ^ 'JSON' is not defined.

 >> 16 errors in 78 files
 Warning: Task "jshint:core" failed. Use --force to continue.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31488>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list