Sfoglia il codice sorgente

Merge pull request #14396 from overleaf/jpa-prettier-module-scripts

[web] enable prettier for module scripts and ignore some more paths

GitOrigin-RevId: f130e420d6fd1a85e85d994d342d49fdffca813a
Jakob Ackermann 3 anni fa
parent
commit
aa2c200200

+ 2 - 1
services/web/.prettierignore

@@ -1,6 +1,7 @@
 # NOTE: changing paths may require updating them in the Makefile too.
+data/
+scripts/translations/.cache/
 node_modules
-modules/**/scripts
 frontend/js/vendor
 modules/**/frontend/js/vendor
 public/js

+ 11 - 2
services/web/modules/server-ce-scripts/scripts/change-compile-timeout.js

@@ -1,5 +1,9 @@
 const minimist = require('minimist')
-const { db, ObjectId, waitForDb } = require('../../../app/src/infrastructure/mongodb')
+const {
+  db,
+  ObjectId,
+  waitForDb,
+} = require('../../../app/src/infrastructure/mongodb')
 
 async function main() {
   await waitForDb()
@@ -10,7 +14,12 @@ async function main() {
 
   const { 'user-id': userId, 'compile-timeout': rawCompileTimeout } = argv
   const compileTimeout = parseInt(rawCompileTimeout, 10)
-  if (!userId || !ObjectId.isValid(userId) || !rawCompileTimeout || Number.isNaN(compileTimeout)) {
+  if (
+    !userId ||
+    !ObjectId.isValid(userId) ||
+    !rawCompileTimeout ||
+    Number.isNaN(compileTimeout)
+  ) {
     console.error(
       `Usage: node ${__filename} --user-id=5a9414f259776c7900b300e6 --timeout=90`
     )