From 7c403053e364ffe21d64edd961a55d0402582c07 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sun, 3 Dec 2017 04:00:55 +0200 Subject: Fix lint errors. --- models/cards.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'models/cards.js') diff --git a/models/cards.js b/models/cards.js index b62bfea8..8676dfdc 100644 --- a/models/cards.js +++ b/models/cards.js @@ -18,9 +18,9 @@ Cards.attachSchema(new SimpleSchema({ listId: { type: String, }, - // The system could work without this `boardId` information (we could deduce - // the board identifier from the card), but it would make the system more - // difficult to manage and less efficient. + // The system could work without this `boardId` information (we could deduce + // the board identifier from the card), but it would make the system more + // difficult to manage and less efficient. boardId: { type: String, }, @@ -146,8 +146,8 @@ Cards.helpers({ cover() { const cover = Attachments.findOne(this.coverId); - // if we return a cover before it is fully stored, we will get errors when we try to display it - // todo XXX we could return a default "upload pending" image in the meantime? + // if we return a cover before it is fully stored, we will get errors when we try to display it + // todo XXX we could return a default "upload pending" image in the meantime? return cover && cover.url() && cover; }, @@ -339,7 +339,7 @@ function cardMembers(userId, doc, fieldNames, modifier) { if (!_.contains(fieldNames, 'members')) return; let memberId; - // Say hello to the new member + // Say hello to the new member if (modifier.$addToSet && modifier.$addToSet.members) { memberId = modifier.$addToSet.members; if (!_.contains(doc.members, memberId)) { @@ -353,10 +353,10 @@ function cardMembers(userId, doc, fieldNames, modifier) { } } - // Say goodbye to the former member + // Say goodbye to the former member if (modifier.$pull && modifier.$pull.members) { memberId = modifier.$pull.members; - // Check that the former member is member of the card + // Check that the former member is member of the card if (_.contains(doc.members, memberId)) { Activities.insert({ userId, @@ -396,8 +396,8 @@ function cardRemover(userId, doc) { if (Meteor.isServer) { - // Cards are often fetched within a board, so we create an index to make these - // queries more efficient. + // Cards are often fetched within a board, so we create an index to make these + // queries more efficient. Meteor.startup(() => { Cards._collection._ensureIndex({boardId: 1, createdAt: -1}); }); @@ -406,24 +406,24 @@ if (Meteor.isServer) { cardCreation(userId, doc); }); - // New activity for card (un)archivage + // New activity for card (un)archivage Cards.after.update((userId, doc, fieldNames) => { cardState(userId, doc, fieldNames); }); - //New activity for card moves + //New activity for card moves Cards.after.update(function (userId, doc, fieldNames) { const oldListId = this.previous.listId; cardMove(userId, doc, fieldNames, oldListId); }); - // Add a new activity if we add or remove a member to the card + // Add a new activity if we add or remove a member to the card Cards.before.update((userId, doc, fieldNames, modifier) => { cardMembers(userId, doc, fieldNames, modifier); }); - // Remove all activities associated with a card if we remove the card - // Remove also card_comments / checklists / attachments + // Remove all activities associated with a card if we remove the card + // Remove also card_comments / checklists / attachments Cards.after.remove((userId, doc) => { cardRemover(userId, doc); }); @@ -498,12 +498,12 @@ if (Meteor.isServer) { if (req.body.hasOwnProperty('title')) { const newTitle = req.body.title; Cards.direct.update({_id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false}, - {$set: {title: newTitle}}); + {$set: {title: newTitle}}); } if (req.body.hasOwnProperty('listId')) { const newParamListId = req.body.listId; Cards.direct.update({_id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false}, - {$set: {listId: newParamListId}}); + {$set: {listId: newParamListId}}); const card = Cards.findOne({_id: paramCardId} ); cardMove(req.body.authorId, card, {fieldName: 'listId'}, paramListId); @@ -512,7 +512,7 @@ if (Meteor.isServer) { if (req.body.hasOwnProperty('description')) { const newDescription = req.body.description; Cards.direct.update({_id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false}, - {$set: {description: newDescription}}); + {$set: {description: newDescription}}); } JsonRoutes.sendResult(res, { code: 200, -- cgit v1.2.3-1-g7c22