Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update biome #1809

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion apps/storybook/components/View.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { cva } from 'class-variance-authority'
import { type ReactNode } from 'react'
import type { ReactNode } from 'react'
import * as React from 'react'

export const View = ({
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/stories/button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Button.stories.ts|tsx

import type { Meta, StoryObj } from '@storybook/react'
import { Button, ButtonProps } from '@sushiswap/ui'
import { Button, type ButtonProps } from '@sushiswap/ui'
import { Currency } from '@sushiswap/ui'
import { DiscordIcon } from '@sushiswap/ui/icons/DiscordIcon'
import * as React from 'react'
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/stories/card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
CardGroup,
CardHeader,
CardLabel,
CardProps,
type CardProps,
CardTitle,
} from '@sushiswap/ui'
import * as React from 'react'
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/stories/chip.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Chip.stories.ts|tsx

import type { Meta, StoryObj } from '@storybook/react'
import { Chip, ChipProps } from '@sushiswap/ui'
import { Chip, type ChipProps } from '@sushiswap/ui'
import { DiscordIcon } from '@sushiswap/ui/icons/DiscordIcon'
import * as React from 'react'

Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/stories/datatable.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import type { Meta, StoryObj } from '@storybook/react'
import { DataTable } from '@sushiswap/ui'
import { ColumnDef, PaginationState } from '@tanstack/react-table'
import type { ColumnDef, PaginationState } from '@tanstack/react-table'
import { useState } from 'react'

type Payment = {
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/stories/iconbutton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// IconButton.stories.ts|tsx

import type { Meta, StoryObj } from '@storybook/react'
import { IconButton, IconButtonProps } from '@sushiswap/ui'
import { IconButton, type IconButtonProps } from '@sushiswap/ui'
import { DiscordIcon } from '@sushiswap/ui/icons/DiscordIcon'
import * as React from 'react'

Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/stories/message.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Button.stories.ts|tsx

import type { Meta, StoryObj } from '@storybook/react'
import { Message, MessageProps } from '@sushiswap/ui'
import { Message, type MessageProps } from '@sushiswap/ui'
import * as React from 'react'

import { ViewGroup } from '../components/View'
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/stories/skeletontext.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Skeleton.stories.ts|tsx

import type { Meta, StoryObj } from '@storybook/react'
import { SkeletonText, SkeletonTextProps } from '@sushiswap/ui'
import { SkeletonText, type SkeletonTextProps } from '@sushiswap/ui'

const fontSizes: SkeletonTextProps['fontSize'][] = [
'xs',
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/stories/textfield.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MagnifyingGlassIcon } from '@heroicons/react/24/solid'
import type { Meta, StoryObj } from '@storybook/react'
import {
TextField,
TextFieldBaseProps,
type TextFieldBaseProps,
TextFieldDescription,
} from '@sushiswap/ui'
import * as React from 'react'
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/stories/toggle.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Toggle.stories.ts|tsx

import type { Meta, StoryObj } from '@storybook/react'
import { Toggle, ToggleProps } from '@sushiswap/ui'
import { Toggle, type ToggleProps } from '@sushiswap/ui'
import * as React from 'react'

import { ViewGroup } from '../components/View'
Expand Down
4 changes: 2 additions & 2 deletions apps/web/eslintrc.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'path'
import { fileURLToPath } from 'url'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AcademyArticle } from '@sushiswap/graph-client/strapi'
import { Container } from '@sushiswap/ui'
import format from 'date-fns/format'
import { FC } from 'react'
import type { FC } from 'react'
import { Media } from 'src/app/(cms)/components/media'
import { DifficultyLabel } from '../../components/difficulty-label'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { EnvelopeIcon, LinkIcon } from '@heroicons/react/24/outline'
import type { AcademyArticle } from '@sushiswap/graph-client/strapi'
import { ClipboardController } from '@sushiswap/ui'
import { TwitterIcon } from '@sushiswap/ui/icons/TwitterIcon'
import { FC } from 'react'
import type { FC } from 'react'
import { getShareText } from 'src/app/(cms)/constants'

interface ArticleLinks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ArrowLeftIcon, ShareIcon } from '@heroicons/react/24/solid'
import type { AcademyArticle } from '@sushiswap/graph-client/strapi'
import { Container, IconButton } from '@sushiswap/ui'
import { useRouter } from 'next/navigation'
import { FC, useCallback } from 'react'
import { type FC, useCallback } from 'react'
import { getShareText } from 'src/app/(cms)/constants'

interface Breadcrumb {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import { useRouter } from 'next/navigation'
import {
Dispatch,
FC,
ReactNode,
SetStateAction,
type Dispatch,
type FC,
type ReactNode,
type SetStateAction,
createContext,
useContext,
useMemo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ export function ArticleListFiltered({
<InfiniteScroll
dataLength={articles.length}
next={fetchNextPage}
hasMore={infinite && articles.length < (meta?.total || -Infinity)}
hasMore={
infinite &&
articles.length < (meta?.total || Number.NEGATIVE_INFINITY)
}
loader={
<div className="flex justify-center w-full py-4">
<Loader size={16} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AcademyArticle } from '@sushiswap/graph-client/strapi'
import type { AcademyArticle } from '@sushiswap/graph-client/strapi'
import { ArticleCard } from '../article-card/article-card'

interface ArticleList {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { ArrowRightIcon } from '@heroicons/react/24/outline'
import { Chip } from '@sushiswap/ui'
import { CircleIcon } from '@sushiswap/ui/icons/CircleIcon'

import { Difficulty, getDifficulties } from '@sushiswap/graph-client/strapi'
import {
type Difficulty,
getDifficulties,
} from '@sushiswap/graph-client/strapi'
import { classNames } from '@sushiswap/ui'
import { AcademyIcon } from '../../components/icons'
import { DOCS_URL } from '../../constants'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { Difficulty } from '@sushiswap/graph-client/strapi'
import type { Difficulty } from '@sushiswap/graph-client/strapi'
import { CircleIcon } from '@sushiswap/ui/icons/CircleIcon'
import { useCallback, useState } from 'react'
import { DIFFICULTY_ELEMENTS } from '../../contants'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AcademyArticle } from '@sushiswap/graph-client/strapi'
import type { AcademyArticle } from '@sushiswap/graph-client/strapi'
import { classNames } from '@sushiswap/ui'
import { CircleIcon } from '@sushiswap/ui/icons/CircleIcon'
import { DIFFICULTY_ELEMENTS } from '../contants'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC } from 'react'
import type { FC } from 'react'

export const LooperBg: FC<React.ComponentProps<'svg'>> = ({ ...props }) => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use client'

import { getAcademyArticles } from '@sushiswap/graph-client/strapi'
import type { getAcademyArticles } from '@sushiswap/graph-client/strapi'
import { SkeletonText } from '@sushiswap/ui'
import { useInfiniteQuery } from '@tanstack/react-query'
import React from 'react'
import type React from 'react'
import { useAcademySearch } from '../../components/academy-search-provider'

const Shell = ({ children }: { children: React.ReactNode }) => (
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(cms)/blog/[article-slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getBlogArticles } from '@sushiswap/graph-client/strapi'
import { Container, LinkInternal } from '@sushiswap/ui'
import type { Metadata } from 'next'
import { notFound } from 'next/navigation'
import { Article, WithContext } from 'schema-dts'
import type { Article, WithContext } from 'schema-dts'
import { getGhostBody } from '../../lib/ghost/ghost'
import { getOptimizedMedia, isMediaVideo } from '../../lib/media'
import { ArticleAuthors } from '../components/article-authors'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client'

import {
BlogArticle,
BlogArticleMeta,
type BlogArticle,
type BlogArticleMeta,
getBlogArticles,
} from '@sushiswap/graph-client/strapi'
import { Loader } from '@sushiswap/ui'
Expand Down Expand Up @@ -103,7 +103,7 @@ export function ArticleListClient({
<InfiniteScroll
dataLength={articles.length}
next={fetchNextPage}
hasMore={articles.length < (meta?.total || -Infinity)}
hasMore={articles.length < (meta?.total || Number.NEGATIVE_INFINITY)}
loader={
<div className="flex justify-center w-full py-4">
<Loader size={16} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import { useRouter } from 'next/navigation'
import {
Dispatch,
FC,
ReactNode,
SetStateAction,
type Dispatch,
type FC,
type ReactNode,
type SetStateAction,
createContext,
useContext,
useMemo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { Toggle } from '@sushiswap/ui'
import { useCallback, useState } from 'react'
import { Category } from 'src/app/(cms)/lib/strapi/categories'
import type { Category } from 'src/app/(cms)/lib/strapi/categories'
import { useBlogSearch, useSetBlogSearch } from '../blog-search-provider'

interface CategoryFilterClient {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(cms)/components/icons/AcademyIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComponentType, FC } from 'react'
import type { ComponentType, FC } from 'react'

import { SquareIcon } from './SquareIcon'

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(cms)/components/icons/DocsIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC } from 'react'
import type { FC } from 'react'

interface DocsIcon {
color: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import {
ChatBubbleOvalLeftIcon /*, TicketIcon*/,
} from '@heroicons/react/24/solid'
import { Button } from '@sushiswap/ui'
import React, { FC } from 'react'
import type React from 'react'
import type { FC } from 'react'

interface Block {
title: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChevronRightIcon } from '@heroicons/react/24/solid'
import {
FaqMostSearched,
type FaqMostSearched,
getFaqMostSearched,
} from '@sushiswap/graph-client/strapi'
import Link from 'next/link'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getFaqCategories } from '@sushiswap/graph-client/strapi'
import { Container } from '@sushiswap/ui'
import {
Sidebar,
type Sidebar,
SidebarDesktop,
SidebarMobile,
} from '../../../components/sidebar'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getFaqCategory } from '@sushiswap/graph-client/strapi'
import { Breadcrumb, Container, typographyVariants } from '@sushiswap/ui'
import { notFound } from 'next/navigation'
import React from 'react'
import type React from 'react'
import { CategoryLayout } from './components/category-layout'

export const revalidate = 900
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { FaqCategory, getFaqCategory } from '@sushiswap/graph-client/strapi'
import {
type FaqCategory,
getFaqCategory,
} from '@sushiswap/graph-client/strapi'
import Link from 'next/link'
import { notFound } from 'next/navigation'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getFaqAnswerGroup } from '@sushiswap/graph-client/strapi'
import { Container } from '@sushiswap/ui'
import {
Sidebar,
type Sidebar,
SidebarDesktop,
SidebarMobile,
} from '../../../components/sidebar'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getFaqAnswerGroup } from '@sushiswap/graph-client/strapi'
import { Breadcrumb, Container, typographyVariants } from '@sushiswap/ui'
import { notFound } from 'next/navigation'
import React from 'react'
import type React from 'react'
import { AnswerGroupLayout } from './components/answer-group-layout'

export const revalidate = 900
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getFaqAnswerGroup } from '@sushiswap/graph-client/strapi'
import { notFound, redirect } from 'next/navigation'
import { NextRequest } from 'next/server'
import type { NextRequest } from 'next/server'

export const revalidate = 3600

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(cms)/header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getDifficulties } from '@sushiswap/graph-client/strapi'
import {
Navigation,
NavigationElement,
type NavigationElement,
NavigationElementType,
} from '@sushiswap/ui'
import React from 'react'
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/app/(cms)/lib/ghost/ghost.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import GhostContentAPI, { GhostContentAPIOptions } from '@tryghost/content-api'
import GhostContentAPI, {
type GhostContentAPIOptions,
} from '@tryghost/content-api'

interface CustomGhostContentAPIOptions extends GhostContentAPIOptions {
makeRequest: (options: {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(landing)/components/AnimatedTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { classNames } from '@sushiswap/ui'
import { useInView } from 'framer-motion'
import { FC, ReactNode, useRef } from 'react'
import { type FC, type ReactNode, useRef } from 'react'

export const AnimatedTitle: FC<{ children: ReactNode; className?: string }> = ({
children,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(landing)/components/BuildFuture.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button } from '@sushiswap/ui'
import { Container } from '@sushiswap/ui'
import { motion } from 'framer-motion'
import React, { FC } from 'react'
import React, { type FC } from 'react'

import { ExpandableCard } from './ExpandableCard'
import { BentoBoxSVG, SwitchSVG } from './svgs'
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(landing)/components/BuildWealth.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Container } from '@sushiswap/ui'
import Image from 'next/legacy/image'
import React, { FC } from 'react'
import React, { type FC } from 'react'

import { ExpandableCard } from './ExpandableCard'

Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app/(landing)/components/Ecosystem.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Button } from '@sushiswap/ui'
import { Container } from '@sushiswap/ui'
import { motion } from 'framer-motion'
import React, { FC } from 'react'
import React, { type FC } from 'react'

import { ExpandableCard, ExpendableCardData } from './ExpandableCard'
import { ExpandableCard, type ExpendableCardData } from './ExpandableCard'

interface TabsExpendableCardData extends ExpendableCardData {
summary: string
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(landing)/components/ExpandableCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LinkExternal } from '@sushiswap/ui'
import { Button } from '@sushiswap/ui'
import { AnimatePresence, AnimateSharedLayout, motion } from 'framer-motion'
import { nanoid } from 'nanoid'
import React, { FC, ReactNode, useCallback, useState } from 'react'
import React, { type FC, type ReactNode, useCallback, useState } from 'react'

interface ExpandableCardRenderProps {
open: boolean
Expand Down
Loading
Loading