Skip to content

Commit

Permalink
Linted
Browse files Browse the repository at this point in the history
  • Loading branch information
stephband committed Oct 28, 2016
1 parent 37f70a9 commit f910058
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"block-scoped-var": "off",
"block-spacing": ["error", "always"],
"brace-style": "off",
"callback-return": "error",
"callback-return": "off",
"camelcase": "off",
"class-methods-use-this": "error",
"comma-dangle": [
Expand Down
60 changes: 29 additions & 31 deletions js/jquery.event.move.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,38 +40,38 @@
// Shim for requestAnimationFrame, falling back to timer. See:
// see http://paulirish.com/2011/requestanimationframe-for-smart-animating/
var requestFrame = (function(){
return (
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(fn, element){
return window.setTimeout(function(){
fn();
}, 25);
}
);
})();
return (
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(fn, element){
return window.setTimeout(function(){
fn();
}, 25);
}
);
})();

var ignoreTags = {
textarea: true,
input: true,
select: true,
button: true
};
textarea: true,
input: true,
select: true,
button: true
};

var mouseevents = {
move: 'mousemove',
cancel: 'mouseup dragstart',
end: 'mouseup'
};
move: 'mousemove',
cancel: 'mouseup dragstart',
end: 'mouseup'
};

var touchevents = {
move: 'touchmove',
cancel: 'touchend',
end: 'touchend'
};
move: 'touchmove',
cancel: 'touchend',
end: 'touchend'
};

var rspaces = /\s+/;

Expand All @@ -80,7 +80,7 @@

var eventOptions = { bubbles: true, cancelable: true };

var eventsSymbol = Symbol();
var eventsSymbol = Symbol('events');

function createEvent(type) {
return new CustomEvent(type, eventOptions);
Expand Down Expand Up @@ -238,8 +238,6 @@
// Handlers that decide when the first movestart is triggered

function mousedown(e){
var data;

// Ignore non-primary buttons
if (!isPrimaryButton(e)) { return; }

Expand All @@ -265,7 +263,7 @@

function touchstart(e) {
// Don't get in the way of interaction with form elements
if (ignoreTags[ e.target.tagName.toLowerCase() ]) { return; }
if (ignoreTags[e.target.tagName.toLowerCase()]) { return; }

var touch = e.changedTouches[0];

Expand Down Expand Up @@ -412,7 +410,7 @@
if (!touch) { return; }

removeActiveTouch(data);
endEvent(e.target, event, timer);
endEvent(target, event, timer);
}

function removeActiveTouch(data) {
Expand Down
26 changes: 13 additions & 13 deletions npm-debug.log
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
2 info using npm@3.10.7
3 info using node@v6.7.0
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle jquery.event.move@1.3.6~prelint: jquery.event.move@1.3.6
6 silly lifecycle jquery.event.move@1.3.6~prelint: no script for prelint, continuing
7 info lifecycle jquery.event.move@1.3.6~lint: jquery.event.move@1.3.6
8 verbose lifecycle jquery.event.move@1.3.6~lint: unsafe-perm in lifecycle true
9 verbose lifecycle jquery.event.move@1.3.6~lint: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/stephband/Sites/jquery.event.move/node_modules/.bin:/usr/local/Cellar/node/6.7.0/bin:/usr/local/sbin:/usr/local/bin:/Users/stephband/.rbenv/shims:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/stephband/.rbenv/shims:/Users/stephband/.rbenv/bin:/usr/local/share/python:/usr/local/bin:/usr/local/share/npm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
10 verbose lifecycle jquery.event.move@1.3.6~lint: CWD: /Users/stephband/Sites/jquery.event.move
11 silly lifecycle jquery.event.move@1.3.6~lint: Args: [ '-c', 'eslint js/jquery.event.move.js js/dom.event.move.js' ]
12 silly lifecycle jquery.event.move@1.3.6~lint: Returned: code: 1 signal: null
13 info lifecycle jquery.event.move@1.3.6~lint: Failed to exec lint script
14 verbose stack Error: jquery.event.move@1.3.6 lint: `eslint js/jquery.event.move.js js/dom.event.move.js`
5 info lifecycle jquery.event.move@2.0.0~prelint: jquery.event.move@2.0.0
6 silly lifecycle jquery.event.move@2.0.0~prelint: no script for prelint, continuing
7 info lifecycle jquery.event.move@2.0.0~lint: jquery.event.move@2.0.0
8 verbose lifecycle jquery.event.move@2.0.0~lint: unsafe-perm in lifecycle true
9 verbose lifecycle jquery.event.move@2.0.0~lint: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/stephband/Sites/jquery.event.move/node_modules/.bin:/usr/local/Cellar/node/6.7.0/bin:/usr/local/sbin:/usr/local/bin:/Users/stephband/.rbenv/shims:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/stephband/.rbenv/shims:/Users/stephband/.rbenv/bin:/usr/local/share/python:/usr/local/bin:/usr/local/share/npm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
10 verbose lifecycle jquery.event.move@2.0.0~lint: CWD: /Users/stephband/Sites/jquery.event.move
11 silly lifecycle jquery.event.move@2.0.0~lint: Args: [ '-c', 'eslint js/jquery.event.move.js js/dom.event.move.js' ]
12 silly lifecycle jquery.event.move@2.0.0~lint: Returned: code: 1 signal: null
13 info lifecycle jquery.event.move@2.0.0~lint: Failed to exec lint script
14 verbose stack Error: jquery.event.move@2.0.0 lint: `eslint js/jquery.event.move.js js/dom.event.move.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
Expand All @@ -25,16 +25,16 @@
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid jquery.event.move@1.3.6
15 verbose pkgid jquery.event.move@2.0.0
16 verbose cwd /Users/stephband/Sites/jquery.event.move
17 error Darwin 15.6.0
18 error argv "/usr/local/Cellar/node/6.7.0/bin/node" "/usr/local/bin/npm" "run" "lint"
19 error node v6.7.0
20 error npm v3.10.7
21 error code ELIFECYCLE
22 error jquery.event.move@1.3.6 lint: `eslint js/jquery.event.move.js js/dom.event.move.js`
22 error jquery.event.move@2.0.0 lint: `eslint js/jquery.event.move.js js/dom.event.move.js`
22 error Exit status 1
23 error Failed at the jquery.event.move@1.3.6 lint script 'eslint js/jquery.event.move.js js/dom.event.move.js'.
23 error Failed at the jquery.event.move@2.0.0 lint script 'eslint js/jquery.event.move.js js/dom.event.move.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the jquery.event.move package,
23 error not with npm itself.
Expand Down

0 comments on commit f910058

Please sign in to comment.