Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable eslint space-unary-ops #3588

Merged
merged 1 commit into from Jan 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions .eslintrc
Expand Up @@ -337,11 +337,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