Communitygithub.com

Anthony Fu의 JavaScript/TypeScript 프로젝트 도구 및 규칙

새 프로젝트 설정, ESLint/Prettier 대안 구성, 모노레포, 라이브러리 퍼블리싱 또는 Anthony Fu의 선호도를 언급할 때 사용합니다.

TypeScript 프로젝트 도구 및 규칙란 무엇인가요?

이 스킬은 Anthony Fu가 선호하는 JavaScript/TypeScript 프로젝트의 도구와 규칙을 포함합니다. 새 프로젝트 초기 설정부터 ESLint 및 Prettier 대체 구성, 모노레포 관리, 라이브러리 퍼블리싱까지 폭넒게 지원합니다. 주로 Claude Code, Cursor, Codex와 같은 AI 에이전트 플랫폼에서 사용할 수 있으며, 사용자가 Anthony Fu의 스타일을 언급하거나 관련 작업을 요청할 때 자동으로 활성화됩니다. SKILL.md 문서를 기반으로 코드 구조, 타입스크립트 설정, 테스트(Vitest), @antfu/ni 명령어, ESLint 구성, Git 훅, pnpm 카탈로그 등 구체적인 가이드를 제공하여 일관된 코딩 관행을 유지하도록 돕습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/antfu/skills/antfu

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

코딩 관행

코드 구성

  • 단일 책임: 각 소스 파일은 명확하고 집중된 범위/목적을 가져야 합니다.
  • 큰 파일 분할: 파일이 너무 커지거나 여러 관심사를 처리할 때는 분할하세요.
  • 타입 분리: 항상 타입과 인터페이스를 types.ts 또는 types/*.ts로 분리하세요.
  • 상수 추출: 상수를 전용 constants.ts 파일로 옮기세요.

실행 환경

  • 동형 코드 선호: 가능하면 Node, 브라우저, 워커에서 모두 작동하는 런타임 독립적인 코드를 작성하세요.
  • 명확한 런타임 표시: 코드가 환경에 특화된 경우 파일 상단에 주석을 추가하세요:
// @env node
// @env browser

TypeScript

  • 명시적 반환 타입: 가능하면 반환 타입을 명시적으로 선언하세요.
  • 복잡한 인라인 타입 회피: 복잡한 타입은 전용 type 또는 interface 선언으로 추출하세요.

주석

  • 불필요한 주석 회피: 코드는 자명해야 합니다.
  • '어떻게'가 아닌 '왜'를 설명: 주석은 코드가 무엇을 하는지가 아니라 이유나 의도를 설명해야 합니다.

테스트 (Vitest)

  • 테스트 파일: foo.ts → foo.test.ts (동일 디렉토리)
  • describe/it API 사용 (test 대신)
  • 복잡한 출력에는 toMatchSnapshot 사용
  • 언어별 스냅샷에는 명시적 경로와 함께 toMatchFileSnapshot 사용

도구 선택

@antfu/ni 명령어

명령어설명
ni종속성 설치
ni <pkg> / ni -D <pkg>종속성 / 개발 종속성 추가
nr <script>스크립트 실행
nu종속성 업그레이드
nun <pkg>종속성 제거
nci클린 설치 (pnpm i --frozen-lockfile)
nlx <pkg>패키지 실행 (npx)

TypeScript 설정

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true
  }
}

ESLint 설정

// eslint.config.mjs
import antfu from '@antfu/eslint-config'

export default antfu()

작업을 완료할 때 pnpm run lint --fix를 실행하여 코드 서식을 지정하고 코딩 스타일을 수정하세요.

자세한 구성 옵션: antfu-eslint-config

Git 훅

{
  "simple-git-hooks": {
    "pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && npx lint-staged"
  },
  "lint-staged": { "*": "eslint --fix" },
  "scripts": {
    "prepare": "npx simple-git-hooks"
  }
}

pnpm 카탈로그

버전 관리를 위해 pnpm-workspace.yaml에서 명명된 카탈로그를 사용하세요:

카탈로그목적
prod프로덕션 종속성
inlined번들러 인라인 종속성
dev개발 도구 (린터, 번들러, 테스트)
frontend프론트엔드 라이브러리

기본 카탈로그는 사용하지 마세요. 카탈로그 이름은 프로젝트 요구 사항에 따라 조정할 수 있습니다.


참고 자료

주제설명참고
ESLint 설정프레임워크 지원, 포매터, 규칙 재정의, VS Code 설정antfu-eslint-config
프로젝트 설정.gitignore, GitHub Actions, VS Code 확장setting-up
앱 개발Vue/Nuxt/UnoCSS 규칙 및 패턴app-development
라이브러리 개발tsdown 번들링, 순수 ESM 퍼블리싱library-development
모노레포pnpm 워크스페이스, 중앙화된 별칭, Turborepomonorepo

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

관련 스킬