Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmouk committed Jun 24, 2024
1 parent a003d10 commit 23acbc8
Show file tree
Hide file tree
Showing 11 changed files with 3,633 additions and 4,660 deletions.
3 changes: 0 additions & 3 deletions apps/web/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
"description": "Let's increase your meaningful time. ⏰",
"signInOrUpWithGitHub": "Sign in/up with GitHub"
},
"DotLoading": {
"loading": "Loading"
},
"AccountMenu": {
"totalDuration": "Total Duration",
"signOut": "Sign out"
Expand Down
3 changes: 0 additions & 3 deletions apps/web/messages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
"description": "有意義な時間を増やしましょう! ⏰",
"signInOrUpWithGitHub": "GitHubでログインまたは登録"
},
"DotLoading": {
"loading": "読み込み中"
},
"AccountMenu": {
"totalDuration": "計測した合計",
"signOut": "ログアウト"
Expand Down
22 changes: 0 additions & 22 deletions apps/web/src/app/[locale]/_components/DotLoading.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion apps/web/src/app/[locale]/_components/FolderTreeItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const FolderTreeItem = ({
});

const transformStyle = transform
? `translate(${transform.x}px, ${transform.y}px)`
? `translate(${transform.x.toString()}px, ${transform.y.toString()}px)`
: undefined;

if (isEditing) {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/[locale]/_components/TaskTreeItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const TaskTreeItem = ({
}

const transformStyle = transform
? `translate(${transform.x}px, ${transform.y}px)`
? `translate(${transform.x.toString()}px, ${transform.y.toString()}px)`
: undefined;

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const TimeEntrySummary = ({ date }: Props) => {
<li
style={{
backgroundColor: color,
width: `${(Number(duration) / totalDuration) * 100}%`,
width: `${((Number(duration) / totalDuration) * 100).toString()}%`,
}}
className="inline-block transition-all h-full"
key={id}
Expand All @@ -64,7 +64,7 @@ export const TimeEntrySummary = ({ date }: Props) => {
side="top"
sideOffset={4}
delayDuration={30}
content={`${emoji} ${name}: ${fromS(Number(duration), "hh:mm:ss")} ${Math.round((Number(duration) / totalDuration) * 100)}%`}
content={`${emoji} ${name}: ${fromS(Number(duration), "hh:mm:ss")} ${Math.round((Number(duration) / totalDuration) * 100).toString()}%`}
>
<span className="h-full w-full items-center justify-center cursor-pointer group-hover:visible invisible inline-flex text-sm" />
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const CalendarHeader = ({ date, today }: Props) => {
isHighlighted: boolean;
}) => {
router.push(
`/app/calendar?date=${format(date, "yyyy-MM-dd")}&isHighlighted=${isHighlighted}`,
`/app/calendar?date=${format(date, "yyyy-MM-dd")}&isHighlighted=${isHighlighted ? "true" : "false"}`,
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ const CalendarPosition = ({
return (
<>
{children?.({
top: `${getPercent(clampByDate(startDate), baseDate)}%`,
left: `${offsetPercent}%`,
width: `${100 - offsetPercent}%`,
top: `${getPercent(clampByDate(startDate), baseDate).toString()}%`,
left: `${offsetPercent.toString()}%`,
width: `${(100 - offsetPercent).toString()}%`,
height: endDate
? `${getPercent(clampByDate(endDate), clampByDate(startDate))}%`
? `${getPercent(clampByDate(endDate), clampByDate(startDate)).toString()}%`
: undefined,
})}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const CalendarRowLines = () => {
return (
<div aria-hidden className="flex flex-col flex-1 h-full w-14">
{R.times(24, (hour) => {
const padded = `${`${hour}`.padStart(2, "0")}:00`;
const padded = `${hour.toString().padStart(2, "0")}:00`;
return (
<span
key={hour}
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/src/contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("omitUndefined", () => {
baz: z.string(),
}),
},
({ foo, bar }) => ({ baz: `${foo}${bar}` }),
({ foo, bar }) => ({ baz: `${foo}${bar.toString()}` }),
);
expect(execute({ foo: "foo", bar: 123 })).toStrictEqual({
baz: "foo123",
Expand All @@ -35,7 +35,7 @@ describe("omitUndefined", () => {
baz: z.string(),
}),
},
({ foo, bar }) => ({ baz: `${foo}${bar}` }),
({ foo, bar }) => ({ baz: `${foo}${bar.toString()}` }),
);
expect(() =>
// @ts-expect-error throws a type error
Expand Down
Loading

0 comments on commit 23acbc8

Please sign in to comment.