fix build and lints

This commit is contained in:
Kentai Radiquum 2025-04-04 00:41:04 +05:00
parent 329448c9fc
commit 491f9b48b5
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
9 changed files with 19 additions and 31 deletions

View file

@ -1,7 +1,3 @@
{ {
"extends": ["next/core-web-vitals", "prettier"], "extends": ["next/core-web-vitals"]
"rules": {
"prettier/prettier": "error"
},
"plugins": ["prettier"]
} }

View file

@ -188,6 +188,7 @@ export const ProfileEditModal = (props: {
if (avatarModalProps.croppedImage) { if (avatarModalProps.croppedImage) {
_uploadAvatar(); _uploadAvatar();
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [avatarModalProps.croppedImage]); }, [avatarModalProps.croppedImage]);
if (!prefData || !loginData || prefError || loginError) { if (!prefData || !loginData || prefError || loginError) {

View file

@ -14,7 +14,7 @@ export const ReleaseInfoStreaming = (props: { release_id: number }) => {
setData(await response.json()); setData(await response.json());
}; };
_getData(); _getData();
}, []); }, [props.release_id]);
return ( return (
<> <>
@ -32,7 +32,8 @@ export const ReleaseInfoStreaming = (props: { release_id: number }) => {
key={`platform_${item.id}`} key={`platform_${item.id}`}
className="flex items-center gap-2 px-4 py-2 transition-colors bg-gray-100 rounded-lg hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 " className="flex items-center gap-2 px-4 py-2 transition-colors bg-gray-100 rounded-lg hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 "
> >
<img src={item.icon} className="w-6 h-6 rounded-full" /> {/* eslint-disable-next-line @next/next/no-img-element */}
<img alt="" src={item.icon} className="w-6 h-6 rounded-full" />
<p className="text-sm line-clamp-2">{item.name}</p> <p className="text-sm line-clamp-2">{item.name}</p>
</a> </a>
); );

View file

@ -212,7 +212,8 @@ export const ReleasePlayerCustom = (props: {
} }
}; };
__getInfo(); __getInfo();
}, []); // eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.id, props.token]);
useEffect(() => { useEffect(() => {
const __getInfo = async () => { const __getInfo = async () => {
@ -244,6 +245,7 @@ export const ReleasePlayerCustom = (props: {
if (voiceover.selected) { if (voiceover.selected) {
__getInfo(); __getInfo();
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [voiceover.selected]); }, [voiceover.selected]);
useEffect(() => { useEffect(() => {
@ -284,6 +286,7 @@ export const ReleasePlayerCustom = (props: {
if (source.selected) { if (source.selected) {
__getInfo(); __getInfo();
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [source.selected]); }, [source.selected]);
useEffect(() => { useEffect(() => {
@ -346,6 +349,7 @@ export const ReleasePlayerCustom = (props: {
setPlayerError(null); setPlayerError(null);
__getInfo(); __getInfo();
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [episode.selected]); }, [episode.selected]);
return ( return (

View file

@ -20,7 +20,7 @@ const DropdownTrigger = ({ name }: Source) => {
); );
}; };
const DropdownItem = ({ name, episodes_count }: Source) => { const DropdownItemInternal = ({ name, episodes_count }: Source) => {
return ( return (
<div className="flex flex-col gap-2 cursor-pointer"> <div className="flex flex-col gap-2 cursor-pointer">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
@ -68,7 +68,7 @@ export const SourceSelector = (props: {
}); });
}} }}
> >
<DropdownItem {...source} /> <DropdownItemInternal {...source} />
</DropdownItem> </DropdownItem>
))} ))}
</Dropdown> </Dropdown>

View file

@ -16,7 +16,8 @@ interface Voiceover {
const DropdownTrigger = ({ icon, name, pinned }: Voiceover) => { const DropdownTrigger = ({ icon, name, pinned }: Voiceover) => {
return ( return (
<div className="flex items-center gap-2 cursor-pointer"> <div className="flex items-center gap-2 cursor-pointer">
{icon && <img className="w-6 h-6 rounded-full" src={icon}></img>} {/* eslint-disable-next-line @next/next/no-img-element */}
{icon && <img alt="" className="w-6 h-6 rounded-full" src={icon}></img>}
<p>{name}</p> <p>{name}</p>
{pinned && ( {pinned && (
<span className="h-6 bg-gray-700 dark:bg-gray-300 iconify material-symbols--push-pin"></span> <span className="h-6 bg-gray-700 dark:bg-gray-300 iconify material-symbols--push-pin"></span>
@ -36,7 +37,8 @@ const DropdownItemInternal = ({
return ( return (
<div className="flex flex-col gap-2 cursor-pointer"> <div className="flex flex-col gap-2 cursor-pointer">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
{icon && <img className="w-6 h-6 rounded-full" src={icon}></img>} {/* eslint-disable-next-line @next/next/no-img-element */}
{icon && <img alt="" className="w-6 h-6 rounded-full" src={icon}></img>}
<p>{name}</p> <p>{name}</p>
{pinned && ( {pinned && (
<span className="h-6 iconify material-symbols--push-pin"></span> <span className="h-6 iconify material-symbols--push-pin"></span>

View file

@ -34,6 +34,7 @@ export const CreateCollectionPage = () => {
if (userStore.state === "finished" && !userStore.token) { if (userStore.state === "finished" && !userStore.token) {
router.push("/login?redirect=/collections/create"); router.push("/login?redirect=/collections/create");
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [userStore]); }, [userStore]);
const [edit, setEdit] = useState(false); const [edit, setEdit] = useState(false);

18
package-lock.json generated
View file

@ -7,6 +7,7 @@
"": { "": {
"name": "new", "name": "new",
"version": "0.1.0", "version": "0.1.0",
"hasInstallScript": true,
"dependencies": { "dependencies": {
"apexcharts": "^3.52.0", "apexcharts": "^3.52.0",
"deepmerge-ts": "^7.1.0", "deepmerge-ts": "^7.1.0",
@ -38,7 +39,6 @@
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "14.2.5", "eslint-config-next": "14.2.5",
"postcss": "^8", "postcss": "^8",
"prettier": "^3.5.3",
"tailwind-scrollbar": "^3.1.0", "tailwind-scrollbar": "^3.1.0",
"tailwindcss": "^3.4.1" "tailwindcss": "^3.4.1"
} }
@ -5532,22 +5532,6 @@
"node": ">= 0.8.0" "node": ">= 0.8.0"
} }
}, },
"node_modules/prettier": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz",
"integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==",
"dev": true,
"license": "MIT",
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/prop-types": { "node_modules/prop-types": {
"version": "15.8.1", "version": "15.8.1",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",

View file

@ -40,7 +40,6 @@
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "14.2.5", "eslint-config-next": "14.2.5",
"postcss": "^8", "postcss": "^8",
"prettier": "^3.5.3",
"tailwind-scrollbar": "^3.1.0", "tailwind-scrollbar": "^3.1.0",
"tailwindcss": "^3.4.1" "tailwindcss": "^3.4.1"
} }