Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#26029 closed defect (bug) (fixed)

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

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

Description

Patch to come

Attachments (4)

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

Download all attachments as: .zip

Change History (9)

@dougwollison
10 years ago

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

#1 @dougwollison
10 years ago

  • Keywords has-patch added

@dougwollison
10 years ago

Revised declaration of globals.

@dougwollison
10 years ago

Just the jshint fixes.

#2 @mattwiebe
10 years 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.

#3 @MattyRob
10 years 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 10 years ago by MattyRob (previous) (diff)

#4 @nacin
10 years ago

  • Milestone changed from Awaiting Review to 3.8

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

Last edited 10 years ago by nacin (previous) (diff)

#5 @nacin
10 years 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.