mw.widgets.CalendarWidget: Silence jshint for one line, not entire file
authorPrateek Saxena <prtksxna@gmail.com>
Wed, 29 Jul 2015 01:03:30 +0000 (06:33 +0530)
committerJforrester <jforrester@wikimedia.org>
Wed, 29 Jul 2015 15:42:44 +0000 (15:42 +0000)
Follows up I6f760f7c32e2e6ed2008e897af72fb9e17dd663b

Suppress warning at the specific line that uses the static keyword
rather than the entire file.

> Expected an identifier and instead saw 'static' (a reserved word). (W024)

Change-Id: I0e4f9062b01b82893205da9e72c41acae3d6967f

resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js

index 0d743e4..9016e89 100644 (file)
@@ -5,7 +5,6 @@
  * @license The MIT License (MIT); see LICENSE.txt
  */
 /*global moment */
-/*jshint es3: false */
 ( function ( $, mw ) {
 
        /**
         */
        mw.widgets.CalendarWidget.prototype.onKeyDown = function ( e ) {
                var
+                       /*jshint -W024*/
                        dir = OO.ui.Element.static.getDir( this.$element ),
+                       /*jshint +W024*/
                        nextDirectionKey = dir === 'ltr' ? OO.ui.Keys.RIGHT : OO.ui.Keys.LEFT,
                        prevDirectionKey = dir === 'ltr' ? OO.ui.Keys.LEFT : OO.ui.Keys.RIGHT,
                        updateInDirection = null;