WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#26034 closed defect (bug) (fixed)

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

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

Description

Resolving JSHint errors as shown:

Linting src/wp-admin/js/link.js ...ERROR
[L25:C103] W033: Missing semicolon.
  newCat = $('#newcat').one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ) } );
Linting src/wp-admin/js/link.js ...ERROR
[L7:C5] W117: 'postboxes' is not defined.
  postboxes.add_postbox_toggles('link');
Linting src/wp-admin/js/link.js ...ERROR
[L16:C13] W117: 'deleteUserSetting' is not defined.
      deleteUserSetting('cats');
Linting src/wp-admin/js/link.js ...ERROR
[L18:C13] W117: 'setUserSetting' is not defined.
      setUserSetting('cats','pop');
Linting src/wp-admin/js/link.js ...ERROR
[L21:C10] W117: 'getUserSetting' is not defined.
  if ( getUserSetting('cats') )
Linting src/wp-admin/js/link.js ...ERROR
[L54:C53] W117: 'deleteUserSetting' is not defined.
  $('a[href="#categories-all"]').click(function(){deleteUserSetting('cats');});
Linting src/wp-admin/js/link.js ...ERROR
[L55:C53] W117: 'setUserSetting' is not defined.
  $('a[href="#categories-pop"]').click(function(){setUserSetting('cats','pop');});
Linting src/wp-admin/js/link.js ...ERROR
[L56:C19] W117: 'getUserSetting' is not defined.
  if ( 'pop' == getUserSetting('cats') )

Attachments (1)

26034.patch (818 bytes) - added by seanchayes 6 years ago.

Download all attachments as: .zip

Change History (4)

@seanchayes
6 years ago

#1 @seanchayes
6 years ago

  • Keywords has-patch added

#2 @nacin
6 years ago

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

In 26200:

Fix JSHint errors in 5 files.

props seanchayes.
fixes #26015, #26020, #26019, #26034, #26022.

#3 @nacin
6 years ago

  • Milestone changed from Awaiting Review to 3.8

Moving fixed JSHint error tickets to 3.8.

Note: See TracTickets for help on using tickets.