WordPress.org

Make WordPress Core

#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:

Description

Patch to come

Attachments (4)

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

Download all attachments as: .zip

Change History (9)

@dougwollison17 months ago

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

comment:1 @dougwollison17 months ago

  • Keywords has-patch added

@dougwollison17 months ago

Revised declaration of globals.

@dougwollison17 months ago

Just the jshint fixes.

@mattwiebe16 months ago

comment:2 @mattwiebe16 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 @MattyRob16 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 16 months ago by MattyRob (previous) (diff)

comment:4 @nacin16 months ago

  • Milestone changed from Awaiting Review to 3.8

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

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

comment:5 @nacin16 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.