Skip to content

Commit

Permalink
Merge pull request #3588 from reactioncommerce/feat-3573-fix-eslint-s…
Browse files Browse the repository at this point in the history
…pace-unary-ops

feat: Enable eslint space-unary-ops
  • Loading branch information
spencern committed Jan 26, 2018
2 parents 4fbaa08 + 883b775 commit 4f52668
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .eslintrc
Expand Up @@ -346,11 +346,11 @@
// "prefer-spread": "error",
// "prefer-template": "error",
// "rest-spread-spacing": ["error", "never"],
// "space-unary-ops": ["error", {
// "words": true,
// "nonwords": false,
// "overrides": {}
// }],
"space-unary-ops": ["error", {
"words": true,
"nonwords": false,
"overrides": {}
}],
// "template-curly-spacing": "error"
}
}
Expand Up @@ -74,7 +74,7 @@ MethodHooks.after("taxes/calculate", function (options) {
Price: items.variants.price,
Qty: items.quantity
};
index ++;
index++;
cartItems.push(item);
}
}
Expand Down
6 changes: 3 additions & 3 deletions server/api/core/rightJoin.js
Expand Up @@ -23,7 +23,7 @@ const doRightJoinNoIntersection = (leftSet, rightSet) => {
}
const findRightOnlyProperties = () => {
return Object.keys(rightSet).filter(function (key) {
if (typeof(rightSet[key]) === "object" &&
if (typeof (rightSet[key]) === "object" &&
!Array.isArray(rightSet[key])) {
// Nested objects are always considered
return true;
Expand All @@ -34,9 +34,9 @@ const doRightJoinNoIntersection = (leftSet, rightSet) => {
};

for (const key of findRightOnlyProperties()) {
if (typeof(rightSet[key]) === "object") {
if (typeof (rightSet[key]) === "object") {
// subobject or array
if (leftSet.hasOwnProperty(key) && (typeof(leftSet[key]) !== "object" ||
if (leftSet.hasOwnProperty(key) && (typeof (leftSet[key]) !== "object" ||
Array.isArray(leftSet[key]) !== Array.isArray(rightSet[ key ]))) {
// This is not expected!
throw new Error(
Expand Down

0 comments on commit 4f52668

Please sign in to comment.