diff --git a/.eslintrc.json b/.eslintrc.json
index dffa4b3..d1f5743 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,54 +1,32 @@
{
- "extends": "next/core-web-vitals",
- "plugins": [
- "simple-import-sort"
- ],
+ "extends": ["next/core-web-vitals", "plugin:tailwindcss/recommended"],
+ "plugins": ["simple-import-sort", "tailwindcss"],
"rules": {
+ "tailwindcss/classnames-order": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"quotes": ["error", "single"]
},
+ "settings": {
+ "tailwindcss": {
+ // Tailwind config path, relative to the project root
+ "config": "./tailwind.config.js"
+ }
+ },
"overrides": [
{
- "files": [
- "*.js",
- "*.jsx",
- "*.ts",
- "*.tsx"
- ],
+ "files": ["*.js", "*.jsx", "*.ts", "*.tsx"],
"rules": {
"simple-import-sort/imports": [
"error",
{
"groups": [
- // Packages `react` related packages come first.
- [
- "^react",
- "^@?\\w"
- ],
- // Internal packages.
- [
- "^(@|components)(/.*|$)"
- ],
- // Side effect imports.
- [
- "^\\u0000"
- ],
- // Parent imports. Put `..` last.
- [
- "^\\.\\.(?!/?$)",
- "^\\.\\./?$"
- ],
- // Other relative imports. Put same-folder imports and `.` last.
- [
- "^\\./(?=.*/)(?!/?$)",
- "^\\.(?!/?$)",
- "^\\./?$"
- ],
- // Style imports.
- [
- "^.+\\.?(css)$"
- ]
+ ["^react", "^@?\\w"],
+ ["^(@|components)(/.*|$)"],
+ ["^\\u0000"],
+ ["^\\.\\.(?!/?$)", "^\\.\\./?$"],
+ ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
+ ["^.+\\.?(css)$"]
]
}
]
diff --git a/app/(site)/container.tsx b/app/(site)/container.tsx
index 558d5a7..cc8eb54 100644
--- a/app/(site)/container.tsx
+++ b/app/(site)/container.tsx
@@ -2,14 +2,14 @@ import Random from '@/components/Random';
import Trending from '@/components/Trending';
const Container = () => (
-
+
-
);
diff --git a/app/(site)/favorites/container.tsx b/app/(site)/favorites/container.tsx
index f932719..02f562b 100644
--- a/app/(site)/favorites/container.tsx
+++ b/app/(site)/favorites/container.tsx
@@ -13,7 +13,7 @@ export default function Container() {
if (!shows.length)
return (
-
+
There are no items in your favorites list
);
diff --git a/app/(site)/loading.tsx b/app/(site)/loading.tsx
index 1f8313f..5ff72dd 100644
--- a/app/(site)/loading.tsx
+++ b/app/(site)/loading.tsx
@@ -1,7 +1,7 @@
import { Loader } from 'lucide-react';
const Loading = () => (
-
+
diff --git a/app/(site)/similar/container.tsx b/app/(site)/similar/container.tsx
index eaa17a4..e49740f 100644
--- a/app/(site)/similar/container.tsx
+++ b/app/(site)/similar/container.tsx
@@ -19,7 +19,7 @@ const Container = () => {
return (
<>
{Boolean(title) && (
-
+
Similar: {decodeURIComponent(title)}
)}
diff --git a/app/(site)/starring/container.tsx b/app/(site)/starring/container.tsx
index 3293895..758f95f 100644
--- a/app/(site)/starring/container.tsx
+++ b/app/(site)/starring/container.tsx
@@ -18,7 +18,7 @@ const Container = () => {
return (
<>
{Boolean(title) && (
-
+
Starring: {decodeURIComponent(title || '')}
)}
diff --git a/components/Header/components/Navigation/index.tsx b/components/Header/components/Navigation/index.tsx
index 0b02f5e..e1ea7a0 100644
--- a/components/Header/components/Navigation/index.tsx
+++ b/components/Header/components/Navigation/index.tsx
@@ -22,12 +22,12 @@ export const MobileNavigation = () => {
-
+
{paths.map(({ path, title }) => (
-
diff --git a/components/Header/components/Search/index.tsx b/components/Header/components/Search/index.tsx
index 4255718..7803955 100644
--- a/components/Header/components/Search/index.tsx
+++ b/components/Header/components/Search/index.tsx
@@ -38,7 +38,7 @@ export const showSearchModal = create(({ onResolve }) => {
const isFetched = movies.isFetched && series.isFetched;
return (
-
+
(
-
+
-
Movie advisor
+
Movie advisor
diff --git a/components/NoResults/index.tsx b/components/NoResults/index.tsx
index c529660..11d516d 100644
--- a/components/NoResults/index.tsx
+++ b/components/NoResults/index.tsx
@@ -1,5 +1,5 @@
const NoResults = () => (
-
Nothing was found
+
Nothing was found
);
export default NoResults;
diff --git a/components/Preview/components/Actions.tsx b/components/Preview/components/Actions.tsx
index 4a26b00..d76b553 100644
--- a/components/Preview/components/Actions.tsx
+++ b/components/Preview/components/Actions.tsx
@@ -15,13 +15,13 @@ const Actions = ({ onClose, show }: Props) => (
<>
{({ onPlay, disabled }) => (
-
+
Trailer
)}
showTorrentsModal({
showId: show.id,
@@ -35,11 +35,11 @@ const Actions = ({ onClose, show }: Props) => (
Torrents
-
Similar
+
Similar
>
);
diff --git a/components/Preview/index.tsx b/components/Preview/index.tsx
index fa8dcbd..5b7a4fc 100644
--- a/components/Preview/index.tsx
+++ b/components/Preview/index.tsx
@@ -25,13 +25,13 @@ const Preview: FC
= ({ show, className, onClose, children, card }) => {
return (
{card ||
}
-
- {children &&
{children}
}
+
+ {children &&
{children}
}
-
+
{show.overview}
diff --git a/components/Random/components/Carousel/index.tsx b/components/Random/components/Carousel/index.tsx
index 8ccf20d..d456738 100644
--- a/components/Random/components/Carousel/index.tsx
+++ b/components/Random/components/Carousel/index.tsx
@@ -43,7 +43,7 @@ const components: VirtuosoProps
void>['components'] = {
}),
Scroller: forwardRef(function Scroller({ context, ...props }, ref) {
return (
-
+
);
})
};
diff --git a/components/Random/index.tsx b/components/Random/index.tsx
index a4458b5..8841887 100644
--- a/components/Random/index.tsx
+++ b/components/Random/index.tsx
@@ -11,7 +11,7 @@ const Random = () => {
return (
}
/>
);
diff --git a/components/Show/components/Credits/index.tsx b/components/Show/components/Credits/index.tsx
index 58dc654..ae5f1e7 100644
--- a/components/Show/components/Credits/index.tsx
+++ b/components/Show/components/Credits/index.tsx
@@ -18,18 +18,18 @@ const Credits: FC = ({ showId, showType = 'movie', onPersonClick }) => {
return (
Boolean(credits?.length) && (
-
+
{credits?.map((actor) => (
-
onPersonClick?.(actor.id.toString())}
>
-
+
{actor.profile_path ? (
= ({ showId, showType = 'movie', onPersonClick }) => {
alt={actor.name}
/>
) : (
-
-
-
{actor.name}
+
+
{actor.name}
{Boolean(actor.character) && (
-
{actor.character}
+
{actor.character}
)}
diff --git a/components/Show/components/Handlers/index.tsx b/components/Show/components/Handlers/index.tsx
index 3aa7ab8..6e9a451 100644
--- a/components/Show/components/Handlers/index.tsx
+++ b/components/Show/components/Handlers/index.tsx
@@ -12,7 +12,7 @@ interface Props {
const Handlers: FC
= ({ onClick, show }) => {
const { toggle } = useFavoriteToggle(show);
- return ;
+ return ;
};
export default Handlers;
diff --git a/components/Show/components/Poster/index.tsx b/components/Show/components/Poster/index.tsx
index 83321d4..72f5651 100644
--- a/components/Show/components/Poster/index.tsx
+++ b/components/Show/components/Poster/index.tsx
@@ -8,9 +8,9 @@ interface Props {
const Poster: FC = ({ title, poster }) => {
return poster ? (
-
+
) : (
-
+
);
diff --git a/components/Show/components/Torrents/HostManager.tsx b/components/Show/components/Torrents/HostManager.tsx
index 1eeafc4..bc5b739 100644
--- a/components/Show/components/Torrents/HostManager.tsx
+++ b/components/Show/components/Torrents/HostManager.tsx
@@ -9,7 +9,7 @@ const showHostManagerModal = create
>(({ onResolve, onRejec
const setPrefix = useSetPrefix();
return (
-
+
{
return (
@@ -62,7 +62,7 @@ const showPlayer = create(({ onResolve, magnet, backdrop }: Props) => {
{isLoading && (
<>
-
+
diff --git a/components/Show/components/Torrents/components/TableHeadSortable/index.tsx b/components/Show/components/Torrents/components/TableHeadSortable/index.tsx
index c8fd064..daa45f8 100644
--- a/components/Show/components/Torrents/components/TableHeadSortable/index.tsx
+++ b/components/Show/components/Torrents/components/TableHeadSortable/index.tsx
@@ -19,10 +19,10 @@ const TableHeadSortable: FC
= ({ title, sort, value, sortable, onChange }
return (
-
+
{title}
{sortable &&
- (sort === value ?
:
)}
+ (sort === value ?
:
)}
);
diff --git a/components/Show/components/Torrents/index.tsx b/components/Show/components/Torrents/index.tsx
index 4db8153..cb8d7ed 100644
--- a/components/Show/components/Torrents/index.tsx
+++ b/components/Show/components/Torrents/index.tsx
@@ -49,12 +49,12 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
return (
-
+
-
{title}
+
{title}
Title}
- showHostManagerModal()} />
+ showHostManagerModal()} />
@@ -102,24 +102,24 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
)}
- {torrent.size}
+ {torrent.size}
{torrent.seeders}
-
-
+
+
{Boolean(key === providers.yts.key && torrent.seeders) && (
showPlayer({ magnet: torrent.magnet, backdrop })}
>
)}
-
+
navigator.clipboard.writeText(torrent.magnet)}
>
@@ -127,7 +127,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
{prefix && !prefix.includes('{host}') && (
cast(torrent.magnet!)}
- className='flex items-center justify-center h-8 w-8 border rounded-lg cursor-pointer'
+ className='flex size-8 cursor-pointer items-center justify-center rounded-lg border'
>
@@ -140,7 +140,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
{isLoading && (
-
+
@@ -149,7 +149,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
{!isLoading && isFetched && !torrents?.length && (
-
+
Nothing was found
diff --git a/components/Show/components/Trailer/index.tsx b/components/Show/components/Trailer/index.tsx
index 1cb56c8..58c02b3 100644
--- a/components/Show/components/Trailer/index.tsx
+++ b/components/Show/components/Trailer/index.tsx
@@ -17,11 +17,11 @@ const showTrailerModal = create(({ trailerKey, onResolve }: { trailerKey?: strin
if (!trailerKey) return;
return (
-
+