Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#26029 closed defect (bug) (fixed)

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

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

Description

Patch to come

Attachments (4)

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

Download all attachments as: .zip

Change History (9)

@dougwollison
13 years ago

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

#1 @dougwollison
13 years ago

  • Keywords has-patch added

@dougwollison
13 years ago

Revised declaration of globals.

@dougwollison
13 years ago

Just the jshint fixes.

#2 @mattwiebe
13 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
13 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 13 years ago by MattyRob (previous) (diff)

#4 @nacin
13 years ago

  • Milestone Awaiting Review → 3.8

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

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

#5 @nacin
13 years ago

  • Owner set to nacin
  • Resolution → fixed
  • Status new → 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.