Skip to content
Permalink
Browse files

JSCS config: Set requireSpaceBeforeBinaryOperators, fix occurences

  • Loading branch information
jzaefferer committed Dec 9, 2013
1 parent 8033cf4 commit 3e57b29267a8cf0e2ff72711e1ce06432961dcdf
Showing with 7 additions and 6 deletions.
  1. +1 −0 .jscs.json
  2. +1 −1 Gruntfile.js
  3. +5 −5 ui/jquery.ui.mouse.js
@@ -12,6 +12,7 @@
"requireSpacesInsideArrayBrackets": "all",
"disallowLeftStickedOperators": [ "?", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<=" ],
"disallowRightStickedOperators": [ "?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireRightStickedOperators": [ "!" ],
"requireLeftStickedOperators": [ "," ],
"disallowKeywords": [ "with" ],
@@ -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";
}
@@ -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);
}
},

0 comments on commit 3e57b29

Please sign in to comment.
You can’t perform that action at this time.