Repository navigation
[DONE] Pattern Lab 코드에서 아무도 읽지 않는 이름 둘이 빠지고, 다른 파일이 읽지 않는 export 62개가 파일 안으로 들어간다 - #237
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Ted7kvLRcnQBfHBm7xX9i
knip found 64 exports in lib/lab and app/pattern-lab that no file imports. SHADER_PREAMBLE_LINES and TimelineZoom had no reader at all and go; the other 62 lose the export keyword. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Ted7kvLRcnQBfHBm7xX9i
patternflow-bot
marked this pull request as ready for review
October 25, 2026 02:35
This was referenced Oct 25, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 25, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 25, 2026
Patternflow-lab#183 Patternflow-lab#184 Patternflow-lab#186 Patternflow-lab#187 Patternflow-lab#189 Patternflow-lab#191 Patternflow-lab#192 Patternflow-lab#193 Patternflow-lab#194 Patternflow-lab#196 Patternflow-lab#197 Patternflow-lab#198 Patternflow-lab#199 Patternflow-lab#200 Patternflow-lab#202 Patternflow-lab#203 Patternflow-lab#204 Patternflow-lab#205 Patternflow-lab#206 Patternflow-lab#208 Patternflow-lab#209 Patternflow-lab#210 Patternflow-lab#214 Patternflow-lab#217 Patternflow-lab#218 Patternflow-lab#221 Patternflow-lab#222 Patternflow-lab#223 Patternflow-lab#227 Patternflow-lab#237 Patternflow-lab#238 Patternflow-lab#239 Patternflow-lab#240
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lsh / https://claude.ai/code/session_019Ted7kvLRcnQBfHBm7xX9i
Pattern Lab 코드에서 다른 파일이 하나도 읽지 않던 export 64개를 정리했어요. 부르는 곳이 아예 없던 이름 둘은 지우고, 나머지 62개는
export낱말만 떼서 그 파일 안에서만 쓰여요. 화면과 동작은 그대로이고, 머지하면 Lab 파일을 열었을 때 밖에서 쓰는 이름만export로 보여요.좋아지는 것: 없음
export떼기bb3c701)한 일
knip 5 를 스크래치에 깔아
web/에서 돌리니lib/lab/와app/pattern-lab/에 다른 파일이 읽지 않는 export 가 64개(값 32개, 타입 32개, 33개 파일) 나왔어요. 표에 적힌 59개보다 다섯이 많아요. 표는 같은 이름이 다른 파일에 한 번이라도 나오면 셈에서 뺐는데, 다섯은 이름만 같고 이 파일의 것을 읽지는 않아요.useShowEditing.ts의sortedLane:lib/lab/director/bake.ts에 몸이 같은 함수가 따로 있어요. 둘을 하나로 모으는 건 표 2위라 여기선export만 뗐어요.useShowEditing.ts의Selection: 다른 곳의Selection은 DOM 타입이거나 제 타입이에요.annotations.ts의DEFAULT_KNOB_LABELS,stripKnobsAnnotation:lib/pattern/knobs.ts에서 받아 다시 내보내던 이름인데, 부르는 곳은 다lib/pattern/knobs에서 바로 받아요. 다시 내보내기 목록에서만 뺐고 파일 안에선 그대로 써요.store/project.ts의ProjectSlice:capture/client.ts가 같은 이름의 제 타입을 둬요.지운 이름 둘은 표대로예요.
capture/shaderSource.ts의SHADER_PREAMBLE_LINES는 머리글이 끝에#line 1을 두어서 줄 번호를 따로 셀 일이 없어요.director/useTimelineZoom.ts의TimelineZoom은DirectorPanel.tsx가 훅을 바로 부르고 그 타입은 쓰지 않아요.export를 뗀 뒤noUnusedLocals에 걸린 것은 없었어요. 떼어 낸 이름은 다 그 파일 안에서 쓰여요.증거
GitHub 에서도
bb3c701의 Drift checks 와 Web CI 가 둘 다 success 예요.npm ci는web/에서 그대로 지났어요. dev(edd8a88)는 이 브랜치가 갈라진 뒤 움직이지 않아서 merge 할 것이 없었어요.이름마다
web/src,web/scripts,web/test,tools,firmware/toolchain,docs,web/content와 레포의 마크다운을git grep -w했어요. 다른 파일에 나온 이름은 위 다섯과incoming/ROUND.md의 표 글뿐이에요.화면을 바꾸지 않아서 사진은 없어요.
실행법
가정
sortedLane은export만 떼고 두 벌을 그대로 뒀어요. 하나로 모으는 일은 표 2위 몫이에요.Changelog
Web
lib/labandapp/pattern-labwith no importer; two names with no reader at all are gone and the other 62 are file-local.경험
언제: knip 의 안 쓰는 export 를 「이름이 다른 파일에 나오는지」
git grep -w로 다시 거를 때교훈: 이름만 같은 다른 정의(DOM 타입, 같은 이름의 제 타입, 다시 내보내기)는 그 파일을 읽는 게 아니니, 다른 파일의 import 줄을 보고 가려요
근거: #237 에서 표 1위는 59개라 했지만 knip 은 64개를 냈고, 빠진 다섯(
Selection,ProjectSlice,sortedLane, 다시 내보내기 둘)은 이름만 겹쳤어요바퀴
바퀴 91 · 후보 1 「Pattern Lab 코드에서 아무도 읽지 않는 이름 둘이 빠지고, 다른 파일이 읽지 않는 export 57개가 파일 안으로 들어간다」
다음 바퀴
sortedLane두 벌이 이제 둘 다 파일 안에만 있어서, 하나로 모으면export를 다시 붙여요.getComputedStyle비교를 그대로 써요.PatternLab.module.css에서 셸의 CSS 로 간다」: 3위와 같은 비교에labCss.test.ts의 새 시험 하나예요.https://claude.ai/code/session_019Ted7kvLRcnQBfHBm7xX9i
Generated by Claude Code