style: enable import-x/no-duplicates (#6279)

This commit is contained in:
EYHN
2024-03-25 03:55:32 +00:00
parent 7ce2bfbf0b
commit f2adbdaba4
342 changed files with 881 additions and 1033 deletions

View File

@@ -1,6 +1,7 @@
import clsx from 'clsx';
import { Input, type InputProps } from '../../ui/input';
import type { InputProps } from '../../ui/input';
import { Input } from '../../ui/input';
import * as styles from './share.css';
export type AuthInputProps = InputProps & {
label?: string;

View File

@@ -1,10 +1,5 @@
import {
type FC,
type PropsWithChildren,
type ReactNode,
useEffect,
useState,
} from 'react';
import type { FC, PropsWithChildren, ReactNode } from 'react';
import { useEffect, useState } from 'react';
import { Empty } from '../../ui/empty';
import { AffineOtherPageLayout } from '../affine-other-page-layout';

View File

@@ -1,8 +1,9 @@
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { ArrowLeftSmallIcon } from '@blocksuite/icons';
import { type FC } from 'react';
import type { FC } from 'react';
import { Button, type ButtonProps } from '../../ui/button';
import type { ButtonProps } from '../../ui/button';
import { Button } from '../../ui/button';
export const BackButton: FC<ButtonProps> = props => {
const t = useAFFiNEI18N();

View File

@@ -1,4 +1,5 @@
import { forwardRef, type HTMLAttributes } from 'react';
import type { HTMLAttributes } from 'react';
import { forwardRef } from 'react';
const formatTime = (time: number): string => {
const minutes = Math.floor(time / 60);

View File

@@ -3,8 +3,9 @@ import { fetchWithTraceReport } from '@affine/graphql';
import { ArrowRightSmallIcon } from '@blocksuite/icons';
import clsx from 'clsx';
import { useEffect, useMemo, useState } from 'react';
import type { Location } from 'react-router-dom';
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
import { type Location, useLocation, useNavigate } from 'react-router-dom';
import { useLocation, useNavigate } from 'react-router-dom';
import useSWR from 'swr';
import { Button } from '../../ui/button';

View File

@@ -1,9 +1,10 @@
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { passwordStrength } from 'check-password-strength';
import { type FC, useEffect } from 'react';
import { useCallback, useState } from 'react';
import type { FC } from 'react';
import { useCallback, useEffect, useState } from 'react';
import { Input, type InputProps } from '../../../ui/input';
import type { InputProps } from '../../../ui/input';
import { Input } from '../../../ui/input';
import * as styles from '../share.css';
import { ErrorIcon } from './error';
import { SuccessIcon } from './success';

View File

@@ -1,5 +1,6 @@
import clsx from 'clsx';
import { type FC, useMemo } from 'react';
import type { FC } from 'react';
import { useMemo } from 'react';
import type { Status } from './index';
import { tag } from './style.css';

View File

@@ -1,5 +1,6 @@
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { type FC, useCallback, useRef, useState } from 'react';
import type { FC } from 'react';
import { useCallback, useRef, useState } from 'react';
import { Button } from '../../ui/button';
import { Wrapper } from '../../ui/layout';

View File

@@ -1,4 +1,5 @@
import { forwardRef, type HTMLAttributes, type ReactNode } from 'react';
import type { HTMLAttributes, ReactNode } from 'react';
import { forwardRef } from 'react';
import * as styles from './styles.css';

View File

@@ -1,6 +1,7 @@
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { ConfirmModal, type ConfirmModalProps } from '../../ui/modal';
import type { ConfirmModalProps } from '../../ui/modal';
import { ConfirmModal } from '../../ui/modal';
export const PublicLinkDisableModal = (props: ConfirmModalProps) => {
const t = useAFFiNEI18N();

View File

@@ -1,5 +1,6 @@
import { useAtomValue } from 'jotai';
import { type ReactNode, useEffect, useState } from 'react';
import type { ReactNode } from 'react';
import { useEffect, useState } from 'react';
import { Loading } from '../../ui/loading';
import * as styles from './index.css';

View File

@@ -1,5 +1,5 @@
import { AuthPageContainer } from '@affine/component/auth-components';
import { type GetInviteInfoQuery } from '@affine/graphql';
import type { GetInviteInfoQuery } from '@affine/graphql';
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { Avatar } from '../../ui/avatar';