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

Remove unused exports #84

Merged
merged 5 commits into from
Oct 18, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/trpfrog.net/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"storybook": "storybook dev -p 6006",
"test": "vitest run",
"build-storybook": "storybook build",
"lint-fix": "eslint . --fix"
"lint-fix": "eslint . --fix",
"check-unused": "ts-remove-unused --skip '.*\\.(test|spec|stories)\\.tsx?' --skip '(\\.next|\\.config\\.[jt]sx?|\\/article\\-parts\\/)' --skip '(layout|page|loading|not-found|error|global-error|route|template|default|mdx-components|middleware).[jt]sx?' --check"
},
"prisma": {
"seed": "dotenv -e .env.local -- ts-node --compiler-options {\"module\":\"CommonJS\"} ./src/prisma/seed.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Image from 'next/legacy/image'
import Link from 'next/link'

export type ImageListProps = {
type ImageListProps = {
images: ImagePaths[]
imageWidth?: number
imageHeight?: number
Expand Down
2 changes: 1 addition & 1 deletion apps/trpfrog.net/src/app/(home)/_cards/AboutMeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const image = replaceWithLighterImageFormat(
'https://res.cloudinary.com/trpfrog/image/upload/w_1000/blog/sugadaira-travel/42C94C5A-04C6-4DEC-9D41-2C87F87D79B7_1_105_c.jpg',
)

export const attributes = [
const attributes = [
{ icon: '🐸', iconName: '性別', text: '男性' },
{ icon: '🎂', iconName: '誕生日', text: '2000年10月17日 (23歳)' },
{
Expand Down

This file was deleted.

100 changes: 0 additions & 100 deletions apps/trpfrog.net/src/app/(home)/_components/AboutMe/attributes.ts

This file was deleted.

21 changes: 0 additions & 21 deletions apps/trpfrog.net/src/app/(home)/_components/AboutMe/index.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions apps/trpfrog.net/src/app/(home)/_components/TopCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const styles = {
}),
}

export interface TopCardProps extends ComponentPropsWithRef<'div'> {
interface TopCardProps extends ComponentPropsWithRef<'div'> {
title?: string
titlePosition?: VariantProps<typeof styles.h2>['position']
}
Expand All @@ -60,7 +60,7 @@ export function TopCard(props: TopCardProps) {
)
}

export interface TopLinkCardProps extends AProps {
interface TopLinkCardProps extends AProps {
title?: string
readMoreText?: string | boolean
titlePosition?: VariantProps<typeof styles.h2>['position']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ function degreeMod(n: number) {
}

// returns [-180, 180)
export function degreeDifference(prev: number, cur: number) {
function degreeDifference(prev: number, cur: number) {
const diff = degreeMod(cur - prev)
if (diff >= 180) {
return diff - 360
}
return diff
}

export type RpmCalculationOptions = Partial<{
type RpmCalculationOptions = Partial<{
minQueueSize: number
}>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { DEFAULT_BLOG_THUMBNAIL } from '@/lib/constants'

import styles from './index.module.scss'

export type LiteArticleCardProps = {
type LiteArticleCardProps = {
entry: BlogPost
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const extraCodeBlockComponents = [
},
] as const satisfies readonly ArticleParts[]

export type ExtraCodeBlockComponentName = (typeof extraCodeBlockComponents)[number]['name']
type ExtraCodeBlockComponentName = (typeof extraCodeBlockComponents)[number]['name']

// TODO: ArticleParts の DevComponent の扱いを考える
const extraCodeBlockComponentRecord = Object.fromEntries(
Expand Down
2 changes: 1 addition & 1 deletion apps/trpfrog.net/src/app/blog/_components/Tag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const getTagEmoji = (tag: string) => {
}
}

export const getEmojiUrlFromTagName = (tag: string) => {
const getEmojiUrlFromTagName = (tag: string) => {
const codePoint = getTagEmoji(tag).codePointAt(0)?.toString(16)
return `https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/${codePoint}.svg`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type MarkdownOptions = Omit<MDXRemoteProps, 'source' | 'components'> & {
components: MDXRemoteProps['components']
}

export type ArticleRendererProps =
type ArticleRendererProps =
| {
toRender: string
markdownOptions: MarkdownOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { LoadingBlock } from '@/components/molecules/LoadingBlock'
import { ImageDragAndDrop } from '@blog/_renderer/DevBlogMarkdown/ImageDragAndDrop.tsx'
import { renderBlog } from '@blog/_renderer/renderBlog'

export type DevBlogMarkdownProps = {
type DevBlogMarkdownProps = {
slug: string
page?: number | 'all'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export function getMarkdownOptions(options?: {
} satisfies MarkdownOptions
}

export function getMarkdownPlugins() {
function getMarkdownPlugins() {
return {
remarkPlugins: [
remarkGfm,
Expand Down
2 changes: 0 additions & 2 deletions apps/trpfrog.net/src/app/download/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ export const WorksFrontmatterSchema = z.object({
),
date: z.coerce.date(),
})

export type WorksFrontmatter = z.infer<typeof WorksFrontmatterSchema>
2 changes: 1 addition & 1 deletion apps/trpfrog.net/src/app/icon-maker/iconMaker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RefObject } from 'react'

export const ICON_SIZE = 500,
const ICON_SIZE = 500,
CIRCLE_SIZE = 430

export class IconCanvas {
Expand Down
18 changes: 0 additions & 18 deletions apps/trpfrog.net/src/app/links/fetchFavicon.ts

This file was deleted.

3 changes: 1 addition & 2 deletions apps/trpfrog.net/src/app/music/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { A } from '@/components/wrappers'
// FIXME: Cannot find module 'Lyrics'
// @ts-expect-error - Error: Cannot find module 'Lyrics'
import Lyrics from './Lyrics.mdx'
import styles from './style.module.scss'

export default function Music() {
return (
Expand Down Expand Up @@ -56,7 +55,7 @@ export default function Music() {
</Block>

<Block title={'歌詞'}>
<div id={styles.lyrics}>
<div className="tw-text-center tw-text-lg &_span:tw-inline-block">
<Lyrics />
</div>
</Block>
Expand Down
7 changes: 0 additions & 7 deletions apps/trpfrog.net/src/app/music/style.module.scss

This file was deleted.

2 changes: 1 addition & 1 deletion apps/trpfrog.net/src/components/atoms/Alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'

import styles from './index.module.scss'

export type AlertTypes = 'caution' | 'frog' | 'info'
type AlertTypes = 'caution' | 'frog' | 'info'

type AlertAppearance = {
icon: IconDefinition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
width: 100%;
aspect-ratio: 1;
border-radius: 50%;
box-shadow: 0 0 30px 5px rgba(black, 0.3) inset;
box-shadow: 0 0 30px 5px rgba(0, 0, 0, 0.3) inset;

--thickness: 6deg;
--scales: 8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useImperativeHandle, useRef, useState } from 'react'

import { useDragEvent } from '@/hooks/useDragEvent'

import styles from './index.module.scss'
import styles from './index.module.css'

interface Props extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children' | 'onDrag'> {
onAngleChange: (degree: number) => void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useCallback, useId, useState } from 'react'

import { Tooltip } from 'react-tooltip'

export interface ButtonWithTooltipProps extends React.ComponentPropsWithoutRef<'button'> {
interface ButtonWithTooltipProps extends React.ComponentPropsWithoutRef<'button'> {
hoveredTooltipContent: React.ReactNode
clickedTooltipContent: React.ReactNode
}
Expand Down
2 changes: 1 addition & 1 deletion apps/trpfrog.net/src/components/atoms/CopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ButtonWithTooltip } from '@/components/atoms/ButtonWithTooltip'

import { tv } from '@/lib/tailwind/variants'

export type CopyButtonProps = {
type CopyButtonProps = {
copyContent: string
className?: string
onError?: (error: Error) => void
Expand Down
Loading
Loading