Selaa lähdekoodia

[monorepo] format ts files (#28678)

* Add ts files to format package script

* Apply changes to service package.json files

* [monorepo] only support plain .ts files in all the services

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 882cf274da86a0dbe1fff395441f6f2458c1405c
Andrew Rumble 1 vuosi sitten
vanhempi
sitoutus
0200ad7515

+ 2 - 2
services/chat/package.json

@@ -12,8 +12,8 @@
     "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
     "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
     "test:unit:_run": "mocha --recursive --reporter spec --exit $@ test/unit/js",
     "test:unit:_run": "mocha --recursive --reporter spec --exit $@ test/unit/js",
     "lint": "eslint --max-warnings 0 --format unix .",
     "lint": "eslint --max-warnings 0 --format unix .",
-    "format": "prettier --list-different $PWD/'**/{*.*js,Jenkinsfile}'",
-    "format:fix": "prettier --write $PWD/'**/{*.*js,Jenkinsfile}'",
+    "format": "prettier --list-different $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
+    "format:fix": "prettier --write $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
     "lint:fix": "eslint --fix .",
     "lint:fix": "eslint --fix .",
     "types:check": "tsc --noEmit"
     "types:check": "tsc --noEmit"
   },
   },

+ 2 - 2
services/clsi/package.json

@@ -11,8 +11,8 @@
     "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
     "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
     "nodemon": "node --watch app.js",
     "nodemon": "node --watch app.js",
     "lint": "eslint --max-warnings 0 --format unix .",
     "lint": "eslint --max-warnings 0 --format unix .",
-    "format": "prettier --list-different $PWD/'**/{*.*js,Jenkinsfile}'",
-    "format:fix": "prettier --write $PWD/'**/{*.*js,Jenkinsfile}'",
+    "format": "prettier --list-different $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
+    "format:fix": "prettier --write $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
     "lint:fix": "eslint --fix .",
     "lint:fix": "eslint --fix .",
     "types:check": "tsc --noEmit"
     "types:check": "tsc --noEmit"
   },
   },

+ 2 - 2
services/contacts/package.json

@@ -12,8 +12,8 @@
     "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
     "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
     "nodemon": "node --watch app.js",
     "nodemon": "node --watch app.js",
     "lint": "eslint --max-warnings 0 --format unix .",
     "lint": "eslint --max-warnings 0 --format unix .",
-    "format": "prettier --list-different $PWD/'**/{*.*js,Jenkinsfile}'",
-    "format:fix": "prettier --write $PWD/'**/{*.*js,Jenkinsfile}'",
+    "format": "prettier --list-different $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
+    "format:fix": "prettier --write $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
     "lint:fix": "eslint --fix .",
     "lint:fix": "eslint --fix .",
     "types:check": "tsc --noEmit"
     "types:check": "tsc --noEmit"
   },
   },

+ 2 - 2
services/docstore/package.json

@@ -11,8 +11,8 @@
     "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
     "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
     "nodemon": "node --watch app.js",
     "nodemon": "node --watch app.js",
     "lint": "eslint --max-warnings 0 --format unix .",
     "lint": "eslint --max-warnings 0 --format unix .",
-    "format": "prettier --list-different $PWD/'**/{*.*js,Jenkinsfile}'",
-    "format:fix": "prettier --write $PWD/'**/{*.*js,Jenkinsfile}'",
+    "format": "prettier --list-different $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
+    "format:fix": "prettier --write $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
     "lint:fix": "eslint --fix .",
     "lint:fix": "eslint --fix .",
     "types:check": "tsc --noEmit"
     "types:check": "tsc --noEmit"
   },
   },

+ 2 - 2
services/document-updater/package.json

@@ -12,8 +12,8 @@
     "nodemon": "node --watch app.js",
     "nodemon": "node --watch app.js",
     "benchmark:apply": "node benchmarks/apply",
     "benchmark:apply": "node benchmarks/apply",
     "lint": "eslint --max-warnings 0 --format unix .",
     "lint": "eslint --max-warnings 0 --format unix .",
-    "format": "prettier --list-different $PWD/'**/{*.*js,Jenkinsfile}'",
-    "format:fix": "prettier --write $PWD/'**/{*.*js,Jenkinsfile}'",
+    "format": "prettier --list-different $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
+    "format:fix": "prettier --write $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
     "lint:fix": "eslint --fix .",
     "lint:fix": "eslint --fix .",
     "types:check": "tsc --noEmit"
     "types:check": "tsc --noEmit"
   },
   },

+ 2 - 2
services/filestore/package.json

