Skip to content

Commit

Permalink
style(code-review): adds the respective code review corrections as di…
Browse files Browse the repository at this point in the history
…rected
  • Loading branch information
arjunkathuria authored and arschmitz committed Sep 30, 2016
1 parent adafc8f commit 6b415f6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
"indent": 2,
"predef": [
"document",
"window",
"define",
"module"
"window"
],
"browser": true,
"boss": true,
"curly": true,
"debug": false,
"devel": true,
"eqeqeq": true,
"expr": true,
"validthis": true,
"evil": true,
Expand Down
6 changes: 4 additions & 2 deletions src/inputjs/compute-delta-xy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { INPUT_START,INPUT_END } from './input-consts';
import { INPUT_START, INPUT_END } from './input-consts';

export default function computeDeltaXY(session, input) {
let { center } = input;
let offset = session.offsetDelta || {}; // could be further deconstructed later on
// let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;
// jscs throwing error on defalut destructured values and without defaults tests fail
let offset = session.offsetDelta || {};
let prevDelta = session.prevDelta || {};
let prevInput = session.prevInput || {};

Expand Down
3 changes: 1 addition & 2 deletions src/inputjs/compute-input-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ export default function computeInputData(manager, input) {
session.firstMultiple = false;
}

let { firstInput } = session;
let { firstMultiple } = session;
let { firstInput, firstMultiple } = session;
let offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;

let center = input.center = getCenter(pointers);
Expand Down
2 changes: 2 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ assign(Hammer, {
let freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line
freeGlobal.Hammer = Hammer;

/* jshint ignore:start */
if (typeof define === 'function' && define.amd) {
define(function() {
return Hammer;
Expand All @@ -135,3 +136,4 @@ if (typeof define === 'function' && define.amd) {
} else {
window[exportName] = Hammer;
}
/* jshint ignore:end */
2 changes: 1 addition & 1 deletion src/recognizers/swipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ inherit(SwipeRecognizer, AttrRecognizer, {
},

attrTest(input) {
let { options:{ direction } } = this;
let { direction } = this.options;
let velocity;

if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {
Expand Down
3 changes: 1 addition & 2 deletions src/utils/utils-consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ const TEST_ELEMENT = document.createElement('div');

const TYPE_FUNCTION = 'function';

const { round } = Math;
const { abs } = Math;
const { round, abs } = Math;
const { now } = Date;

export {
Expand Down

0 comments on commit 6b415f6

Please sign in to comment.