[wp-trac] [WordPress Trac] #25187: .jshintrc & .jshintignore support

WordPress Trac noreply at wordpress.org
Tue Nov 12 22:22:13 UTC 2013


#25187: .jshintrc & .jshintignore support
----------------------------------------+------------------------------
 Reporter:  carldanley                  |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  General                     |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  dev-feedback needs-testing  |
----------------------------------------+------------------------------

Comment (by tollmanz):

 25187.18.diff is a first pass at the merge of the sticky menu component
 into core. In the merge process, I have updated a few things:

 * I added a debounce function to the resize and scroll events. It is
 important that this is throttled
 * Everything was cleaned up to pass the jshint rules
 * All repeated selectors were cached

 A few questions about this:

 1. Given the integration into core via add JS to an existing JS file and
 CSS to an existing CSS file, I removed the PHP related to this component
 that only served to load the assets. One piece of that PHP is that it did
 not load this JS/CSS on mobile other than iPad. I could not figure out why
 this was a requirement. Is this needed? Obviously, where possible,
 especially with a project like WordPress, browser sniffing is not
 desirable, so it would be nice to remove this altogether, but I do not
 have an idea as to the implications of it.
 1. I stole Underscore.js's debounce function. I did not want to include
 Underscore.js as it would make Underscore.js a dependency for all of WP
 admin. Any thoughts use of this function?

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25187#comment:30>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list