@@ -11,8 +11,8 @@
     "start": "node app.js",
     "start": "node app.js",
     "nodemon": "node --watch app.js",
     "nodemon": "node --watch app.js",
     "lint": "eslint --max-warnings 0 --format unix .",
     "lint": "eslint --max-warnings 0 --format unix .",
-    "format": "prettier --list-different $PWD/'**/{*.*js,Jenkinsfile}'",
-    "format:fix": "prettier --write $PWD/'**/{*.*js,Jenkinsfile}'",
+    "format": "prettier --list-different $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
+    "format:fix": "prettier --write $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
     "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
     "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
     "test:unit:_run": "mocha --recursive --reporter spec --exit $@ test/unit/js",
     "test:unit:_run": "mocha --recursive --reporter spec --exit $@ test/unit/js",
     "lint:fix": "eslint --fix .",
     "lint:fix": "eslint --fix .",

+ 2 - 2
services/history-v1/package.json

@@ -62,8 +62,8 @@
     "start": "node app.js",
     "start": "node app.js",
     "lint": "eslint --max-warnings 0 --format unix .",
     "lint": "eslint --max-warnings 0 --format unix .",
     "lint:fix": "eslint --fix .",
     "lint:fix": "eslint --fix .",
-    "format": "prettier --list-different $PWD/'**/{*.*js,Jenkinsfile}'",
-    "format:fix": "prettier --write $PWD/'**/{*.*js,Jenkinsfile}'",
+    "format": "prettier --list-different $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
+    "format:fix": "prettier --write $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
     "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
     "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
     "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
     "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
     "test:unit:_run": "mocha --recursive --reporter spec --exit $@ test/unit/js",
     "test:unit:_run": "mocha --recursive --reporter spec --exit $@ test/unit/js",

+ 2 - 2
services/notifications/package.json

@@ -11,8 +11,8 @@
     "test:unit:_run": "vitest --config ./vitest.config.unit.cjs",
     "test:unit:_run": "vitest --config ./vitest.config.unit.cjs",
     "test:unit": "npm run test:unit:_run",
     "test:unit": "npm run test:unit:_run",
     "lint": "eslint --max-warnings 0 --format unix .",
     "lint": "eslint --max-warnings 0 --format unix .",
-    "format": "prettier --list-different $PWD/'**/{*.*js, *.*ts,Jenkinsfile}'",
-    "format:fix": "prettier --write $PWD/'**/{*.*js,*.*ts,Jenkinsfile}'",
+    "format": "prettier --list-different $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
+    "format:fix": "prettier --write $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
     "lint:fix": "eslint --fix .",
     "lint:fix": "eslint --fix .",
     "types:check": "tsc --noEmit",
     "types:check": "tsc --noEmit",
     "nodemon": "node --watch app.js"
     "nodemon": "node --watch app.js"

+ 2 - 2
services/project-history/package.json

@@ -12,8 +12,8 @@
     "test:acceptance:_run": "mocha --loader=esmock --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
     "test:acceptance:_run": "mocha --loader=esmock --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
     "test:unit:_run": "mocha --loader=esmock --recursive --reporter spec --exit $@ test/unit/js",
     "test:unit:_run": "mocha --loader=esmock --recursive --reporter spec --exit $@ test/unit/js",
     "lint": "eslint --max-warnings 0 --format unix .",
     "lint": "eslint --max-warnings 0 --format unix .",
-    "format": "prettier --list-different $PWD/'**/{*.*js,Jenkinsfile}'",
-    "format:fix": "prettier --write $PWD/'**/{*.*js,Jenkinsfile}'",
+    "format": "prettier --list-different $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
+    "format:fix": "prettier --write $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
     "lint:fix": "eslint --fix .",
     "lint:fix": "eslint --fix .",
     "types:check": "tsc --noEmit"
     "types:check": "tsc --noEmit"
   },
   },

+ 2 - 2
services/real-time/package.json

@@ -11,8 +11,8 @@
     "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
     "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
     "nodemon": "node --watch app.js",
     "nodemon": "node --watch app.js",
     "lint": "eslint --max-warnings 0 --format unix .",
     "lint": "eslint --max-warnings 0 --format unix .",
-    "format": "prettier --list-different $PWD/'**/{*.*js,Jenkinsfile}'",
-    "format:fix": "prettier --write $PWD/'**/{*.*js,Jenkinsfile}'",
+    "format": "prettier --list-different $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
+    "format:fix": "prettier --write $PWD/'**/{*.*js,*.ts,Jenkinsfile}'",
     "lint:fix": "eslint --fix .",
     "lint:fix": "eslint --fix .",
     "types:check": "tsc --noEmit"
     "types:check": "tsc --noEmit"
   },
   },