Skip to content

Commit

Permalink
fix: JS-0066
Browse files Browse the repository at this point in the history
Prefer using explicit casts by calling Number, Boolean, or String over using operators like +, !! or "" +. This is considered best practice as it improves readability.
  • Loading branch information
mayank1513 committed Jun 17, 2024
1 parent c2a0347 commit d3394fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" };
});
Expand Down

0 comments on commit d3394fe

Please sign in to comment.