From d3394fe57acce1cbfd8d638ea7a9c2e1ce05ea9a Mon Sep 17 00:00:00 2001 From: Mayank Date: Mon, 17 Jun 2024 21:40:54 +0530 Subject: [PATCH] fix: JS-0066 Prefer using explicit casts by calling Number, Boolean, or String over using operators like +, !! or "" +. This is considered best practice as it improves readability. --- lib/tsup.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tsup.config.ts b/lib/tsup.config.ts index d77c1b81..f36865bd 100644 --- a/lib/tsup.config.ts +++ b/lib/tsup.config.ts @@ -34,7 +34,7 @@ export default defineConfig(options => ({ tokens.sort((a, b) => b.token.length - a.token.length); for (const t of tokens) { - contents = contents.replace(new RegExp(`${t.token}`, "g"), t.i + ""); + contents = contents.replace(new RegExp(`${t.token}`, "g"), String(t.i)); } return { contents, loader: "ts" }; });