소스 검색

- Fix lint errors and warnings.

Thanks to xet7 !
Lauri Ojansivu 6 년 전
부모
커밋
58855ada97
3개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제
  1. 1 1
      client/components/rules/rulesMain.js
  2. 6 6
      models/checklistItems.js
  3. 2 2
      server/rulesHelper.js

+ 1 - 1
client/components/rules/rulesMain.js

@@ -34,7 +34,7 @@ BlazeComponent.extendComponent({
       'click .js-goto-trigger' (event) {
         event.preventDefault();
         const ruleTitle = this.find('#ruleTitle').value;
-        if(ruleTitle != undefined && ruleTitle != ''){
+        if(ruleTitle !== undefined && ruleTitle !== ''){
           this.find('#ruleTitle').value = '';
           this.ruleName.set(ruleTitle);
           this.setTrigger();

+ 6 - 6
models/checklistItems.js

@@ -118,7 +118,7 @@ function publishCheckActivity(userId, doc){
   Activities.insert(act);
 }
 
-function publishChekListCompleted(userId, doc, fieldNames){
+function publishChekListCompleted(userId, doc){
   const card = Cards.findOne(doc.cardId);
   const boardId = card.boardId;
   const checklistId = doc.checklistId;
@@ -130,13 +130,13 @@ function publishChekListCompleted(userId, doc, fieldNames){
       cardId: doc.cardId,
       boardId,
       checklistId: doc.checklistId,
-      checklistName:checkList.title,
+      checklistName: checkList.title,
     };
     Activities.insert(act);
   }
 }
 
-function publishChekListUncompleted(userId, doc, fieldNames){
+function publishChekListUncompleted(userId, doc){
   const card = Cards.findOne(doc.cardId);
   const boardId = card.boardId;
   const checklistId = doc.checklistId;
@@ -148,7 +148,7 @@ function publishChekListUncompleted(userId, doc, fieldNames){
       cardId: doc.cardId,
       boardId,
       checklistId: doc.checklistId,
-      checklistName:checkList.title,
+      checklistName: checkList.title,
     };
     Activities.insert(act);
   }
@@ -160,12 +160,12 @@ if (Meteor.isServer) {
     ChecklistItems._collection._ensureIndex({ checklistId: 1 });
   });
 
-  ChecklistItems.after.update((userId, doc, fieldNames, modifier) => {
+  ChecklistItems.after.update((userId, doc, fieldNames) => {
     publishCheckActivity(userId, doc);
     publishChekListCompleted(userId, doc, fieldNames);
   });
 
-  ChecklistItems.before.update((userId, doc, fieldNames, modifier) => {
+  ChecklistItems.before.update((userId, doc, fieldNames) => {
     publishChekListUncompleted(userId, doc, fieldNames);
   });
 

+ 2 - 2
server/rulesHelper.js

@@ -3,7 +3,7 @@ RulesHelper = {
     const matchingRules = this.findMatchingRules(activity);
     for(let i = 0; i< matchingRules.length; i++){
       const action = matchingRules[i].getAction();
-      if(action != undefined){
+      if(action !== undefined){
         this.performAction(activity, action);
       }
     }
@@ -21,7 +21,7 @@ RulesHelper = {
       const rule = trigger.getRule();
       // Check that for some unknown reason there are some leftover triggers
       // not connected to any rules
-      if(rule != undefined){
+      if(rule !== undefined){
         matchingRules.push(trigger.getRule());
       }
     });