Skip to content

Commit 851ef11

Browse files
committed
Update Dependencies, update eslint
1 parent 4593d69 commit 851ef11

40 files changed

Lines changed: 3236 additions & 2890 deletions

eslint.config.mjs

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,34 @@
1-
import { FlatCompat } from "@eslint/eslintrc"
21
import stylistic from "@stylistic/eslint-plugin"
3-
4-
const compat = new FlatCompat({
5-
baseDirectory: import.meta.dirname,
6-
})
2+
import nextCoreWebVitals from "eslint-config-next/core-web-vitals"
3+
import nextTypescript from "eslint-config-next/typescript"
4+
import prettier from "eslint-config-prettier/flat"
75

86
const eslintConfig = [
9-
...compat.config({
10-
extends: [
11-
"next/core-web-vitals",
12-
"next/typescript",
13-
"plugin:prettier/recommended",
14-
"plugin:css-modules/recommended",
15-
"plugin:@tanstack/eslint-plugin-query/recommended",
16-
],
17-
plugins: ["css-modules"],
18-
rules: {
19-
"@typescript-eslint/no-non-null-assertion": 0,
20-
"@typescript-eslint/no-unused-vars": "error",
21-
"@typescript-eslint/explicit-function-return-type": "error",
22-
},
23-
ignorePatterns: [".next"],
24-
}),
7+
{
8+
ignores: [".next"],
9+
},
10+
...nextCoreWebVitals,
11+
...nextTypescript,
12+
prettier,
2513
{
2614
plugins: { "@stylistic": stylistic },
2715
rules: {
16+
// Typescript
17+
"@typescript-eslint/explicit-function-return-type": "error",
18+
19+
// React
20+
"react/jsx-curly-brace-presence": "error",
21+
"react/jsx-no-useless-fragment": "error",
22+
"react/jsx-pascal-case": "error",
23+
"react/jsx-sort-props": "error",
24+
"react/no-array-index-key": "error",
25+
"react/prefer-stateless-function": "error",
26+
"react/self-closing-comp": "error",
27+
28+
// ESLint
29+
30+
"arrow-body-style": ["error", "as-needed"],
31+
2832
"padding-line-between-statements": [
2933
"error",
3034

next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
33
/// <reference types="next/navigation-types/compat/navigation" />
4+
import "./.next/dev/types/routes.d.ts";
45

56
// NOTE: This file should not be edited
67
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

next.config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { NextConfig } from "next"
22

33
const config: NextConfig = {
4-
eslint: {
5-
ignoreDuringBuilds: true,
6-
},
7-
84
output: "standalone",
95
}
106

package.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,49 @@
99
"export": "next export",
1010
"dev": "next dev --turbo",
1111
"start": "next start",
12-
"lint": "next lint --dir .",
12+
"lint": "eslint .",
1313
"postinstall": "husky"
1414
},
1515
"keywords": [],
1616
"author": "",
1717
"license": "ISC",
1818
"dependencies": {},
1919
"devDependencies": {
20-
"@heroui/react": "^2.7.6-beta.1",
21-
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
22-
"@stylistic/eslint-plugin": "^4.2.0",
23-
"@tailwindcss/postcss": "^4.0.9",
24-
"@tanstack/eslint-plugin-query": "^5.66.1",
25-
"@tanstack/react-query": "^5.67.1",
26-
"@trpc/client": "^11.0.0-rc.824",
27-
"@trpc/next": "^11.0.0-rc.824",
28-
"@trpc/react-query": "^11.0.0-rc.824",
29-
"@trpc/server": "^11.0.0-rc.824",
30-
"@types/node": "^22.13.9",
31-
"@types/react": "^19.0.10",
32-
"@typescript-eslint/eslint-plugin": "^8.26.0",
33-
"@typescript-eslint/parser": "^8.26.0",
34-
"eslint": "^9.21.0",
35-
"eslint-config-next": "^15.2.1",
36-
"eslint-config-prettier": "^10.0.2",
20+
"@heroui/react": "^2.8.5",
21+
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
22+
"@stylistic/eslint-plugin": "^5.6.1",
23+
"@tailwindcss/postcss": "^4.1.17",
24+
"@tanstack/eslint-plugin-query": "^5.91.2",
25+
"@tanstack/react-query": "^5.90.12",
26+
"@trpc/client": "^11.7.2",
27+
"@trpc/next": "^11.7.2",
28+
"@trpc/react-query": "^11.7.2",
29+
"@trpc/server": "^11.7.2",
30+
"@types/node": "^24.10.1",
31+
"@types/react": "^19.2.7",
32+
"@typescript-eslint/eslint-plugin": "^8.48.1",
33+
"@typescript-eslint/parser": "^8.48.1",
34+
"eslint": "^9.39.1",
35+
"eslint-config-next": "^16.0.7",
36+
"eslint-config-prettier": "^10.1.8",
3737
"eslint-plugin-css-modules": "^2.12.0",
38-
"eslint-plugin-import": "^2.31.0",
39-
"eslint-plugin-prettier": "^5.2.3",
40-
"framer-motion": "^12.4.10",
41-
"got": "^14.4.6",
38+
"eslint-plugin-import": "^2.32.0",
39+
"eslint-plugin-prettier": "^5.5.4",
40+
"framer-motion": "^12.23.25",
41+
"got": "^14.6.5",
4242
"husky": "^9.1.7",
43-
"next": "^15.2.1",
44-
"postcss": "^8.5.3",
45-
"prettier": "^3.5.3",
46-
"react": "^19.0.0",
47-
"react-dom": "^19.0.0",
43+
"next": "^16.0.7",
44+
"postcss": "^8.5.6",
45+
"prettier": "^3.7.4",
46+
"react": "^19.2.1",
47+
"react-dom": "^19.2.1",
4848
"react-icons": "^5.5.0",
49-
"sass": "^1.85.1",
50-
"superjson": "^2.2.2",
51-
"tailwindcss": "^4.0.9",
52-
"typescript": "^5.8.2",
53-
"use-debounce": "^10.0.4",
49+
"sass": "^1.94.2",
50+
"superjson": "^2.2.6",
51+
"tailwindcss": "^4.1.17",
52+
"typescript": "^5.9.3",
53+
"use-debounce": "^10.0.6",
5454
"use-local-storage-state": "^19.5.0",
55-
"zod": "^3.24.2"
55+
"zod": "^4.1.13"
5656
}
5757
}

src/app/(dashboard)/Credit.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,31 @@ type CastOrCrew =
1313
export const Credit: FC<{ credit: CastOrCrew; title: string }> = ({
1414
credit,
1515
title,
16-
}) => {
17-
return (
16+
}) => (
1817
<>
1918
<h3 className="font-semibold text-lg">{title}</h3>
2019
<div className="flex overflow-scroll">
2120
<div className="flex gap-3 min-w-max">
2221
{credit.map((e) => (
2322
<Link
24-
key={e.creditId}
2523
href={`https://www.themoviedb.org/person/${e.tmdbId}`}
24+
key={e.creditId}
2625
target="_blank"
2726
>
2827
<User
29-
name={e.name}
30-
description={
31-
"character" in e ? e.character : e.job
32-
}
3328
avatarProps={{
3429
src: e.headshotUrl ?? undefined,
3530
name: "",
3631
className: "w-20 h-20 text-large",
3732
}}
33+
description={
34+
"character" in e ? e.character : e.job
35+
}
36+
name={e.name}
3837
/>
3938
</Link>
4039
))}
4140
</div>
4241
</div>
4342
</>
4443
)
45-
}

src/app/(dashboard)/Dashboard.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,16 @@ import { SearchField } from "./SearchField"
77

88
import type { FC } from "react"
99

10-
export const Dashboard: FC = () => {
11-
return (
10+
export const Dashboard: FC = () => (
1211
<div className="container">
1312
<Card className="p-3">
1413
<Suspense
1514
fallback={
16-
<>
17-
<SearchField defaultQuery="" />
18-
</>
15+
<SearchField defaultQuery="" />
1916
}
2017
>
2118
<QueryWrapper />
2219
</Suspense>
2320
</Card>
2421
</div>
2522
)
26-
}

src/app/(dashboard)/DownloadButton.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,45 +44,44 @@ export const DownloadButton: FC<{
4444
if (activeTorrent !== undefined) {
4545
if (activeTorrent.progress === 1) {
4646
return (
47-
<Button isIconOnly color="success" variant="bordered" disabled>
47+
<Button color="success" disabled isIconOnly variant="bordered">
4848
<FaCheck />
4949
</Button>
5050
)
5151
}
5252

5353
return (
5454
<CircularProgress
55-
value={activeTorrent.progress * 100}
5655
showValueLabel
5756
title={`Downloading ${formatBytes(
5857
activeTorrent.downloaded,
5958
)} / ${formatBytes(activeTorrent.size)}`}
59+
value={activeTorrent.progress * 100}
6060
/>
6161
)
6262
}
6363

6464
if (data === true) {
6565
return (
6666
<CircularProgress
67-
value={0}
6867
showValueLabel
6968
title={`Downloading ${formatBytes(0)} / ${formatBytes(
7069
torrent.size,
7170
)}`}
71+
value={0}
7272
/>
7373
)
7474
}
7575

7676
const isRealError = isError || data === false
7777

7878
return (
79-
<>
80-
<Button
81-
isIconOnly
79+
<Button
8280
color={isRealError || data === false ? "danger" : "default"}
83-
variant="bordered"
84-
onPress={downloadMovie}
81+
isIconOnly
8582
isLoading={isPending}
83+
onPress={downloadMovie}
84+
variant="bordered"
8685
>
8786
{!isPending &&
8887
(isRealError ? (
@@ -91,6 +90,5 @@ export const DownloadButton: FC<{
9190
<FaDownload />
9291
))}
9392
</Button>
94-
</>
9593
)
9694
}

src/app/(dashboard)/DownloadsLink.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export const DownloadsLink: FC = () => {
2424

2525
return (
2626
<Badge
27+
classNames={{ badge: "aspect-square", base: "aspect-square" }}
28+
color={color}
2729
content={
2830
isLoading ? (
2931
<Spinner size="sm" />
@@ -33,13 +35,11 @@ export const DownloadsLink: FC = () => {
3335
</div>
3436
)
3537
}
36-
showOutline={false}
3738
placement="top-right"
38-
color={color}
39-
classNames={{ badge: "aspect-square", base: "aspect-square" }}
39+
showOutline={false}
4040
>
41-
<Link href="/downloads" className="w-full">
42-
<Button isIconOnly className="w-full h-full">
41+
<Link className="w-full" href="/downloads">
42+
<Button className="w-full h-full" isIconOnly>
4343
<MdDownload size="25" />
4444
</Button>
4545
</Link>

src/app/(dashboard)/Genres.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ import { MovieSearchResult } from "@schemas/MovieSearchResult"
22

33
import type { FC } from "react"
44

5-
export const Genres: FC<{ movie: MovieSearchResult }> = ({ movie }) => {
6-
return (
5+
export const Genres: FC<{ movie: MovieSearchResult }> = ({ movie }) => (
76
<div className="flex gap-1">
87
{movie.genres.map((genre, i) => (
9-
<div key={genre} className="text-default-500">
8+
<div className="text-default-500" key={genre}>
109
{genre}
1110
{i === movie.genres.length - 1 ? "" : ","}
1211
</div>
1312
))}
1413
</div>
1514
)
16-
}
Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
1-
// eslint-disable-next-line css-modules/no-unused-class
21
import styles from "./MovieItem.module.scss"
32

43
import { Card, CardBody } from "@heroui/card"
54
import { Skeleton } from "@heroui/skeleton"
65

76
import type { FC } from "react"
87

9-
export const LoadingSkeleton: FC = () => {
10-
return (
11-
<>
12-
<Card className={styles.movieItem}>
13-
<CardBody className={styles.body}>
14-
<Skeleton
15-
className={styles.posterWrapper + " rounded-large"}
16-
/>
17-
<div className={styles.information + " w-full mx-3"}>
18-
<Skeleton className="w-full h-10 mb-3 rounded-lg"></Skeleton>
19-
<Skeleton className="w-full h-32 rounded-lg" />
20-
</div>
21-
</CardBody>
22-
</Card>
23-
</>
24-
)
25-
}
8+
export const LoadingSkeleton: FC = () => (
9+
<Card className={styles.movieItem}>
10+
<CardBody className={styles.body}>
11+
<Skeleton className={styles.posterWrapper + " rounded-large"} />
12+
<div className={styles.information + " w-full mx-3"}>
13+
<Skeleton className="w-full h-10 mb-3 rounded-lg" />
14+
<Skeleton className="w-full h-32 rounded-lg" />
15+
</div>
16+
</CardBody>
17+
</Card>
18+
)

0 commit comments

Comments
 (0)