From 711803cbd062a32377995748dde58359f42352a6 Mon Sep 17 00:00:00 2001 From: Anto Christopher <93177734+anto-deepsource@users.noreply.github.com> Date: Mon, 17 Mar 2025 21:04:14 +0530 Subject: [PATCH 1/9] Update index.js --- index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.js b/index.js index de6dae1a..85fd43a9 100644 --- a/index.js +++ b/index.js @@ -88,3 +88,11 @@ function commentCheck(){ console.log("no comment") debugger } + +async function fetchData(): string { + // `readFileSync` is a synchronous function that blocks + // the main thread, and thus does not need to be `await`ed + return fs.readFileSync("data.txt", "utf-8"); +} + +performAction(async () => { console.log("no awaits in here") }); From 139ae87496ef2c24b6f16392ce1a4f3c5d10fcc6 Mon Sep 17 00:00:00 2001 From: Anto Christopher <93177734+anto-deepsource@users.noreply.github.com> Date: Mon, 17 Mar 2025 21:08:46 +0530 Subject: [PATCH 2/9] Create .eslintrc.json --- .eslintrc.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..66d3130a --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "root": true, + "rules": { + "require-await": "off" + } +} From a013514387e99b3e7ebf9ead15721184372b9ba7 Mon Sep 17 00:00:00 2001 From: Anto Christopher <93177734+anto-deepsource@users.noreply.github.com> Date: Mon, 17 Mar 2025 21:36:55 +0530 Subject: [PATCH 3/9] Update index.js --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 85fd43a9..b9565d05 100644 --- a/index.js +++ b/index.js @@ -89,7 +89,9 @@ function commentCheck(){ debugger } -async function fetchData(): string { +async function fetchData() { + let a = 1; + let aa = 2; // `readFileSync` is a synchronous function that blocks // the main thread, and thus does not need to be `await`ed return fs.readFileSync("data.txt", "utf-8"); From ea848a07b12dd7b5bd2a98e9ab82db2c7ce912cd Mon Sep 17 00:00:00 2001 From: Anto Christopher <93177734+anto-deepsource@users.noreply.github.com> Date: Mon, 17 Mar 2025 21:37:18 +0530 Subject: [PATCH 4/9] Update .eslintrc.json --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 66d3130a..88baf4e1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,7 @@ { "root": true, "rules": { - "require-await": "off" + "require-await": "off", + "id-length": "off" } } From c333b28604fbd8ae9ca45288c83318acf6f9dfba Mon Sep 17 00:00:00 2001 From: Anto Christopher <93177734+anto-deepsource@users.noreply.github.com> Date: Tue, 18 Mar 2025 16:32:38 +0530 Subject: [PATCH 5/9] Update index.js --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index b9565d05..f354f2bd 100644 --- a/index.js +++ b/index.js @@ -92,6 +92,7 @@ function commentCheck(){ async function fetchData() { let a = 1; let aa = 2; + let foo_1 = 1; // `readFileSync` is a synchronous function that blocks // the main thread, and thus does not need to be `await`ed return fs.readFileSync("data.txt", "utf-8"); From 06582fd16bff0182ee18ba518a2ea1900232855b Mon Sep 17 00:00:00 2001 From: Anto Christopher <93177734+anto-deepsource@users.noreply.github.com> Date: Tue, 18 Mar 2025 16:57:21 +0530 Subject: [PATCH 6/9] Update .eslintrc.json --- .eslintrc.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 88baf4e1..6ab72026 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,6 +2,11 @@ "root": true, "rules": { "require-await": "off", - "id-length": "off" + "id-length": [ + "error", + { + "min": 3 + } + ] } } From a206a9193f477d00772cb82088fa2ad9fc26b57e Mon Sep 17 00:00:00 2001 From: Anto Christopher <93177734+anto-deepsource@users.noreply.github.com> Date: Tue, 18 Mar 2025 16:58:18 +0530 Subject: [PATCH 7/9] Update .eslintrc.json --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 6ab72026..f8492588 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,7 @@ "id-length": [ "error", { - "min": 3 + "min": 6 } ] } From e322c3219d2af6cf471a723f4f2e033f119207d4 Mon Sep 17 00:00:00 2001 From: Anto Christopher <93177734+anto-deepsource@users.noreply.github.com> Date: Tue, 18 Mar 2025 16:59:30 +0530 Subject: [PATCH 8/9] Update .eslintrc.json --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index f8492588..7fb18d41 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,8 @@ "id-length": [ "error", { - "min": 6 + "min": 6, + "exceptions": ["a"] } ] } From 20388bf7593ad8958414eaefd632bad373e1d6d3 Mon Sep 17 00:00:00 2001 From: Anto Christopher <93177734+anto-deepsource@users.noreply.github.com> Date: Tue, 18 Mar 2025 17:00:32 +0530 Subject: [PATCH 9/9] Update .eslintrc.json --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7fb18d41..99ba5743 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,7 +6,8 @@ "error", { "min": 6, - "exceptions": ["a"] + "exceptions": ["a", "aa"], + "exceptionPatterns": ["^foo_"] } ] }