Yuki Takei 7 лет назад
Родитель
Сommit
abef24849f
2 измененных файлов с 13 добавлено и 4 удалено
  1. 9 0
      .eslintrc.js
  2. 4 4
      src/migrations/20181019114028-abolish-page-group-relation.js

+ 9 - 0
.eslintrc.js

@@ -29,6 +29,8 @@ module.exports = {
       "stroustrup",
       { "allowSingleLine": true },
     ],
+    'class-methods-use-this': 'off',
+    'consistent-return': 'off',
     "global-require": 'off',
     "key-spacing": [
       'error',
@@ -40,6 +42,7 @@ module.exports = {
         ignoreTrailingComments: true
       }
     ],
+    'no-continue': 'off',
     "no-param-reassign": [
       "error",
       { "props": false }
@@ -66,6 +69,7 @@ module.exports = {
       },
     ],
     'no-shadow': 'off',
+    'no-underscore-dangle': 'off',
     "prefer-destructuring": 'off',
     "indent": [
       "error",
@@ -97,6 +101,11 @@ module.exports = {
       "error",
       { "args": "none" }
     ],
+    'react/destructuring-assignment': 'off',
+    'react/forbid-prop-types': 'off',
+    'react/no-unused-prop-types': 'off',
+    'react/require-default-props': 'off',
+    'react/sort-comp': 'off',
     // "react/jsx-uses-vars": 1,
     // "react/no-string-refs": "off",
     "semi": [

+ 4 - 4
src/migrations/20181019114028-abolish-page-group-relation.js

@@ -43,7 +43,7 @@ module.exports = {
     // retrieve all documents from 'pagegrouprelations'
     const relations = await db.collection('pagegrouprelations').find().toArray();
 
-    /* eslint-disable no-continue, no-await-in-loop */
+    /* eslint-disable no-await-in-loop */
     for (const relation of relations) {
       const page = await Page.findOne({ _id: relation.targetPage });
 
@@ -80,7 +80,7 @@ module.exports = {
     // retrieve all Page documents which granted by UserGroup
     const relatedPages = await Page.find({ grant: Page.GRANT_USER_GROUP });
     const insertDocs = [];
-    /* eslint-disable no-continue, no-await-in-loop */
+    /* eslint-disable no-await-in-loop */
     for (const page of relatedPages) {
       if (page.grantedGroup == null) {
         continue;
@@ -95,8 +95,8 @@ module.exports = {
 
       // create a new document for 'pagegrouprelations' collection that is managed by mongoose
       insertDocs.push({
-        targetPage: page._id, // eslint-disable-line no-underscore-dangle
-        relatedGroup: userGroup._id, // eslint-disable-line no-underscore-dangle
+        targetPage: page._id,
+        relatedGroup: userGroup._id,
         __v: 0,
       });