Skip to content

Commit 78d3aa8

Browse files
authored
Merge pull request #12 from ackzell/#8-unocss-shadcn-vue
#8 unocss shadcn vue
2 parents 678b73a + 19df52e commit 78d3aa8

35 files changed

+1530
-268
lines changed

components.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://shadcn-vue.com/schema.json",
3+
"style": "new-york",
4+
"typescript": true,
5+
"tailwind": {
6+
"config": "tailwind.config.js",
7+
"css": "src/styles/globals.css",
8+
"baseColor": "neutral",
9+
"cssVariables": true,
10+
"prefix": ""
11+
},
12+
"aliases": {
13+
"components": "@/components",
14+
"composables": "@/composables",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib"
18+
},
19+
"iconLibrary": "lucide"
20+
}

eslint.config.ts

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default antfu({
1616
],
1717
}, {
1818
// Additional config for more specific rules
19-
files: ['**/*.vue', '**/*.ts', '**/*.tsx', '**/*.js'],
19+
files: ['**/*.ts', '**/*.vue', '**/*.tsx', '**/*.js'],
2020
rules: {
2121
// TypeScript unused vars with underscore ignore pattern
2222
'@typescript-eslint/no-unused-vars': [
@@ -30,10 +30,10 @@ export default antfu({
3030
// Vue template formatting
3131
'vue/max-attributes-per-line': [
3232
'warn', // Use 'warn' instead of 'error' for less strict enforcement
33-
// {
34-
// singleline: 3,
35-
// multiline: 2,
36-
// },
33+
{
34+
singleline: 4,
35+
multiline: 4,
36+
},
3737
],
3838
'vue/first-attribute-linebreak': ['warn', {
3939
singleline: 'ignore',
@@ -47,5 +47,44 @@ export default antfu({
4747
'vue/custom-event-name-casing': ['error', 'kebab-case'],
4848
'node/prefer-global/process': ['warn'],
4949
'no-console': ['warn'],
50+
51+
'perfectionist/sort-imports': [
52+
'error',
53+
{
54+
type: 'line-length',
55+
order: 'desc',
56+
groups: [
57+
'side-effect', // CSS imports first
58+
'builtin',
59+
'external',
60+
'internal-type',
61+
'internal',
62+
['parent-type', 'sibling-type', 'index-type'],
63+
['parent', 'sibling', 'index'],
64+
'object',
65+
'unknown',
66+
],
67+
},
68+
],
69+
70+
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
71+
72+
'style/object-curly-newline': ['error', {
73+
ImportDeclaration: {
74+
multiline: true,
75+
minProperties: 3,
76+
},
77+
78+
}],
79+
},
80+
}, {
81+
files: ['**/*.vue'],
82+
rules: {
83+
// ... your other rules
84+
85+
// Catch undefined components
86+
'vue/no-undef-components': ['error', {
87+
ignorePatterns: ['router-link', 'router-view'], // Ignore global components
88+
}],
5089
},
5190
});

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<title>Vue live playground</title>
88

99
<script>
10-
const savedPreferDark = localStorage.getItem(
11-
'vue-sfc-playground-prefer-dark',
10+
const savedTheme = localStorage.getItem(
11+
'yehyecoa-vue-theme',
1212
)
1313
if (
14-
savedPreferDark === 'true' ||
15-
(!savedPreferDark &&
14+
savedTheme === 'dark' ||
15+
(!savedTheme &&
1616
window.matchMedia('(prefers-color-scheme: dark)').matches)
1717
) {
1818
document.documentElement.classList.add('dark')

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,19 @@
2222
"serve": "node dist/server.js"
2323
},
2424
"dependencies": {
25+
"@iconify-json/carbon": "^1.2.13",
26+
"@iconify-json/mynaui": "^1.2.16",
27+
"@unocss/reset": "^66.4.2",
2528
"@vue/repl": "^4.6.3",
2629
"@vueuse/core": "^13.6.0",
30+
"class-variance-authority": "^0.7.1",
31+
"clsx": "^2.1.1",
32+
"lucide-vue-next": "^0.541.0",
33+
"reka-ui": "^2.4.1",
34+
"tailwind-merge": "^3.3.1",
35+
"tailwindcss": "^4.1.12",
36+
"tw-animate-css": "^1.3.7",
37+
"vaul-vue": "^0.4.1",
2738
"vue": "^3.5.18"
2839
},
2940
"devDependencies": {
@@ -36,10 +47,13 @@
3647
"@vue/tsconfig": "^0.7.0",
3748
"eslint": "^9.31.0",
3849
"eslint-plugin-vue": "~10.3.0",
50+
"floating-vue": "^5.2.2",
3951
"jiti": "^2.4.2",
4052
"npm-run-all2": "^8.0.4",
4153
"prettier": "3.6.2",
4254
"typescript": "~5.8.0",
55+
"unocss": "^66.4.2",
56+
"unocss-preset-shadcn": "^0.5.0",
4357
"vite": "^7.0.6",
4458
"vite-plugin-vue-devtools": "^8.0.0",
4559
"vue-tsc": "^3.0.4"

0 commit comments

Comments
 (0)