chore: disable unrelated eslint rules

This commit is contained in:
Kentai Radiquum 2024-08-23 05:12:46 +05:00
parent ff11a90a5e
commit 733e138233
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
20 changed files with 43 additions and 16 deletions

View file

@ -36,6 +36,7 @@ export function BookmarksPage() {
if (authState === "finished" && !token) {
router.push("/login?redirect=/bookmarks");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [authState, token]);
return (

View file

@ -70,12 +70,14 @@ export function BookmarksCategoryPage(props: any) {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
useEffect(() => {
if (authState === "finished" && !token) {
router.push(`/login?redirect=/bookmarks/${props.slug}`);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [authState, token]);
return (

View file

@ -35,6 +35,7 @@ export function CollectionsPage() {
if (userStore.state === "finished" && !userStore.token) {
router.push("/login?redirect=/collections");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [userStore.state, userStore.token]);
return (

View file

@ -76,6 +76,7 @@ export function CollectionsFullPage(props: {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
useEffect(() => {
@ -86,6 +87,7 @@ export function CollectionsFullPage(props: {
) {
router.push(`/login?redirect=/collections/favorites`);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [userStore.state, userStore.token]);
return (

View file

@ -39,7 +39,6 @@ export const CreateCollectionPage = () => {
const [edit, setEdit] = useState(false);
// const [imageData, setImageData] = useState<File | Blob>(null);
const [imageUrl, setImageUrl] = useState<string>(null);
const [tempImageUrl, setTempImageUrl] = useState<string>(null);
const [isPrivate, setIsPrivate] = useState(false);
@ -118,6 +117,7 @@ export const CreateCollectionPage = () => {
if (userStore.user) {
_checkMode();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [userStore.user]);
const handleFileRead = (e, fileReader) => {
@ -265,9 +265,11 @@ export const CreateCollectionPage = () => {
</p>
</>
) : (
// eslint-disable-next-line @next/next/no-img-element
<img
src={imageUrl}
className="object-cover w-[inherit] h-[inherit]"
alt=""
/>
)}
</div>
@ -457,6 +459,7 @@ export const ReleasesEditModal = (props: {
if (scrollPosition >= 95 && scrollPosition <= 96) {
setSize(size + 1);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
function _addRelease(release: any) {

View file

@ -67,12 +67,14 @@ export function FavoritesPage() {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
useEffect(() => {
if (authState === "finished" && !token) {
router.push("/login?redirect=/favorites");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [authState, token]);
return (

View file

@ -59,12 +59,14 @@ export function HistoryPage() {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
useEffect(() => {
if (authState === "finished" && !token) {
router.push("/login?redirect=/history");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [authState, token]);
return (

View file

@ -25,6 +25,7 @@ export function IndexCategoryPage(props) {
}
_loadInitialReleases();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [token]);
useEffect(() => {
@ -36,6 +37,7 @@ export function IndexCategoryPage(props) {
if (content) {
_loadNextReleasesPage();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [page]);
const scrollPosition = useScrollPosition();
@ -43,10 +45,9 @@ export function IndexCategoryPage(props) {
if (scrollPosition == 98) {
setPage(page + 1);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
// if (error) return <div>failed to load</div>;
return (
<>
{content && content.length > 0 ? (

View file

@ -49,6 +49,7 @@ export function LoginPage() {
if (userStore.user) {
router.push(`${redirect || "/"}`);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [userStore.user]);
return (

View file

@ -24,6 +24,7 @@ export const ProfilePage = (props: any) => {
setIsMyProfile(data.is_my_profile);
}
_getData();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [authUser]);
if (!user) {

View file

@ -54,6 +54,7 @@ export function RelatedPage(props: {id: number|string, title: string}) {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
return (

View file

@ -85,6 +85,7 @@ export function SearchPage() {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
if (error) return <div>failed to load</div>;

View file

@ -86,6 +86,7 @@ export const ViewCollectionPage = (props: { id: number }) => {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
return (