Skip to content
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 .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"trailingComma": "all",
"printWidth": 80,
"arrowParens": "always",
"endOfLine": "lf"
"endOfLine": "lf",
"plugins": ["prettier-plugin-tailwindcss"]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"husky": "^9.1.7",
"lint-staged": "^17.0.8",
"prettier": "^3.7.4",
"prettier-plugin-tailwindcss": "^0.8.0",
"turbo": "^2.9.18",
"typescript": "5.9.2"
},
Expand Down
5 changes: 5 additions & 0 deletions packages/eslint-config/next.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ export const nextJsConfig = [
},
},
pluginJsxA11y.flatConfigs.recommended,
{
rules: {
"import/no-relative-parent-imports": "error",
},
},
{
files: [APP_ROUTER_SPECIAL_FILES],
rules: {
Expand Down
4 changes: 3 additions & 1 deletion packages/timo-design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"typescript": "5.9.2"
},
"dependencies": {
"clsx": "^2.1.1",
"react": "^19.2.0",
"react-dom": "^19.2.0"
"react-dom": "^19.2.0",
"tailwind-merge": "^3.6.0"
}
}
4 changes: 4 additions & 0 deletions packages/timo-design-system/src/lib/cn.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";

export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

구현은 표준 패턴으로 깔끔합니다. 다만 네이밍 컨벤션과 충돌이 있습니다.

twMerge(clsx(inputs)) 구현 자체는 정석적이고, clsx가 배열 인자를 그대로 받으므로 ...inputsclsx(inputs) 전달도 정상 동작합니다 👍

코드 스타일 컨벤션상 함수명은 get/create/check/convert/filter 접두사 사용과 줄임말 지양을 요구합니다. cnclsx/tailwind-merge 생태계의 사실상 표준 명칭이라 의도된 예외라면 그대로 두되, 컨벤션 우선이라면 convertClassNames 같은 명칭 또는 ESLint 예외 처리를 권장합니다. (As per coding guidelines: "함수 접두사: get/create/check/convert/filter", "줄임말 지양, 의미 있는 명칭 사용")

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/timo-design-system/src/lib/cn.ts` at line 4, The helper name `cn`
conflicts with the naming convention that prefers descriptive prefixes like
`get`, `create`, `check`, `convert`, or `filter` and avoids abbreviations.
Update the exported function in `cn.ts` to a more explicit name such as
`convertClassNames`, and adjust any imports/usages accordingly; if `cn` must
remain as the ecosystem-standard alias, add the appropriate lint/convention
exception near the `cn` export so the intent is explicit.

Source: Path instructions

2 changes: 1 addition & 1 deletion packages/timo-design-system/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {};
export { cn } from "./cn";
79 changes: 79 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading