Yuki Takei 7 лет назад
Родитель
Сommit
97c25f84d1
3 измененных файлов с 9 добавлено и 21 удалено
  1. 5 17
      .eslintrc.js
  2. 1 1
      config/webpack.prod.js
  3. 3 3
      src/migrations/20180927102719-init-serverurl.js

+ 5 - 17
.eslintrc.js

@@ -65,15 +65,8 @@ module.exports = {
         message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
         message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
       },
       },
     ],
     ],
+    'no-shadow': 'off',
     "prefer-destructuring": 'off',
     "prefer-destructuring": 'off',
-    // "comma-spacing": [
-    //   "error",
-    //   { "before": false, "after": true }
-    // ],
-    // "func-call-spacing": [
-    //   "error",
-    //   "never"
-    // ],
     "indent": [
     "indent": [
       "error",
       "error",
       2,
       2,
@@ -100,15 +93,10 @@ module.exports = {
     //   "error",
     //   "error",
     //   "unix"
     //   "unix"
     // ],
     // ],
-    // "no-unused-vars": [
-    //   "error",
-    //   { "args": "none" }
-    // ],
-    // "no-var": [ "error" ],
-    // "quotes": [
-    //   "error",
-    //   "single"
-    // ],
+    "no-unused-vars": [
+      "error",
+      { "args": "none" }
+    ],
     // "react/jsx-uses-vars": 1,
     // "react/jsx-uses-vars": 1,
     // "react/no-string-refs": "off",
     // "react/no-string-refs": "off",
     "semi": [
     "semi": [

+ 1 - 1
config/webpack.prod.js

@@ -35,7 +35,7 @@ module.exports = require('./webpack.common')({
             loader: 'postcss-loader',
             loader: 'postcss-loader',
             options: {
             options: {
               sourceMap: false,
               sourceMap: false,
-              plugins: (loader) => { // eslint-disable-line no-unused-vars
+              plugins: (loader) => {
                 return [
                 return [
                   require('autoprefixer')(),
                   require('autoprefixer')(),
                 ];
                 ];

+ 3 - 3
src/migrations/20180927102719-init-serverurl.js

@@ -18,7 +18,7 @@ function isAllValuesSame(array) {
 
 
 module.exports = {
 module.exports = {
 
 
-  async up(db) { // eslint-disable-line no-unused-vars
+  async up(db) {
     logger.info('Apply migration');
     logger.info('Apply migration');
     mongoose.connect(config.mongoUri, config.mongodb.options);
     mongoose.connect(config.mongoUri, config.mongodb.options);
 
 
@@ -53,7 +53,7 @@ module.exports = {
       logger.info(configs);
       logger.info(configs);
 
 
       // extract domain
       // extract domain
-      const siteUrls = configs.map((config) => { // eslint-disable-line no-shadow
+      const siteUrls = configs.map((config) => {
         // see https://regex101.com/r/Q0Isjo/2
         // see https://regex101.com/r/Q0Isjo/2
         const match = config.value.match(/^"(https?:\/\/[^/]+).*"$/);
         const match = config.value.match(/^"(https?:\/\/[^/]+).*"$/);
         return (match != null) ? match[1] : null;
         return (match != null) ? match[1] : null;
@@ -71,7 +71,7 @@ module.exports = {
     }
     }
   },
   },
 
 
-  async down(db) { // eslint-disable-line no-unused-vars
+  async down(db) {
     logger.info('Undo migration');
     logger.info('Undo migration');
     mongoose.connect(config.mongoUri, config.mongodb.options);
     mongoose.connect(config.mongoUri, config.mongodb.options);