Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
"eslint-config-next": "15.5.4",
"svg-sprite-loader": "^6.0.11",
"tailwindcss": "4.1.14",
"typescript": "^5"
"typescript": "^5",
"tailwind-merge": "^3.3.1",
"class-variance-authority": "^0.7.1",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Move runtime utilities to dependencies.

tailwind-merge and clsx are used at runtime by the cn() utility in src/shared/lib/utils.ts. They should be in dependencies, not devDependencies, to ensure they're installed in production environments.

Apply this diff to move them to dependencies:

   "dependencies": {
     "axios": "^1.12.2",
     "clsx": "^2.1.1",
     "next": "15.5.4",
     "react": "19.1.0",
     "react-dom": "19.1.0",
     "react-hook-form": "^7.64.0",
-    "svgo": "^4.0.0"
+    "svgo": "^4.0.0",
+    "tailwind-merge": "^3.3.1"
   },
   "devDependencies": {
     "@eslint/eslintrc": "^3",
     "@tailwindcss/postcss": "^4",
     "@types/node": "^20",
     "@types/react": "^19",
     "@types/react-dom": "^19",
     "eslint": "^9",
     "eslint-config-next": "15.5.4",
     "svg-sprite-loader": "^6.0.11",
     "tailwindcss": "4.1.14",
     "typescript": "^5",
-    "tailwind-merge": "^3.3.1",
-    "class-variance-authority": "^0.7.1",
-    "clsx": "^2.1.1"
+    "class-variance-authority": "^0.7.1"
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"tailwind-merge": "^3.3.1",
"class-variance-authority": "^0.7.1",
"dependencies": {
"axios": "^1.12.2",
"clsx": "^2.1.1",
"next": "15.5.4",
"react": "19.1.0",
"react-dom": "19.1.0",
"react-hook-form": "^7.64.0",
"svgo": "^4.0.0",
"tailwind-merge": "^3.3.1"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "15.5.4",
"svg-sprite-loader": "^6.0.11",
"tailwindcss": "4.1.14",
"typescript": "^5",
"class-variance-authority": "^0.7.1"
}
🤖 Prompt for AI Agents
In package.json around lines 34-35, tailwind-merge (and clsx, used by cn() in
src/shared/lib/utils.ts) are currently in devDependencies; move them to
dependencies by removing their entries from devDependencies and adding them
under the dependencies object with the same versions (e.g., "tailwind-merge":
"^3.3.1", "clsx": "<current-version>"). After editing package.json, run your
package manager to update lockfile (npm/yarn/pnpm) so production installs
include these packages.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

❓ Verification inconclusive

Verify usage of class-variance-authority.

class-variance-authority is added to devDependencies but is not imported in any of the provided files. The PR description mentions CVA for component variants, but no usage is demonstrated yet.

Run the following script to check if CVA is used elsewhere in the codebase:


🏁 Script executed:

#!/bin/bash
# Search for class-variance-authority imports or cva usage
rg -n --type=ts --type=tsx -C2 "from ['\"]class-variance-authority['\"]|import.*cva"

Length of output: 27


🏁 Script executed:

#!/bin/bash
# Search for class-variance-authority imports or cva usage in .ts and .tsx files
rg -n -C2 "from ['\"]class-variance-authority['\"]|import.*cva" -g "*.ts" -g "*.tsx"
rg -n -C2 "cva\(" -g "*.ts" -g "*.tsx"

Length of output: 0


Remove or consume class-variance-authority: it’s listed in devDependencies but no imports or cva() calls exist—either add the CVA usage for your component variants or remove this dependency.

🤖 Prompt for AI Agents
In package.json around line 35, "class-variance-authority" is declared but not
used; either remove it from devDependencies or consume it: to remove, delete the
line and run npm/yarn to update lockfile; to consume, add a cva usage in the
relevant component(s) by importing cva from 'class-variance-authority', define
your variant styles with cva(...), and replace existing conditional class logic
with the cva helper (or move the package to dependencies if it’s needed at
runtime).

"clsx": "^2.1.1"
}
}
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

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

1 change: 1 addition & 0 deletions src/shared/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './utils';
73 changes: 73 additions & 0 deletions src/shared/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import { type ClassValue, clsx } from 'clsx';
import { extendTailwindMerge } from 'tailwind-merge';

const twMerge = extendTailwindMerge({
extend: {
theme: {
text: [
'.text-display-lg',
'.text-display-md',
'.text-display-sm',
'.text-headline-lg',
'.text-headline-md',
'.text-headline-sm',
'.text-title-lg',
'.text-title-md',
'.text-title-sm',
'.text-label-lg',
'.text-label-md',
'.text-label-sm',
'.text-body-lg',
'.text-body-md',
'.text-body-sm',
'.text-display-serif',
'.text-headline-lg-serif',
'.text-headline-md-serif',
'.text-headline-sm-serif',
'.text-label-serif',
],

color: [
'mint-50',
'mint-100',
'mint-200',
'mint-300',
'mint-400',
'mint-500',
'mint-600',
'mint-700',
'mint-800',
'mint-900',
'pink-50',
'pink-100',
'pink-200',
'pink-300',
'pink-400',
'pink-500',
'pink-600',
'pink-700',
'pink-800',
'pink-900',
'gray-50',
'gray-100',
'gray-200',
'gray-300',
'gray-400',
'gray-500',
'gray-600',
'gray-700',
'gray-800',
'gray-900',
'blue-400',
'red-300',
'red-400',
'background',
'foreground',
],
},
},
});

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