Skip to content

Commit bdeff3f

Browse files
bukinoshitagabrielmfern
authored andcommitted
fix(all): Use number namespace (#1826)
1 parent bdb35c4 commit bdeff3f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/button/src/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function computeFontWidthAndSpaceCount(expectedWidth: number) {
2020
return expectedWidth / smallestSpaceCount / 2;
2121
}
2222

23-
return Infinity;
23+
return Number.POSITIVE_INFINITY;
2424
};
2525

2626
while (computeRequiredFontWidth() > maxFontWidth) {

packages/button/src/utils/parse-padding.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function convertToPx(value: PaddingType) {
2626
const matches = /^([\d.]+)(px|em|rem|%)$/.exec(value);
2727

2828
if (matches && matches.length === 3) {
29-
const numValue = parseFloat(matches[1]);
29+
const numValue = Number.parseFloat(matches[1]);
3030
const unit = matches[2];
3131

3232
switch (unit) {

packages/heading/src/utils/spaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const withSpace = (
4040
) => {
4141
return properties.reduce((styles, property) => {
4242
// Check to ensure string value is a valid number
43-
if (!isNaN(parseFloat(value as string))) {
43+
if (!isNaN(Number.parseFloat(value as string))) {
4444
return { ...styles, [property as keyof MarginCSSProperty]: `${value}px` };
4545
}
4646
return styles;

packages/react-email/src/cli/commands/dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const dev = async ({ dir: emailsDirRelativePath, port }: Args) => {
1616
const devServer = await startDevServer(
1717
emailsDirRelativePath,
1818
emailsDirRelativePath, // defaults to ./emails/static for the static files that are served to the preview
19-
parseInt(port),
19+
Number.parseInt(port),
2020
);
2121

2222
await setupHotreloading(devServer, emailsDirRelativePath);

0 commit comments

Comments
 (0)