Skip to content

lint: raw 태그 대신 DS 프리미티브 강제 (manifest replaces 기반) + DS 커버리지 gap 채우기 #170

@jeongye01

Description

@jeongye01

배경

페이지를 DS 프리미티브로 갈아끼우다 보니 "프리미티브가 있는데 raw <button>/<input> 등을 그대로 박은" 케이스를 기계적으로 검증할 수단이 필요했다. Figma 디자인 린트의 detached component 체크에 대응하는 code-first 게이트.

한 것 (이 이슈로 들어온 변경)

  • manifest에 replaces 필드 추가button/input/textarea 프리미티브가 대체하는 네이티브 태그 명시 (SoT = manifest)
  • eslint.config.js 룰 배선 — manifest의 replaces를 읽어 no-restricted-syntax 금지 셀렉터를 유도. 프리미티브가 있는 태그만 막아 false-positive 방지. 프리미티브 추가 시 replaces만 넣으면 자동 확장. 현재 src/pages/** 에 적용
  • 룰이 raw 8곳을 잡았고, 전부 대응 프리미티브가 없는 정당한 gap → 사유 단 eslint-disable로 원장화 (게이트 green)

이 게이트가 드러낸 DS 커버리지 gap (백로그)

raw로 남아 disable된 케이스 = 채워야 할 프리미티브:

  • interactive/clickable card — 카드 전체가 클릭 대상인 패턴 (ProjectDetail 워크플로 선택, IdeaCard, VariantCard)
  • icon-button — 아이콘만 있는 버튼 (✕ 삭제)
  • text-button / link-button — 텍스트만 있는 보조 액션
  • file-upload input — 파일 업로드 (AbTest UploadSlot)
  • list-select / segmented control — 선택 가능한 리스트 항목 (Ideation 발상 기법)

그 외 follow-up

  • AbTest 상세 모달 탭 → 기존 <Tabs> 프리미티브로 마이그레이션 (gap 아님, 이미 프리미티브 있음 — TODO로 disable됨)
  • 게이트를 src/pages 너머 src/components/*(컴포지트)로 확장
  • select/label 등 Radix 합성 프리미티브가 drop-in이 되면 replaces 추가 검토

참고

  • DS 프리미티브: frontend/src/components/ui/* + *.manifest.json
  • 게이트 룰: frontend/eslint.config.js (restrictedRawTags)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions