Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alessey committed Dec 13, 2024
1 parent 2d17daf commit a84b194
Show file tree
Hide file tree
Showing 29 changed files with 39 additions and 45 deletions.
4 changes: 2 additions & 2 deletions src/ui/react/nft/NFTCard.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import '@testing-library/jest-dom';
import { useIsMounted } from '@/core-react/internal/hooks/useIsMounted';
import { NFTProvider } from '@/core-react/nft/providers/NFTProvider';
import { render } from '@testing-library/react';
import {
type Mock,
Expand All @@ -10,8 +12,6 @@ import {
vi,
} from 'vitest';
import { useAccount } from 'wagmi';
import { useIsMounted } from '@/core-react/internal/hooks/useIsMounted';
import { NFTProvider } from '@/core-react/nft/providers/NFTProvider';
import { NFTCard } from './NFTCard';

vi.mock('wagmi', () => ({
Expand Down
9 changes: 3 additions & 6 deletions src/ui/react/nft/NFTCard.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { useCallback } from 'react';
import { useAccount } from 'wagmi';
import { useIsMounted } from '@/core-react/internal/hooks/useIsMounted';
import { useTheme } from '@/core-react/internal/hooks/useTheme';
import { useNFTData as defaultUseNFTData } from '@/core-react/nft/hooks/useNFTData';
import { NFTLifecycleProvider } from '@/core-react/nft/providers/NFTLifecycleProvider';
import { NFTProvider } from '@/core-react/nft/providers/NFTProvider';
import {
LifecycleType,
type NFTCardReact,
} from '@/core-react/nft/types';
import { LifecycleType, type NFTCardReact } from '@/core-react/nft/types';
import { useCallback } from 'react';
import { useAccount } from 'wagmi';
import { border, cn, color, pressable } from '../../../styles/theme';
import NFTErrorBoundary from './NFTErrorBoundary';
import { NFTErrorFallback } from './NFTErrorFallback';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/NFTErrorFallback.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@testing-library/jest-dom';
import { useTheme } from '@/core-react/internal/hooks/useTheme';
import { render } from '@testing-library/react';
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';
import { useTheme } from '@/core-react/internal/hooks/useTheme';
import { NFTErrorFallback } from './NFTErrorFallback';

vi.mock('@/core-react/internal/hooks/useTheme');
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/NFTMintCard.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '@testing-library/jest-dom';
import { useIsMounted } from '@/core-react/internal/hooks/useIsMounted';
import { render } from '@testing-library/react';
import {
type Mock,
Expand All @@ -9,7 +10,6 @@ import {
it,
vi,
} from 'vitest';
import { useIsMounted } from '@/core-react/internal/hooks/useIsMounted';
import { NFTMintCard } from './NFTMintCard';

vi.mock('@/core-react/internal/hooks/useTheme', () => ({
Expand Down
5 changes: 1 addition & 4 deletions src/ui/react/nft/NFTMintCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import { useTheme } from '@/core-react/internal/hooks/useTheme';
import { useMintData as defaultUseMintData } from '@/core-react/nft/hooks/useMintData';
import { NFTLifecycleProvider } from '@/core-react/nft/providers/NFTLifecycleProvider';
import { NFTProvider } from '@/core-react/nft/providers/NFTProvider';
import {
LifecycleType,
type NFTMintCardReact,
} from '@/core-react/nft/types';
import { LifecycleType, type NFTMintCardReact } from '@/core-react/nft/types';
import { buildMintTransactionData as defaultBuildMintTransaction } from '@/core/nft/utils/buildMintTransactionData';
import { background, border, cn, color } from '../../../styles/theme';
import NFTErrorBoundary from './NFTErrorBoundary';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/mint/NFTAssetCost.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { render } from '@testing-library/react';
import {
type Mock,
Expand All @@ -9,7 +10,6 @@ import {
it,
vi,
} from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTAssetCost } from './NFTAssetCost';

vi.mock('@/core-react/nft/providers/NFTProvider');
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/mint/NFTCollectionTitle.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { render } from '@testing-library/react';
import { type Mock, describe, expect, it, vi } from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTCollectionTitle } from './NFTCollectionTitle';

vi.mock('@/core-react/nft/providers/NFTProvider', () => ({
Expand Down
4 changes: 2 additions & 2 deletions src/ui/react/nft/mint/NFTCreator.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import '@testing-library/jest-dom';
import { render } from '@testing-library/react';
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { useOnchainKit } from '@/core-react/useOnchainKit';
import { render } from '@testing-library/react';
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';
import { NFTCreator } from './NFTCreator';

vi.mock('@/core-react/useOnchainKit', () => ({
Expand Down
6 changes: 3 additions & 3 deletions src/ui/react/nft/mint/NFTMintButton.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { render } from '@testing-library/react';
import '@testing-library/jest-dom';
import { useNFTLifecycleContext } from '@/core-react/nft/providers/NFTLifecycleProvider';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { useOnchainKit } from '@/core-react/useOnchainKit';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { base } from 'viem/chains';
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';
Expand All @@ -11,9 +14,6 @@ import {
useChainId,
} from 'wagmi';
import { mock } from 'wagmi/connectors';
import { useNFTLifecycleContext } from '@/core-react/nft/providers/NFTLifecycleProvider';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { useOnchainKit } from '@/core-react/useOnchainKit';
import { NFTMintButton } from './NFTMintButton';

vi.mock('@/core-react/nft/providers/NFTProvider');
Expand Down
4 changes: 2 additions & 2 deletions src/ui/react/nft/mint/NFTMintButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import { useAccount, useChainId } from 'wagmi';
import { useNFTLifecycleContext } from '@/core-react/nft/providers/NFTLifecycleProvider';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { useAccount, useChainId } from 'wagmi';
import { Spinner } from '../../../../internal/components/Spinner';
import { cn, color, text } from '../../../../styles/theme';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/mint/NFTMinters.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { render } from '@testing-library/react';
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTMinters } from './NFTMinters';

vi.mock('@/core-react/nft/providers/NFTProvider');
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/mint/NFTQuantitySelector.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { fireEvent, render } from '@testing-library/react';
import { act } from 'react';
import {
Expand All @@ -10,7 +11,6 @@ import {
it,
vi,
} from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTQuantitySelector } from './NFTQuantitySelector';

vi.mock('@/core-react/nft/providers/NFTProvider');
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/mint/NFTTotalCost.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { fireEvent, render } from '@testing-library/react';
import {
type Mock,
Expand All @@ -9,7 +10,6 @@ import {
it,
vi,
} from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTTotalCost } from './NFTTotalCost';

vi.mock('@/core-react/nft/providers/NFTProvider');
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/mint/NFTTotalCost.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type ReactNode, useCallback, useMemo, useState } from 'react';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { multiplyFloats } from '@/core/utils/multiplyFloats';
import { type ReactNode, useCallback, useMemo, useState } from 'react';
import { infoSvg } from '../../../../internal/svg/infoSvg';
import { background, border, cn, text } from '../../../../styles/theme';
import { formatAmount } from '../../../../token/utils/formatAmount';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTAudio.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { fireEvent, render } from '@testing-library/react';
import {
type Mock,
Expand All @@ -9,7 +10,6 @@ import {
it,
vi,
} from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTAudio } from './NFTAudio';

const mockAnimationUrl = 'https://example.com/audio.mp3';
Expand Down
4 changes: 2 additions & 2 deletions src/ui/react/nft/view/NFTAudio.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import type { NFTError } from '@/core-react/nft/types';
import {
type MouseEvent,
useCallback,
useEffect,
useRef,
useState,
} from 'react';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import type { NFTError } from '@/core-react/nft/types';
import { background, cn } from '../../../../styles/theme';

type NFTAudioReact = {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTImage.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { fireEvent, render, waitFor } from '@testing-library/react';
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTImage } from './NFTImage';

const mockContext = {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTImage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type MouseEvent, useCallback, useEffect, useState } from 'react';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import type { NFTError } from '@/core-react/nft/types';
import { type MouseEvent, useCallback, useEffect, useState } from 'react';
import { defaultNFTSvg } from '../../../../internal/svg/defaultNFTSvg';
import { cn } from '../../../../styles/theme';

Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTLastSoldPrice.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { render } from '@testing-library/react';
import {
type Mock,
Expand All @@ -9,7 +10,6 @@ import {
it,
vi,
} from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTLastSoldPrice } from './NFTLastSoldPrice';

vi.mock('@/core-react/nft/providers/NFTProvider', () => ({
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTLastSoldPrice.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ReactNode } from 'react';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import type { ReactNode } from 'react';
import { cn, color, text } from '../../../../styles/theme';
import { formatAmount as formatSN } from '../../../../swap/utils/formatAmount';
import { formatAmount } from '../../../../token/utils/formatAmount';
Expand Down
4 changes: 2 additions & 2 deletions src/ui/react/nft/view/NFTMedia.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import '@testing-library/jest-dom';
import { fireEvent, render } from '@testing-library/react';
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';
import { useNFTLifecycleContext } from '@/core-react/nft/providers/NFTLifecycleProvider';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { LifecycleType } from '@/core-react/nft/types';
import { fireEvent, render } from '@testing-library/react';
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';
import { NFTMedia } from './NFTMedia';

vi.mock('@/core-react/nft/providers/NFTProvider', () => ({
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTMedia.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useCallback, useMemo } from 'react';
import { useNFTLifecycleContext } from '@/core-react/nft/providers/NFTLifecycleProvider';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import {
LifecycleType,
MediaType,
type NFTError,
} from '@/core-react/nft/types';
import { useCallback, useMemo } from 'react';
import { cn } from '../../../../styles/theme';
import { NFTAudio } from './NFTAudio';
import { NFTImage } from './NFTImage';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTMintDate.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { render } from '@testing-library/react';
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTMintDate } from './NFTMintDate';

vi.mock('@/core-react/nft/providers/NFTProvider');
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTMintDate.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type ReactNode, useMemo } from 'react';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { type ReactNode, useMemo } from 'react';
import { cn, color, text } from '../../../../styles/theme';

const DATE_OPTIONS = {
Expand Down
4 changes: 2 additions & 2 deletions src/ui/react/nft/view/NFTOwner.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { useOnchainKit } from '@/core-react/useOnchainKit';
import { render } from '@testing-library/react';
import {
type Mock,
Expand All @@ -9,8 +11,6 @@ import {
it,
vi,
} from 'vitest';
import { useOnchainKit } from '@/core-react/useOnchainKit';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTOwner } from './NFTOwner';

vi.mock('@/core-react/useOnchainKit');
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTOwner.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ReactNode } from 'react';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { useOnchainKit } from '@/core-react/useOnchainKit';
import type { ReactNode } from 'react';
import { Avatar, Badge, Identity, Name } from '../../../../identity';
import { cn, color, text } from '../../../../styles/theme';

Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTTitle.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { render } from '@testing-library/react';
import { type Mock, describe, expect, it, vi } from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTTitle } from './NFTTitle';

vi.mock('@/core-react/nft/providers/NFTProvider', () => ({
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTVideo.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '@testing-library/jest-dom';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { fireEvent, render } from '@testing-library/react';
import {
type Mock,
Expand All @@ -9,7 +10,6 @@ import {
it,
vi,
} from 'vitest';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import { NFTVideo } from './NFTVideo';

vi.mock('@/core-react/nft/providers/NFTProvider', () => ({
Expand Down
2 changes: 1 addition & 1 deletion src/ui/react/nft/view/NFTVideo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useRef } from 'react';
import { useNFTContext } from '@/core-react/nft/providers/NFTProvider';
import type { NFTError } from '@/core-react/nft/types';
import { useEffect, useRef } from 'react';
import { defaultNFTSvg } from '../../../../internal/svg/defaultNFTSvg';
import { cn } from '../../../../styles/theme';

Expand Down

0 comments on commit a84b194

Please sign in to comment.