🧑💻 Migrate package.json prettier and eslint
Also updated the plugins and the config. New rules should be respected from now-on
This commit is contained in:
@@ -3,6 +3,7 @@ import { useDisclosure } from '@mantine/hooks';
|
||||
import { IconChevronDown, IconGripVertical } from '@tabler/icons-react';
|
||||
import { Reorder, useDragControls } from 'framer-motion';
|
||||
import { FC, useEffect, useRef } from 'react';
|
||||
|
||||
import { IDraggableEditableListInputValue } from '../../../../../widgets/widgets';
|
||||
|
||||
interface DraggableListProps {
|
||||
@@ -47,6 +48,7 @@ export const DraggableList = ({ items, value, onChange, options }: DraggableList
|
||||
const ListItem: FC<{
|
||||
item: any;
|
||||
label: string | JSX.Element;
|
||||
children: JSX.Element;
|
||||
}> = ({ item, label, children }) => {
|
||||
const [opened, handlers] = useDisclosure(false);
|
||||
const { classes, cx } = useStyles();
|
||||
|
||||
@@ -76,6 +76,7 @@ export const StaticDraggableList: FC<StaticDraggableListParams> = (props) => {
|
||||
const ListItem: FC<{
|
||||
item: IDraggableListInputValue['defaultValue'][number];
|
||||
label: string;
|
||||
children?: ReactNode;
|
||||
}> = (props) => {
|
||||
const { classes, cx } = useStyles();
|
||||
const controls = useDragControls();
|
||||
|
||||
@@ -2,13 +2,13 @@ import {
|
||||
ActionIcon,
|
||||
Autocomplete,
|
||||
Box,
|
||||
createStyles,
|
||||
Divider,
|
||||
Kbd,
|
||||
Menu,
|
||||
Popover,
|
||||
ScrollArea,
|
||||
Tooltip,
|
||||
createStyles,
|
||||
} from '@mantine/core';
|
||||
import { useDebouncedValue, useHotkeys } from '@mantine/hooks';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
@@ -16,9 +16,10 @@ import { IconBrandYoutube, IconDownload, IconMovie, IconSearch } from '@tabler/i
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
||||
import { api } from '~/utils/api';
|
||||
|
||||
import { useConfigContext } from '../../../config/provider';
|
||||
import { OverseerrMediaDisplay } from '../../../modules/common';
|
||||
import { IModule } from '../../../modules/ModuleTypes';
|
||||
import { OverseerrMediaDisplay } from '../../../modules/common';
|
||||
import { ConfigType } from '../../../types/config';
|
||||
import { searchUrls } from '../../Settings/Common/SearchEngine/SearchEngineSelector';
|
||||
import Tip from '../Tip';
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
// This interface is to be used in all the modules of the project
|
||||
// Each module should have its own interface and call the following function:
|
||||
// TODO: Add a function to register a module
|
||||
|
||||
import { Icon } from '@tabler/icons-react';
|
||||
|
||||
// Note: Maybe use context to keep track of the modules
|
||||
// TODO: Remove this old component and the entire file
|
||||
export interface IModule {
|
||||
export type IModule = {
|
||||
id: string;
|
||||
title: string;
|
||||
icon: Icon;
|
||||
component: React.ComponentType;
|
||||
options?: Option;
|
||||
padding?: PaddingOptions = {
|
||||
right: 15,
|
||||
top: 15,
|
||||
};
|
||||
}
|
||||
padding?: PaddingOptions;
|
||||
};
|
||||
|
||||
interface PaddingOptions {
|
||||
top: number;
|
||||
@@ -36,16 +36,9 @@ import '../styles/global.scss';
|
||||
import nextI18nextConfig from '../../next-i18next.config';
|
||||
import { api } from '~/utils/api';
|
||||
|
||||
function App(
|
||||
this: any,
|
||||
props: AppProps<{
|
||||
colorScheme: ColorScheme;
|
||||
packageAttributes: ServerSidePackageAttributesType;
|
||||
editModeEnabled: boolean;
|
||||
defaultColorScheme: ColorScheme;
|
||||
}>
|
||||
) {
|
||||
function App(props: AppProps & { colorScheme: ColorScheme }) {
|
||||
const { Component, pageProps } = props;
|
||||
|
||||
const [primaryColor, setPrimaryColor] = useState<MantineTheme['primaryColor']>('red');
|
||||
const [secondaryColor, setSecondaryColor] = useState<MantineTheme['primaryColor']>('orange');
|
||||
const [primaryShade, setPrimaryShade] = useState<MantineTheme['primaryShade']>(6);
|
||||
|
||||
@@ -20,6 +20,7 @@ import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { FunctionComponent, useState } from 'react';
|
||||
|
||||
import { useGetUsenetDownloads } from '../../hooks/widgets/dashDot/api';
|
||||
import { humanFileSize } from '../../tools/humanFileSize';
|
||||
|
||||
@@ -69,7 +70,7 @@ export const UsenetQueueList: FunctionComponent<UsenetQueueListProps> = ({ appId
|
||||
>
|
||||
{t('queue.error.message')}
|
||||
<Code mt="sm" block>
|
||||
{error.data}
|
||||
{error.message}
|
||||
</Code>
|
||||
</Alert>
|
||||
</Group>
|
||||
|
||||
Reference in New Issue
Block a user