Просмотр исходного кода

Merge pull request #2059 from overleaf/spd-no-console

Don't allow 'console.log' in backend code

GitOrigin-RevId: f52413b574487eef54e8bd27cc61d15a011beb6f
Alasdair Smith 7 лет назад
Родитель
Сommit
c8140f9641
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      services/web/.eslintrc

+ 7 - 0
services/web/.eslintrc

@@ -78,6 +78,13 @@
         // based on mocha's context mechanism
         "mocha/prefer-arrow-callback": "error"
       }
+    },
+    {
+      // don't allow console.log in backend code
+      "files": ["**/app/*/src/**/*.js"],
+      "rules": {
+        "no-console": "error"
+      }
     }
   ]
 }