Skip to:

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#5613 closed defect (bug) (fixed)

fix javascript to pass jshitn

Reported by: djpaul's profile DJPaul Owned by: djpaul's profile djpaul
Milestone: 2.1 Priority: normal
Severity: normal Version:
Component: Core Keywords:


In #5160, we've recently adopted a Grunt build process. Part of that process checks for well-written Javascript using the jshint library (see the .jshintrc file in the root of trunk for its config file). It's no surprise that some of our Javascript is pretty old, and it's causing a lot of failures in jshint.

This ticket is to cover a series of commits to get jshint to pass. I will not be testing the majority of these changes due to the volume, but as we've not even formally started the 2.1 cycle, we have lots of time to capture any breakage during 2.1's development cycle and test periods.

Change History (6)

#1 @djpaul
9 years ago

In 8377:

Update jshintrc for a common global we reference.

See #5613

#2 @djpaul
9 years ago

In 8378:

Javascript: first pass at improvements for jshint

See #5613

#3 @djpaul
9 years ago

In 8379:

Templates: remove the easing plugin

The easing library we were using (in only two places) is a sizeable
chunk of code that would need a reasonable amount of modification to
bring up to WP standards.

Instead, I’ve decided to remove it and just use the ‘swing’ easing
type, which comes bundled with jQuery.

See #5613

#4 @djpaul
9 years ago

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

In 8380:

Grunt: exclude BP-Default and BP-Legacy from jshint

These JS files contains a lot of legacy JS, requiring a lot of effort
to bring up to standards. It’s better to do that incrementally as part
of template improvements, rather than just to make jshint happy. For
now, let’s exclude these from further jshint checks.

Fixes #5613, see also #5160

#5 @johnjamesjacoby
8 years ago

  • Component changed from Component - Any/All to Tools - Code Improvement

#6 @DJPaul
7 years ago

  • Component changed from Tools - Code Improvement to Core
Note: See TracTickets for help on using tickets.