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:
@@ -18,8 +18,8 @@ import {
|
||||
Metadata,
|
||||
MetadataHolder,
|
||||
MetadataKeyValuePair,
|
||||
} from 'typings';
|
||||
import requestManager, { RequestManager } from 'lib/RequestManager';
|
||||
} from '@/typings';
|
||||
import requestManager, { RequestManager } from '@/lib/RequestManager';
|
||||
|
||||
const APP_METADATA_KEY_PREFIX = 'webUI_';
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import { getMetadataFrom, requestUpdateMangaMetadata, requestUpdateServerMetadata } from 'util/metadata';
|
||||
import { IManga, Metadata, MetadataHolder, IReaderSettings, MetadataKeyValuePair } from 'typings';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { IManga, Metadata, MetadataHolder, IReaderSettings, MetadataKeyValuePair } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
import { getMetadataFrom, requestUpdateMangaMetadata, requestUpdateServerMetadata } from '@/util/metadata';
|
||||
|
||||
type UndefinedReaderSettings = {
|
||||
[setting in keyof IReaderSettings]: IReaderSettings[setting] | undefined;
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import { getMetadataFrom } from 'util/metadata';
|
||||
import { Metadata, ISearchSettings } from 'typings';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { Metadata, ISearchSettings } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
import { getMetadataFrom } from '@/util/metadata';
|
||||
|
||||
export const getDefaultSettings = (): ISearchSettings => ({
|
||||
ignoreFilters: false,
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import { useNavBarContext } from 'components/context/NavbarContext';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { useNavBarContext } from '@/components/context/NavbarContext';
|
||||
|
||||
export const BACK = '__BACK__';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import React, { useState, Dispatch, SetStateAction, useReducer, Reducer, useCallback } from 'react';
|
||||
import storage from 'util/localStorage';
|
||||
import storage from '@/util/localStorage';
|
||||
|
||||
export default function useLocalStorage<T>(key: string, defaultValue: T | (() => T)): [T, Dispatch<SetStateAction<T>>] {
|
||||
const initialState = defaultValue instanceof Function ? defaultValue() : defaultValue;
|
||||
|
||||
Reference in New Issue
Block a user