diff --git a/.jshintrc b/.jshintrc index 165f45bf..5e8108bf 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,20 +1,16 @@ { - "browser": true, - "node": true, - "wsh": true, - "evil": true, - "trailing": false, - "smarttabs": false, - "sub": true, - "supernew": true, - "laxbreak": true, - "eqeqeq": false, - "eqnull": true, - "loopfunc": true, - "boss": true, - "shadow": true, - "globals": { - "Event": true, - "MouseEvent": true - } + "browser": true, + "node": true, + "wsh": true, + "evil": true, + "trailing": false, + "smarttabs": false, + "sub": true, + "supernew": true, + "laxbreak": true, + "eqeqeq": false, + "eqnull": true, + "loopfunc": true, + "boss": true, + "shadow": true } diff --git a/src/core/PaperScript.js b/src/core/PaperScript.js index 023c1162..b8d4d4ac 100644 --- a/src/core/PaperScript.js +++ b/src/core/PaperScript.js @@ -14,7 +14,7 @@ * @name PaperScript * @namespace */ -/*jshint -W082 */ +/* jshint -W082 */ Base.exports.PaperScript = (function() { // Locally turn of exports and define for inlined acorn. // Just declaring the local vars is enough, as they will be undefined. diff --git a/src/dom/node.js b/src/dom/node.js index 59eacf53..db7c7a79 100644 --- a/src/dom/node.js +++ b/src/dom/node.js @@ -13,7 +13,9 @@ // Node.js emulation layer of browser based environment, based on node-canvas // and jsdom. -/*global document:true, window:true, navigator:true, HTMLCanvasElement:true, Image:true */ +/* global document:true, window:true, navigator:true, HTMLCanvasElement:true, + Image:true */ + var jsdom = require('jsdom'), // Node Canvas library: https://github.com/learnboost/node-canvas Canvas = require('canvas'), diff --git a/src/event/Event.js b/src/event/Event.js index bda4133a..7f197216 100644 --- a/src/event/Event.js +++ b/src/event/Event.js @@ -16,6 +16,7 @@ * @class The Event object is the base class for any of the other event types, * such as {@link MouseEvent}, {@link ToolEvent} and {@link KeyEvent}. */ +/* global Event: true */ var Event = Base.extend(/** @lends Event# */{ _class: 'Event', diff --git a/src/event/MouseEvent.js b/src/event/MouseEvent.js index 9d5a9832..f71199dd 100644 --- a/src/event/MouseEvent.js +++ b/src/event/MouseEvent.js @@ -22,6 +22,7 @@ * * @extends Event */ +/* global MouseEvent: true */ var MouseEvent = Event.extend(/** @lends MouseEvent# */{ _class: 'MouseEvent', diff --git a/src/net/Http.js b/src/net/Http.js index dddae221..7f737e89 100644 --- a/src/net/Http.js +++ b/src/net/Http.js @@ -14,8 +14,8 @@ var Http = { request: function(method, url, callback, async) { // Code borrowed from Coffee Script and extended: async = (async === undefined) ? true : async; - var xhrConstructor = window.ActiveXObject || XMLHttpRequest; - var xhr = new xhrConstructor('Microsoft.XMLHTTP'); + var ctor = window.ActiveXObject || XMLHttpRequest, + xhr = new ctor('Microsoft.XMLHTTP'); xhr.open(method.toUpperCase(), url, async); if ('overrideMimeType' in xhr) xhr.overrideMimeType('text/plain'); diff --git a/src/path/CompoundPath.js b/src/path/CompoundPath.js index ca59cc34..f1e2295f 100644 --- a/src/path/CompoundPath.js +++ b/src/path/CompoundPath.js @@ -177,7 +177,7 @@ var CompoundPath = PathItem.extend(/** @lends CompoundPath# */{ }, setClockwise: function(clockwise) { - /*jshint -W018 */ + /* jshint -W018 */ if (this.isClockwise() !== !!clockwise) this.reverse(); }, diff --git a/src/view/View.js b/src/view/View.js index 5c61a158..b08b70be 100644 --- a/src/view/View.js +++ b/src/view/View.js @@ -19,7 +19,7 @@ * center, both useful for constructing artwork that should appear centered on * screen. */ -/*jshint -W082 */ +/* jshint -W082 */ var View = Base.extend(Emitter, /** @lends View# */{ _class: 'View',