Feature/use alias for imports (#352)
* Use alias "@" for imports * Use alias "@" for imports - Fix imports * Use alias "@" for imports - Prevent faulty "import/extensions" linting issue For some reason the rule throws an error for alias imports * Use alias "@" for imports - Update "no-relative-imports" eslint rule
This commit is contained in:
@@ -24,14 +24,14 @@ import Menu from '@mui/material/Menu';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import DownloadStateIndicator from 'components/molecules/DownloadStateIndicator';
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { BACK } from 'util/useBackTo';
|
||||
import { getUploadDateString } from 'util/date';
|
||||
import { IChapter, IDownloadChapter } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { IChapter, IDownloadChapter } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
import { getUploadDateString } from '@/util/date';
|
||||
import { BACK } from '@/util/useBackTo';
|
||||
import DownloadStateIndicator from '@/components/molecules/DownloadStateIndicator';
|
||||
|
||||
interface IProps {
|
||||
chapter: IChapter;
|
||||
|
||||
@@ -8,20 +8,20 @@
|
||||
|
||||
import { Button, CircularProgress, Stack, styled } from '@mui/material';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import useSubscription from 'components/library/useSubscription';
|
||||
import ChapterCard from 'components/manga/ChapterCard';
|
||||
import ResumeFab from 'components/manga/ResumeFAB';
|
||||
import { filterAndSortChapters, useChapterOptions } from 'components/manga/util';
|
||||
import EmptyView from 'components/util/EmptyView';
|
||||
import makeToast from 'components/util/Toast';
|
||||
import React, { ComponentProps, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Virtuoso } from 'react-virtuoso';
|
||||
import ChaptersToolbarMenu from 'components/manga/ChaptersToolbarMenu';
|
||||
import SelectionFAB from 'components/manga/SelectionFAB';
|
||||
import { BatchChaptersChange, IChapter, IDownloadChapter, IQueue, TranslationKey } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { DEFAULT_FULL_FAB_HEIGHT } from 'components/util/StyledFab';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { BatchChaptersChange, IChapter, IDownloadChapter, IQueue, TranslationKey } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
import useSubscription from '@/components/library/useSubscription';
|
||||
import ChapterCard from '@/components/manga/ChapterCard';
|
||||
import ResumeFab from '@/components/manga/ResumeFAB';
|
||||
import { filterAndSortChapters, useChapterOptions } from '@/components/manga/util';
|
||||
import EmptyView from '@/components/util/EmptyView';
|
||||
import makeToast from '@/components/util/Toast';
|
||||
import ChaptersToolbarMenu from '@/components/manga/ChaptersToolbarMenu';
|
||||
import SelectionFAB from '@/components/manga/SelectionFAB';
|
||||
import { DEFAULT_FULL_FAB_HEIGHT } from '@/components/util/StyledFab';
|
||||
|
||||
const StyledVirtuoso = styled(Virtuoso)(({ theme }) => ({
|
||||
listStyle: 'none',
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
*/
|
||||
|
||||
import { RadioGroup } from '@mui/material';
|
||||
import RadioInput from 'components/atoms/RadioInput';
|
||||
import SortRadioInput from 'components/atoms/SortRadioInput';
|
||||
import ThreeStateCheckboxInput from 'components/atoms/ThreeStateCheckboxInput';
|
||||
import OptionsTabs from 'components/molecules/OptionsTabs';
|
||||
import React from 'react';
|
||||
import { SORT_OPTIONS } from 'components/manga/util';
|
||||
import { ChapterListOptions, ChapterOptionsReducerAction, TranslationKey } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ChapterListOptions, ChapterOptionsReducerAction, TranslationKey } from '@/typings';
|
||||
import RadioInput from '@/components/atoms/RadioInput';
|
||||
import SortRadioInput from '@/components/atoms/SortRadioInput';
|
||||
import ThreeStateCheckboxInput from '@/components/atoms/ThreeStateCheckboxInput';
|
||||
import OptionsTabs from '@/components/molecules/OptionsTabs';
|
||||
import { SORT_OPTIONS } from '@/components/manga/util';
|
||||
|
||||
interface IProps {
|
||||
open: boolean;
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
import FilterList from '@mui/icons-material/FilterList';
|
||||
import { IconButton } from '@mui/material';
|
||||
import * as React from 'react';
|
||||
import ChapterOptions from 'components/manga/ChapterOptions';
|
||||
import { isFilterActive } from 'components/manga/util';
|
||||
import { ChapterListOptions, ChapterOptionsReducerAction } from 'typings';
|
||||
import { ChapterListOptions, ChapterOptionsReducerAction } from '@/typings';
|
||||
import ChapterOptions from '@/components/manga/ChapterOptions';
|
||||
import { isFilterActive } from '@/components/manga/util';
|
||||
|
||||
interface IProps {
|
||||
options: ChapterListOptions;
|
||||
|
||||
@@ -15,10 +15,10 @@ import { styled } from '@mui/material/styles';
|
||||
import React, { useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { mutate } from 'swr';
|
||||
import { IManga, ISource } from 'typings';
|
||||
import { t as translate } from 'i18next';
|
||||
import makeToast from 'components/util/Toast';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { IManga, ISource } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
import makeToast from '@/components/util/Toast';
|
||||
|
||||
const DetailsWrapper = styled('div')(({ theme }) => ({
|
||||
width: '100%',
|
||||
|
||||
@@ -19,10 +19,10 @@ import {
|
||||
useMediaQuery,
|
||||
useTheme,
|
||||
} from '@mui/material';
|
||||
import CategorySelect from 'components/navbar/action/CategorySelect';
|
||||
import React, { useState } from 'react';
|
||||
import { IManga } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IManga } from '@/typings';
|
||||
import CategorySelect from '@/components/navbar/action/CategorySelect';
|
||||
|
||||
interface IProps {
|
||||
manga: IManga;
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { PlayArrow } from '@mui/icons-material';
|
||||
import { BACK } from 'util/useBackTo';
|
||||
import { IChapter } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import StyledFab from 'components/util/StyledFab';
|
||||
import { IChapter } from '@/typings';
|
||||
import { BACK } from '@/util/useBackTo';
|
||||
import StyledFab from '@/components/util/StyledFab';
|
||||
|
||||
interface ResumeFABProps {
|
||||
chapter: IChapter;
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
import MoreHoriz from '@mui/icons-material/MoreHoriz';
|
||||
import { Fab, Menu, Box } from '@mui/material';
|
||||
import React, { useRef, useState } from 'react';
|
||||
import type { IChapterWithMeta } from 'components/manga/ChapterList';
|
||||
import SelectionFABActionItem from 'components/manga/SelectionFABActionItem';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { DEFAULT_FAB_STYLE } from 'components/util/StyledFab';
|
||||
import type { IChapterWithMeta } from '@/components/manga/ChapterList';
|
||||
import SelectionFABActionItem from '@/components/manga/SelectionFABActionItem';
|
||||
import { DEFAULT_FAB_STYLE } from '@/components/util/StyledFab';
|
||||
|
||||
export type SelectionAction = 'download' | 'delete' | 'bookmark' | 'unbookmark' | 'mark_as_read' | 'mark_as_unread';
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ import Download from '@mui/icons-material/Download';
|
||||
import RemoveDone from '@mui/icons-material/RemoveDone';
|
||||
import { ListItemIcon, ListItemText, MenuItem } from '@mui/material';
|
||||
import React from 'react';
|
||||
import type { IChapterWithMeta } from 'components/manga/ChapterList';
|
||||
import type { SelectionAction } from 'components/manga/SelectionFAB';
|
||||
import type { IChapterWithMeta } from '@/components/manga/ChapterList';
|
||||
import type { SelectionAction } from '@/components/manga/SelectionFAB';
|
||||
|
||||
interface IProps {
|
||||
action: SelectionAction;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { mutate } from 'swr';
|
||||
import requestManager, { RequestManager } from 'lib/RequestManager';
|
||||
import requestManager, { RequestManager } from '@/lib/RequestManager';
|
||||
|
||||
export const useRefreshManga = (mangaId: string) => {
|
||||
const [fetchingOnline, setFetchingOnline] = useState(false);
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
import { t } from 'i18next';
|
||||
import { useReducerLocalStorage } from 'util/useLocalStorage';
|
||||
import {
|
||||
ChapterListOptions,
|
||||
ChapterOptionsReducerAction,
|
||||
@@ -15,7 +14,8 @@ import {
|
||||
IChapter,
|
||||
NullAndUndefined,
|
||||
TranslationKey,
|
||||
} from 'typings';
|
||||
} from '@/typings';
|
||||
import { useReducerLocalStorage } from '@/util/useLocalStorage';
|
||||
|
||||
const defaultChapterOptions: ChapterListOptions = {
|
||||
active: false,
|
||||
|
||||
Reference in New Issue
Block a user