Skip to content

Commit

Permalink
fixed linting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshay committed Jan 23, 2024
1 parent 96e249c commit 0e929c7
Show file tree
Hide file tree
Showing 4 changed files with 3,390 additions and 6,609 deletions.
5 changes: 4 additions & 1 deletion packages/ui/.scripts/update-components.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ await writeFile(
`export const styles = ${JSON.stringify(styles, undefined, 2)};`,
)

// eslint-disable-next-line fp/no-loops
for (const { name } of styles) {
// eslint-disable-next-line no-await-in-loop
await mkdir(`src-gen/components/${name}/ui`, {

Check warning on line 42 in packages/ui/.scripts/update-components.mjs

View workflow job for this annotation

GitHub Actions / verify

Found mkdir from package "node:fs/promises" with non literal argument at index 0

Check warning on line 42 in packages/ui/.scripts/update-components.mjs

View workflow job for this annotation

GitHub Actions / release

Found mkdir from package "node:fs/promises" with non literal argument at index 0
force: true,
recursive: true,
})

// eslint-disable-next-line no-await-in-loop
await cp(
`../../ui/apps/www/registry/${name}/ui`,
`src-gen/components/${name}/ui`,
Expand All @@ -60,7 +63,7 @@ await Promise.all(
const contentsBuffer = await readFile(path)

Check warning on line 63 in packages/ui/.scripts/update-components.mjs

View workflow job for this annotation

GitHub Actions / verify

Found readFile from package "node:fs/promises" with non literal argument at index 0

Check warning on line 63 in packages/ui/.scripts/update-components.mjs

View workflow job for this annotation

GitHub Actions / release

Found readFile from package "node:fs/promises" with non literal argument at index 0
const contents = contentsBuffer
.toString("utf8")
// eslint-disable-next-line unicorn/prefer-string-replace-all
// eslint-disable-next-line unicorn/prefer-string-replace-all,prefer-named-capture-group,regexp/no-unused-capturing-group
.replace(/@\/registry\/(default|new-york)\/ui/gu, ".")

// BUG: Add the React import if it's missing. This is a bug in ui.shadcn.com.
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/react-dom": "^18.2.7",
"eslint": "^8.46.0",
"globby": "^13.2.2",
"lucide-react": "^0.311.0",
"lucide-react": "^0.314.0",
"prettier": "^3.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
Expand Down Expand Up @@ -92,13 +92,13 @@
"react-hook-form": "^7.45.2",
"react-resizable-panels": "^0.0.55",
"sonner": "^1.3.1",
"tailwind-merge": "^2.2.0",
"tailwind-merge": "^2.2.1",
"undefined": "^0.1.0",
"vaul": "^0.2.3"
},
"peerDependencies": {
"@radix-ui/react-icons": "^1.3.0",
"lucide-react": "^0.311.0",
"lucide-react": "^0.314.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"tailwindcss": "^3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
},
"noUncheckedIndexedAccess": true
},
"include": ["src-gen", ".scripts/*", "eslint.config.js", ".prettierrc.cjs"]
"include": ["src-gen", ".scripts/**/*", "eslint.config.js", ".prettierrc.cjs"]
}
Loading

0 comments on commit 0e929c7

Please sign in to comment.