Forráskód Böngészése

forget console.log

Michael Wang 6 éve
szülő
commit
6a41f0ff14
2 módosított fájl, 6 hozzáadás és 1 törlés
  1. 2 1
      .eslintrc.js
  2. 4 0
      babel.config.js

+ 2 - 1
.eslintrc.js

@@ -5,7 +5,8 @@ module.exports = {
   },
   extends: ["plugin:vue/essential", "@vue/prettier"],
   rules: {
-    "no-console": process.env.NODE_ENV === "production" ? "error" : "off",
+    // "no-console": process.env.NODE_ENV === "production" ? "error" : "off",
+    "no-console": "off",
     "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
     "vue/no-parsing-error": [2, { "x-invalid-end-tag": false }]
   },

+ 4 - 0
babel.config.js

@@ -10,6 +10,10 @@ module.exports = {
     ]
   ],
   env: {
+    //Fixme: not valid
+    staging: {
+      plugins: ["transform-remove-console"]
+    },
     production: {
       plugins: ["transform-remove-console"]
     }