Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove NodeJS global

Manav Rathi2724760d6ccf
diff --git a/desktop/.eslintrc.js b/desktop/.eslintrc.js
index a47eb483fd..977071a270 100644
--- a/desktop/.eslintrc.js
+++ b/desktop/.eslintrc.js
@@ -7,11 +7,6 @@ module.exports = {
// "plugin:@typescript-eslint/strict-type-checked",
// "plugin:@typescript-eslint/stylistic-type-checked",
],
- /* Temporarily add a global
- Enhancement: Remove me */
- globals: {
- NodeJS: "readonly",
- },
plugins: ["@typescript-eslint"],
parser: "@typescript-eslint/parser",
parserOptions: {
diff --git a/desktop/src/main/stream.ts b/desktop/src/main/stream.ts
index bae4e6afe0..88d85db8e8 100644
--- a/desktop/src/main/stream.ts
+++ b/desktop/src/main/stream.ts
@@ -61,9 +61,12 @@ const handleRead = async (path: string) => {
// headers, but I couldn't find documentation for this. In any case,
// since we already are stat-ting the file for the "Content-Length",
// we explicitly add the "X-Last-Modified-Ms" too,
- // 1. guaranteeing its presence
- // 2. having it be in the exact format we want (no string <-> date
- // conversions)
+ //
+ // 1. Guaranteeing its presence,
+ //
+ // 2. Having it be in the exact format we want (no string <-> date
+ // conversions),
+ //
// 3. Retaining milliseconds.
const stat = await fs.stat(path);
@@ -137,10 +140,7 @@ const convertWebReadableStreamToNode = (readableStream: ReadableStream) => {
return rs;
};
-const writeNodeStream = async (
- filePath: string,
- fileStream: NodeJS.ReadableStream,
-) => {
+const writeNodeStream = async (filePath: string, fileStream: Readable) => {
const writeable = createWriteStream(filePath);
fileStream.on("error", (error) => {