Remove eslint rule deactivations (#290)
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-shadow */
|
||||
/* eslint-disable react/destructuring-assignment */
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
@@ -16,7 +14,7 @@ import IconButton from '@mui/material/IconButton';
|
||||
import NavbarContext from 'components/context/NavbarContext';
|
||||
import EmptyView from 'components/util/EmptyView';
|
||||
import React, { useContext, useEffect } from 'react';
|
||||
import { DragDropContext, Draggable, Droppable, DropResult } from 'react-beautiful-dnd';
|
||||
import { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
|
||||
import client from 'util/client';
|
||||
|
||||
import Typography from '@mui/material/Typography';
|
||||
@@ -55,8 +53,7 @@ const DownloadQueue: React.FC = () => {
|
||||
setAction(null);
|
||||
}, [t]);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const onDragEnd = (result: DropResult) => {};
|
||||
const onDragEnd = () => {};
|
||||
|
||||
if (queue.length === 0) {
|
||||
return <EmptyView message={t('download.queue.label.no_downloads')} />;
|
||||
@@ -84,19 +81,19 @@ const DownloadQueue: React.FC = () => {
|
||||
</NavbarToolbar>
|
||||
<DragDropContext onDragEnd={onDragEnd}>
|
||||
<Droppable droppableId="droppable">
|
||||
{(provided) => (
|
||||
<Box ref={provided.innerRef} sx={{ pt: 1 }}>
|
||||
{(droppableProvided) => (
|
||||
<Box ref={droppableProvided.innerRef} sx={{ pt: 1 }}>
|
||||
{queue.map((item, index) => (
|
||||
<Draggable
|
||||
key={`${item.mangaId}-${item.chapterIndex}`}
|
||||
draggableId={`${item.mangaId}-${item.chapterIndex}`}
|
||||
index={index}
|
||||
>
|
||||
{(provided, snapshot) => (
|
||||
{(draggableProvided, snapshot) => (
|
||||
<Box
|
||||
{...provided.draggableProps}
|
||||
{...provided.dragHandleProps}
|
||||
ref={provided.innerRef}
|
||||
{...draggableProvided.draggableProps}
|
||||
{...draggableProvided.dragHandleProps}
|
||||
ref={draggableProvided.innerRef}
|
||||
sx={{ p: 1, pb: 2 }}
|
||||
>
|
||||
<Card
|
||||
@@ -142,7 +139,7 @@ const DownloadQueue: React.FC = () => {
|
||||
)}
|
||||
</Draggable>
|
||||
))}
|
||||
{provided.placeholder}
|
||||
{droppableProvided.placeholder}
|
||||
</Box>
|
||||
)}
|
||||
</Droppable>
|
||||
|
||||
@@ -109,7 +109,6 @@ const SearchAll: React.FC = () => {
|
||||
}
|
||||
setFetched({});
|
||||
setMangas({});
|
||||
// eslint-disable-next-line max-len
|
||||
doIT(
|
||||
sources
|
||||
.filter(({ lang }) => shownLangs.indexOf(lang) !== -1)
|
||||
@@ -167,7 +166,6 @@ const SearchAll: React.FC = () => {
|
||||
if (query) {
|
||||
return (
|
||||
<>
|
||||
{/* eslint-disable-next-line max-len */}
|
||||
{sources
|
||||
.filter(({ lang }) => shownLangs.indexOf(lang) !== -1)
|
||||
.filter((source) => showNsfw || !source.isNsfw)
|
||||
|
||||
@@ -97,7 +97,6 @@ export default function Sources() {
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* eslint-disable-next-line max-len */}
|
||||
{Object.entries(groupByLang(sources ?? []))
|
||||
.sort((a, b) => langSortCmp(a[0], b[0]))
|
||||
.map(
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-shadow */
|
||||
/* eslint-disable react/destructuring-assignment */
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
@@ -140,21 +138,21 @@ export default function Categories() {
|
||||
<>
|
||||
<DragDropContext onDragEnd={onDragEnd}>
|
||||
<Droppable droppableId="droppable">
|
||||
{(provided) => (
|
||||
<List ref={provided.innerRef}>
|
||||
{(droppableProvided) => (
|
||||
<List ref={droppableProvided.innerRef}>
|
||||
{categories.map((item, index) => (
|
||||
<Draggable key={item.id} draggableId={item.id.toString()} index={index}>
|
||||
{(provided, snapshot) => (
|
||||
{(draggableProvided, snapshot) => (
|
||||
<ListItem
|
||||
ContainerProps={{ ref: provided.innerRef } as any}
|
||||
{...provided.draggableProps}
|
||||
{...provided.dragHandleProps}
|
||||
ContainerProps={{ ref: draggableProvided.innerRef } as any}
|
||||
{...draggableProvided.draggableProps}
|
||||
{...draggableProvided.dragHandleProps}
|
||||
style={getItemStyle(
|
||||
snapshot.isDragging,
|
||||
provided.draggableProps.style,
|
||||
draggableProvided.draggableProps.style,
|
||||
theme.palette,
|
||||
)}
|
||||
ref={provided.innerRef}
|
||||
ref={draggableProvided.innerRef}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<DragHandleIcon />
|
||||
@@ -180,7 +178,7 @@ export default function Categories() {
|
||||
)}
|
||||
</Draggable>
|
||||
))}
|
||||
{provided.placeholder}
|
||||
{droppableProvided.placeholder}
|
||||
</List>
|
||||
)}
|
||||
</Droppable>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-shadow */
|
||||
/* eslint-disable react/destructuring-assignment */
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user