Make WordPress Core

Opened 2 years ago

Closed 22 months ago

#26029 closed defect (bug) (fixed)

jshint shouldn't throw errors: wp-admin/js/wp-fullscreen.js

Reported by: dougwollison Owned by: nacin
Milestone: 3.8 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:


Patch to come

Attachments (4)

26029.diff (26.3 KB) - added by dougwollison 2 years ago.
Initial changes: spacing, braces, equals, keys fixed and globals declared.
26029.2.diff (26.1 KB) - added by dougwollison 2 years ago.
Revised declaration of globals.
26029.3.diff (17.1 KB) - added by dougwollison 23 months ago.
Just the jshint fixes.
26029.4.diff​ (6.6 KB) - added by mattwiebe 23 months ago.

Download all attachments as: .zip

Change History (9)

@dougwollison2 years ago

Initial changes: spacing, braces, equals, keys fixed and globals declared.

comment:1 @dougwollison2 years ago

  • Keywords has-patch added

@dougwollison2 years ago

Revised declaration of globals.

@dougwollison23 months ago

Just the jshint fixes.

@mattwiebe23 months ago

comment:2 @mattwiebe23 months ago

@dougwollison your patches seem to have used basic jshint rather than grunt jshint:core --file=wp-fullscreen.js as instructed in the make/core post. The grunt version ignores eqeqeq and curly options for now, since there were too many of those errors to get in for this round.

I've attached a patch that ignores eqeqeq and curly errors. Also note that the file settles on tinymce rather than tinyMCE as the preferred global namespace in accordance with their docs.

comment:3 @MattyRob23 months ago

I have patched and tested 26029.4.diff and 26029.2.diff. Both appear to work fine to me.

On one hand I can see the need to apply these broad patches a little at a time and not worrying about everything now but then part of me also things if that patch file exists and seems okay why not commit now rather than deferring and doing it later.

UPDATE: The 26029.4.diff may be the better one to use as the other patch I tested leaves 2 unresolved errors.

Last edited 23 months ago by MattyRob (previous) (diff)

comment:4 @nacin22 months ago

  • Milestone changed from Awaiting Review to 3.8

tinymcePreInit is supposed to be tinyMCEPreInit, even though tinyMCE is tinymce.

Last edited 22 months ago by nacin (previous) (diff)

comment:5 @nacin22 months ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 26667:

Define globals and add semicolons to wp-fullscreen.js.

grunt jshint now runs clean for WordPress core!

props mattwiebe.
fixes #26029.

Note: See TracTickets for help on using tickets.