Remove eslint rule deactivations (#290)
This commit is contained in:
@@ -77,15 +77,7 @@ const MangaCard = React.forwardRef<HTMLDivElement, IProps>((props: IProps, ref)
|
||||
const { t } = useTranslation();
|
||||
|
||||
const {
|
||||
manga: {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
id,
|
||||
title,
|
||||
thumbnailUrl,
|
||||
downloadCount,
|
||||
unreadCount: unread,
|
||||
inLibrary,
|
||||
},
|
||||
manga: { id, title, thumbnailUrl, downloadCount, unreadCount: unread, inLibrary },
|
||||
gridLayout,
|
||||
dimensions,
|
||||
inLibraryIndicator,
|
||||
|
||||
@@ -64,9 +64,7 @@ const filterManga = (
|
||||
return matchesSearch && matchesFilters;
|
||||
});
|
||||
|
||||
const sortByUnread = (a: IMangaCard, b: IMangaCard): number =>
|
||||
// eslint-disable-next-line implicit-arrow-linebreak
|
||||
(a.unreadCount ?? 0) - (b.unreadCount ?? 0);
|
||||
const sortByUnread = (a: IMangaCard, b: IMangaCard): number => (a.unreadCount ?? 0) - (b.unreadCount ?? 0);
|
||||
|
||||
const sortByTitle = (a: IMangaCard, b: IMangaCard): number => a.title.localeCompare(b.title);
|
||||
|
||||
|
||||
@@ -29,11 +29,9 @@ const defaultChapterOptions: ChapterListOptions = {
|
||||
function chapterOptionsReducer(state: ChapterListOptions, actions: ChapterOptionsReducerAction): ChapterListOptions {
|
||||
switch (actions.type) {
|
||||
case 'filter':
|
||||
// eslint-disable-next-line no-case-declarations
|
||||
const active = state.unread !== false && state.downloaded !== false && state.bookmarked !== false;
|
||||
return {
|
||||
...state,
|
||||
active,
|
||||
active: state.unread !== false && state.downloaded !== false && state.bookmarked !== false,
|
||||
[actions.filterType!]: actions.filterValue,
|
||||
};
|
||||
case 'sortBy':
|
||||
|
||||
@@ -17,7 +17,6 @@ interface DownloadStateIndicatorProps {
|
||||
download: IDownloadChapter;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const DOWNLOAD_STATE_TO_TRANSLATION_KEY_MAP: { [state in IDownloadChapter['state']]: TranslationKey } = {
|
||||
Downloading: 'download.state.label.downloading',
|
||||
Error: 'download.state.label.error',
|
||||
|
||||
@@ -333,8 +333,6 @@ export default function ReaderNavBar(props: IProps) {
|
||||
{Array(Math.max(0, chapter.chapterCount))
|
||||
.fill(1)
|
||||
.map((ignoreValue, index) => (
|
||||
// eslint-disable-next-line max-len
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
<MenuItem key={`Chapter#${index + 1}`} value={index + 1}>{`${t(
|
||||
'chapter.title',
|
||||
)} ${index + 1}`}</MenuItem>
|
||||
|
||||
@@ -44,20 +44,17 @@ export default function DesktopSideBar({ navBarItems }: IProps) {
|
||||
|
||||
return (
|
||||
<SideNavBarContainer>
|
||||
{
|
||||
// eslint-disable-next-line react/destructuring-assignment
|
||||
navBarItems.map(({ path, title, IconComponent, SelectedIconComponent }: NavbarItem) => (
|
||||
<Link to={path} style={{ color: 'inherit', textDecoration: 'none' }} key={path}>
|
||||
<ListItem disableRipple button key={title}>
|
||||
<ListItemIcon sx={{ minWidth: '0' }}>
|
||||
<Tooltip placement="right" title={t(title)}>
|
||||
{iconFor(path, IconComponent, SelectedIconComponent)}
|
||||
</Tooltip>
|
||||
</ListItemIcon>
|
||||
</ListItem>
|
||||
</Link>
|
||||
))
|
||||
}
|
||||
{navBarItems.map(({ path, title, IconComponent, SelectedIconComponent }: NavbarItem) => (
|
||||
<Link to={path} style={{ color: 'inherit', textDecoration: 'none' }} key={path}>
|
||||
<ListItem disableRipple button key={title}>
|
||||
<ListItemIcon sx={{ minWidth: '0' }}>
|
||||
<Tooltip placement="right" title={t(title)}>
|
||||
{iconFor(path, IconComponent, SelectedIconComponent)}
|
||||
</Tooltip>
|
||||
</ListItemIcon>
|
||||
</ListItem>
|
||||
</Link>
|
||||
))}
|
||||
</SideNavBarContainer>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user