Skip to content

Commit

Permalink
Merge pull request #1878 from reactioncommerce/lint-updates
Browse files Browse the repository at this point in the history
Lint updates
  • Loading branch information
Aaron Judd authored Feb 22, 2017
2 parents 7798d7d + c5b052d commit c5f7a95
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
/**
* Best practices
*/
"consistent-return": [1, { // http://eslint.org/docs/rules/consistent-return
"treatUndefinedAsUnspecified": false
"consistent-return": [0, { // http://eslint.org/docs/rules/consistent-return
"treatUndefinedAsUnspecified": true
}],
"curly": [2, "multi-line"], // http://eslint.org/docs/rules/curly
"default-case": 2, // http://eslint.org/docs/rules/default-case
Expand Down
10 changes: 5 additions & 5 deletions imports/plugins/core/layout/client/templates/theme/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import { Packages, Shops } from "/lib/collections";
* @returns {Object|null} The layout hash
*/
function getRouteLayout(context) {
const package = Packages.findOne({ "registry.name": context.route.name, "enabled": true });
const pkg = Packages.findOne({ "registry.name": context.route.name, "enabled": true });

if(package) {
const registryRoute = package.registry.find((x) => {
if (pkg) {
const registryRoute = pkg.registry.find((x) => {
return x.name === context.route.name;
});

Expand Down Expand Up @@ -41,6 +41,7 @@ function getRouteLayout(context) {
* addBodyClasses
* Adds body classes to help themes distinguish pages and components based on the current route name and layout theme
* @param {Object} context - route context
* @returns {undefined}
*/
function addBodyClasses(context) {
let classes;
Expand All @@ -62,8 +63,7 @@ function addBodyClasses(context) {
// add theme class for route layout or default
if (currentLayout && currentLayout.theme) {
classes.push(currentLayout.theme);
}
else {
} else {
classes.push("default");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Template.coreOrderShippingTracking.events({
Meteor.call("shipping/status/refresh", orderId, (result) => {
if (result.error) {
instance.$("#btn-processing").addClass("hidden");
Alerts.toast(i18next.t("orderShipping.labelError", { err: result.error }), "error", { "timeout": 7000 });
Alerts.toast(i18next.t("orderShipping.labelError", { err: result.error }), "error", { timeout: 7000 });
}
});
},
Expand Down
2 changes: 1 addition & 1 deletion server/methods/accounts/accounts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from "lodash";
import moment from "moment";
import path from "path";
import { Accounts as MeteorAccounts } from "meteor/accounts-base"
import { Accounts as MeteorAccounts } from "meteor/accounts-base";
import { Accounts, Cart, Media, Shops, Packages } from "/lib/collections";
import * as Schemas from "/lib/collections/schemas";
import { Logger, Reaction } from "/server/api";
Expand Down

0 comments on commit c5f7a95

Please sign in to comment.