]> source.dussan.org Git - jquery-ui.git/commitdiff
JSCS config: Set requireSpaceBeforeBinaryOperators, fix occurences
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 9 Dec 2013 12:02:19 +0000 (13:02 +0100)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 9 Dec 2013 12:02:19 +0000 (13:02 +0100)
.jscs.json
Gruntfile.js
ui/jquery.ui.mouse.js

index b782284315a1eaccf3fe059f8bbb9c4d24dd933f..f832638f4b3175966c3e8e7e2ef5baa8885c8103 100644 (file)
@@ -12,6 +12,7 @@
     "requireSpacesInsideArrayBrackets": "all",
     "disallowLeftStickedOperators": [ "?", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<=" ],
     "disallowRightStickedOperators": [ "?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
+    "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
     "requireRightStickedOperators": [ "!" ],
     "requireLeftStickedOperators": [ "," ],
     "disallowKeywords": [ "with" ],
index 242f3459f1f4fb0f081f888f999eb092bd636edd..31b21d910555ca24572cdf24fe97c72d035bae76 100644 (file)
@@ -124,7 +124,7 @@ function createBanner( files ) {
        return "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
                "<%= grunt.template.today('isoDate') %>\n" +
                "<%= pkg.homepage ? '* ' + pkg.homepage + '\\n' : '' %>" +
-               (files ? "* Includes: " + fileNames.join(", ") + "\n" : "")+
+               (files ? "* Includes: " + fileNames.join(", ") + "\n" : "") +
                "* Copyright <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>;" +
                " Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */\n";
 }
index 36b9f2ba02f1933f114deed48364a11dc5fc1eaf..ce1ecca72dac5e90bb8862a73c1ff4067ae49bbc 100644 (file)
@@ -29,10 +29,10 @@ $.widget("ui.mouse", {
                var that = this;
 
                this.element
-                       .bind("mousedown."+this.widgetName, function(event) {
+                       .bind("mousedown." + this.widgetName, function(event) {
                                return that._mouseDown(event);
                        })
-                       .bind("click."+this.widgetName, function(event) {
+                       .bind("click." + this.widgetName, function(event) {
                                if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
                                        $.removeData(event.target, that.widgetName + ".preventClickEvent");
                                        event.stopImmediatePropagation();
@@ -46,11 +46,11 @@ $.widget("ui.mouse", {
        // TODO: make sure destroying one instance of mouse doesn't mess with
        // other instances of mouse
        _mouseDestroy: function() {
-               this.element.unbind("."+this.widgetName);
+               this.element.unbind("." + this.widgetName);
                if ( this._mouseMoveDelegate ) {
                        this.document
-                               .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
-                               .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
+                               .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate)
+                               .unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
                }
        },