mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
upgrade to biome v2
This commit is contained in:
@@ -49,7 +49,7 @@ export const dependencyVersionMap = {
|
||||
|
||||
"@tauri-apps/cli": "^2.4.0",
|
||||
|
||||
"@biomejs/biome": "1.9.4",
|
||||
"@biomejs/biome": "^2.0.0",
|
||||
|
||||
husky: "^9.1.7",
|
||||
"lint-staged": "^15.5.0",
|
||||
|
||||
@@ -7,8 +7,8 @@ import pc from "picocolors";
|
||||
import type { ProjectConfig } from "../../types";
|
||||
import { commandExists } from "../../utils/command-exists";
|
||||
import {
|
||||
type EnvVariable,
|
||||
addEnvVariablesToFile,
|
||||
type EnvVariable,
|
||||
} from "../project-generation/env-setup";
|
||||
|
||||
type MongoDBConfig = {
|
||||
|
||||
@@ -7,8 +7,8 @@ import pc from "picocolors";
|
||||
import type { PackageManager, ProjectConfig } from "../../types";
|
||||
import { getPackageExecutionCommand } from "../../utils/get-package-execution-command";
|
||||
import {
|
||||
type EnvVariable,
|
||||
addEnvVariablesToFile,
|
||||
type EnvVariable,
|
||||
} from "../project-generation/env-setup";
|
||||
|
||||
type NeonConfig = {
|
||||
|
||||
@@ -8,8 +8,8 @@ import type { PackageManager } from "../../types";
|
||||
import { addPackageDependency } from "../../utils/add-package-deps";
|
||||
import { getPackageExecutionCommand } from "../../utils/get-package-execution-command";
|
||||
import {
|
||||
type EnvVariable,
|
||||
addEnvVariablesToFile,
|
||||
type EnvVariable,
|
||||
} from "../project-generation/env-setup";
|
||||
|
||||
type PrismaConfig = {
|
||||
|
||||
@@ -7,8 +7,8 @@ import pc from "picocolors";
|
||||
import type { PackageManager, ProjectConfig } from "../../types";
|
||||
import { getPackageExecutionCommand } from "../../utils/get-package-execution-command";
|
||||
import {
|
||||
type EnvVariable,
|
||||
addEnvVariablesToFile,
|
||||
type EnvVariable,
|
||||
} from "../project-generation/env-setup";
|
||||
|
||||
async function writeSupabaseEnvFile(
|
||||
|
||||
@@ -15,8 +15,8 @@ import pc from "picocolors";
|
||||
import type { ProjectConfig } from "../../types";
|
||||
import { commandExists } from "../../utils/command-exists";
|
||||
import {
|
||||
type EnvVariable,
|
||||
addEnvVariablesToFile,
|
||||
type EnvVariable,
|
||||
} from "../project-generation/env-setup";
|
||||
|
||||
type TursoConfig = {
|
||||
|
||||
@@ -2,8 +2,8 @@ import path from "node:path";
|
||||
import consola from "consola";
|
||||
import fs from "fs-extra";
|
||||
import type {
|
||||
API,
|
||||
Addons,
|
||||
API,
|
||||
Database,
|
||||
Frontend,
|
||||
ORM,
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import { consola } from "consola";
|
||||
import pc from "picocolors";
|
||||
import type { Database, ORM, Runtime } from "../../types";
|
||||
import type { Database, ORM, ProjectConfig, Runtime } from "../../types";
|
||||
import { getPackageExecutionCommand } from "../../utils/get-package-execution-command";
|
||||
|
||||
import type { ProjectConfig } from "../../types";
|
||||
|
||||
export function displayPostInstallInstructions(
|
||||
config: ProjectConfig & { depsInstalled: boolean },
|
||||
) {
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import path from "node:path";
|
||||
import fs from "fs-extra";
|
||||
import type { Frontend } from "../../types";
|
||||
import type { Frontend, ProjectConfig } from "../../types";
|
||||
import { addPackageDependency } from "../../utils/add-package-deps";
|
||||
import { setupStarlight } from "./starlight-setup";
|
||||
import { setupTauri } from "./tauri-setup";
|
||||
|
||||
import type { ProjectConfig } from "../../types";
|
||||
|
||||
export async function setupAddons(config: ProjectConfig) {
|
||||
const { addons, frontend, projectDir } = config;
|
||||
const hasReactWebFrontend =
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import path from "node:path";
|
||||
import type { AvailableDependencies } from "../../constants";
|
||||
import { addPackageDependency } from "../../utils/add-package-deps";
|
||||
|
||||
import type { ProjectConfig } from "../../types";
|
||||
import { addPackageDependency } from "../../utils/add-package-deps";
|
||||
|
||||
export async function setupBackendDependencies(
|
||||
config: ProjectConfig,
|
||||
|
||||
@@ -3,16 +3,14 @@ import { spinner } from "@clack/prompts";
|
||||
import consola from "consola";
|
||||
import fs from "fs-extra";
|
||||
import pc from "picocolors";
|
||||
import type { ProjectConfig } from "../../types";
|
||||
import { addPackageDependency } from "../../utils/add-package-deps";
|
||||
import { setupMongoDBAtlas } from "../database-providers/mongodb-atlas-setup";
|
||||
import { setupNeonPostgres } from "../database-providers/neon-setup";
|
||||
import { setupPrismaPostgres } from "../database-providers/prisma-postgres-setup";
|
||||
import { setupSupabase } from "../database-providers/supabase-setup";
|
||||
import { setupTurso } from "../database-providers/turso-setup";
|
||||
|
||||
import { setupNeonPostgres } from "../database-providers/neon-setup";
|
||||
|
||||
import type { ProjectConfig } from "../../types";
|
||||
|
||||
export async function setupDatabase(config: ProjectConfig): Promise<void> {
|
||||
const { database, orm, dbSetup, backend, projectDir } = config;
|
||||
|
||||
|
||||
@@ -4,11 +4,10 @@ import { consola } from "consola";
|
||||
import { execa } from "execa";
|
||||
import fs from "fs-extra";
|
||||
import pc from "picocolors";
|
||||
import type { ProjectConfig } from "../../types";
|
||||
import { addPackageDependency } from "../../utils/add-package-deps";
|
||||
import { getPackageExecutionCommand } from "../../utils/get-package-execution-command";
|
||||
|
||||
import type { ProjectConfig } from "../../types";
|
||||
|
||||
export async function setupTauri(config: ProjectConfig): Promise<void> {
|
||||
const { packageManager, frontend, projectDir } = config;
|
||||
const s = spinner();
|
||||
|
||||
@@ -18,8 +18,8 @@ import { gatherConfig } from "./prompts/config-prompts";
|
||||
import { getProjectName } from "./prompts/project-name";
|
||||
import type { CreateInput, ProjectConfig } from "./types";
|
||||
import {
|
||||
APISchema,
|
||||
AddonsSchema,
|
||||
APISchema,
|
||||
BackendSchema,
|
||||
DatabaseSchema,
|
||||
DatabaseSetupSchema,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { cancel, group } from "@clack/prompts";
|
||||
import pc from "picocolors";
|
||||
import type {
|
||||
API,
|
||||
Addons,
|
||||
API,
|
||||
Backend,
|
||||
Database,
|
||||
DatabaseSetup,
|
||||
|
||||
@@ -20,6 +20,7 @@ export async function trackProjectCreation(
|
||||
try {
|
||||
const sessionId = `cli_${crypto.randomUUID().replace(/-/g, "")}`;
|
||||
|
||||
// biome-ignore lint/correctness/noUnusedVariables: `projectName`, `projectDir`, and `relativePath` are not used in the event properties
|
||||
const { projectName, projectDir, relativePath, ...safeConfig } = config;
|
||||
|
||||
posthog.capture({
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import path from "node:path";
|
||||
import { consola } from "consola";
|
||||
import {
|
||||
type API,
|
||||
type Addons,
|
||||
type API,
|
||||
type Backend,
|
||||
type CLIInput,
|
||||
type Database,
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
|
||||
"vcs": {
|
||||
"enabled": false,
|
||||
"clientKind": "git",
|
||||
"useIgnoreFile": false
|
||||
},
|
||||
"files": {
|
||||
"ignoreUnknown": false,
|
||||
"ignore": [
|
||||
".next",
|
||||
"dist",
|
||||
".turbo",
|
||||
"dev-dist",
|
||||
".zed",
|
||||
".vscode",
|
||||
"routeTree.gen.ts",
|
||||
"src-tauri",
|
||||
".nuxt"
|
||||
]
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
"indentStyle": "tab"
|
||||
},
|
||||
"organizeImports": {
|
||||
"enabled": true
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"correctness": {
|
||||
"useExhaustiveDependencies": "info"
|
||||
},
|
||||
"nursery": {
|
||||
"useSortedClasses": {
|
||||
"level": "warn",
|
||||
"fix": "safe",
|
||||
"options": {
|
||||
"functions": ["clsx", "cva", "cn"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"quoteStyle": "double"
|
||||
}
|
||||
}
|
||||
}
|
||||
83
apps/cli/templates/addons/biome/biome.json.hbs
Normal file
83
apps/cli/templates/addons/biome/biome.json.hbs
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
|
||||
"vcs": {
|
||||
"enabled": false,
|
||||
"clientKind": "git",
|
||||
"useIgnoreFile": false
|
||||
},
|
||||
"files": {
|
||||
"ignoreUnknown": false,
|
||||
"includes": [
|
||||
"**",
|
||||
"!**/.next",
|
||||
"!**/dist",
|
||||
"!**/.turbo",
|
||||
"!**/dev-dist",
|
||||
"!**/.zed",
|
||||
"!**/.vscode",
|
||||
"!**/routeTree.gen.ts",
|
||||
"!**/src-tauri",
|
||||
"!**/.nuxt"
|
||||
]
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
"indentStyle": "tab"
|
||||
},
|
||||
"assist": { "actions": { "source": { "organizeImports": "on" } } },
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"correctness": {
|
||||
"useExhaustiveDependencies": "info"
|
||||
},
|
||||
"nursery": {
|
||||
"useSortedClasses": {
|
||||
"level": "warn",
|
||||
"fix": "safe",
|
||||
"options": {
|
||||
"functions": ["clsx", "cva", "cn"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"noParameterAssign": "error",
|
||||
"useAsConstAssertion": "error",
|
||||
"useDefaultParameterLast": "error",
|
||||
"useEnumInitializers": "error",
|
||||
"useSelfClosingElements": "error",
|
||||
"useSingleVarDeclarator": "error",
|
||||
"noUnusedTemplateLiteral": "error",
|
||||
"useNumberNamespace": "error",
|
||||
"noInferrableTypes": "error",
|
||||
"noUselessElse": "error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"quoteStyle": "double"
|
||||
}
|
||||
}
|
||||
{{#if (or (eq frontend "svelte") (eq frontend "nuxt"))}}
|
||||
,
|
||||
"overrides": [
|
||||
{
|
||||
"includes": ["**/*.svelte", "**/*.vue"],
|
||||
"linter": {
|
||||
"rules": {
|
||||
"style": {
|
||||
"useConst": "off",
|
||||
"useImportType": "off"
|
||||
},
|
||||
"correctness": {
|
||||
"noUnusedVariables": "off",
|
||||
"noUnusedImports": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
{{/if}}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ export default function UserMenu() {
|
||||
<div class="absolute right-0 mt-2 w-56 rounded p-1 shadow-sm">
|
||||
<div class="px-4 text-sm">{session().data?.user.email}</div>
|
||||
<button
|
||||
type="button"
|
||||
class="mt-1 w-full border rounded px-4 text-center text-sm"
|
||||
onClick={() => {
|
||||
setIsMenuOpen(false);
|
||||
@@ -1,11 +1,11 @@
|
||||
"use client";
|
||||
|
||||
import { motion } from "motion/react";
|
||||
import Image from "next/image";
|
||||
import { useTheme } from "next-themes";
|
||||
import { useEffect, useState } from "react";
|
||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { motion } from "motion/react";
|
||||
import { useTheme } from "next-themes";
|
||||
import Image from "next/image";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
type TechOption = {
|
||||
id: string;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"use client";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Check, ClipboardCopy } from "lucide-react";
|
||||
import { AnimatePresence, motion } from "motion/react";
|
||||
import { useState } from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import PackageIcon from "./icons";
|
||||
|
||||
const CodeContainer = () => {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
"use client";
|
||||
import { ThemeToggle } from "@/components/theme-toggle";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Github, Maximize2, Menu, X } from "lucide-react";
|
||||
import { AnimatePresence, motion } from "motion/react";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useEffect, useState } from "react";
|
||||
import { ThemeToggle } from "@/components/theme-toggle";
|
||||
import { cn } from "@/lib/utils";
|
||||
import PackageIcon from "./icons";
|
||||
|
||||
export default function Navbar() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import { useEffect, useState } from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const NpmPackage = () => {
|
||||
const [version, setVersion] = useState("");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Sponsor } from "@/lib/types";
|
||||
import { Github, Globe, Heart, Terminal } from "lucide-react";
|
||||
import Image from "next/image";
|
||||
import { useEffect, useState } from "react";
|
||||
import type { Sponsor } from "@/lib/types";
|
||||
|
||||
export default function SponsorsSection() {
|
||||
const [sponsors, setSponsors] = useState<Sponsor[]>([]);
|
||||
|
||||
@@ -1,23 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { ThemeToggle } from "@/components/theme-toggle";
|
||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import {
|
||||
DEFAULT_STACK,
|
||||
PRESET_TEMPLATES,
|
||||
type StackState,
|
||||
TECH_OPTIONS,
|
||||
isStackDefault,
|
||||
} from "@/lib/constant";
|
||||
import { stackParsers, stackQueryStatesOptions } from "@/lib/stack-url-state";
|
||||
import { cn } from "@/lib/utils";
|
||||
import discordLogo from "@/public/icon/discord.svg";
|
||||
import {
|
||||
Check,
|
||||
ClipboardCopy,
|
||||
@@ -31,13 +13,31 @@ import {
|
||||
Terminal,
|
||||
} from "lucide-react";
|
||||
import { motion } from "motion/react";
|
||||
import { useTheme } from "next-themes";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useTheme } from "next-themes";
|
||||
import { useQueryStates } from "nuqs";
|
||||
import type React from "react";
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import { toast } from "sonner";
|
||||
import { ThemeToggle } from "@/components/theme-toggle";
|
||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import {
|
||||
DEFAULT_STACK,
|
||||
isStackDefault,
|
||||
PRESET_TEMPLATES,
|
||||
type StackState,
|
||||
TECH_OPTIONS,
|
||||
} from "@/lib/constant";
|
||||
import { stackParsers, stackQueryStatesOptions } from "@/lib/stack-url-state";
|
||||
import { cn } from "@/lib/utils";
|
||||
import discordLogo from "@/public/icon/discord.svg";
|
||||
|
||||
const validateProjectName = (name: string): string | undefined => {
|
||||
const INVALID_CHARS = ["<", ">", ":", '"', "|", "?", "*"];
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
"use client";
|
||||
import {
|
||||
type ChartConfig,
|
||||
ChartContainer,
|
||||
ChartLegend,
|
||||
ChartLegendContent,
|
||||
ChartTooltip,
|
||||
ChartTooltipContent,
|
||||
} from "@/components/ui/chart";
|
||||
import discordLogo from "@/public/icon/discord.svg";
|
||||
import { format, parseISO } from "date-fns";
|
||||
import { Cpu, Download, Terminal, TrendingUp, Users } from "lucide-react";
|
||||
import Image from "next/image";
|
||||
@@ -25,6 +16,15 @@ import {
|
||||
XAxis,
|
||||
YAxis,
|
||||
} from "recharts";
|
||||
import {
|
||||
type ChartConfig,
|
||||
ChartContainer,
|
||||
ChartLegend,
|
||||
ChartLegendContent,
|
||||
ChartTooltip,
|
||||
ChartTooltipContent,
|
||||
} from "@/components/ui/chart";
|
||||
import discordLogo from "@/public/icon/discord.svg";
|
||||
import Navbar from "../_components/navbar";
|
||||
|
||||
interface AnalyticsData {
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
"use client";
|
||||
import { TECH_OPTIONS } from "@/lib/constant";
|
||||
import { cn } from "@/lib/utils";
|
||||
import discordLogo from "@/public/icon/discord.svg";
|
||||
import {
|
||||
Check,
|
||||
ChevronRight,
|
||||
@@ -13,6 +10,9 @@ import {
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useEffect, useState } from "react";
|
||||
import { TECH_OPTIONS } from "@/lib/constant";
|
||||
import { cn } from "@/lib/utils";
|
||||
import discordLogo from "@/public/icon/discord.svg";
|
||||
import Footer from "./_components/footer";
|
||||
import PackageIcon from "./_components/icons";
|
||||
import Navbar from "./_components/navbar";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { source } from "@/lib/source";
|
||||
import { createFromSource } from "fumadocs-core/search/server";
|
||||
import { source } from "@/lib/source";
|
||||
|
||||
export const revalidate = false;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { source } from "@/lib/source";
|
||||
import Features from "components/features";
|
||||
import defaultMdxComponents from "fumadocs-ui/mdx";
|
||||
import {
|
||||
@@ -8,6 +7,7 @@ import {
|
||||
DocsTitle,
|
||||
} from "fumadocs-ui/page";
|
||||
import { notFound } from "next/navigation";
|
||||
import { source } from "@/lib/source";
|
||||
|
||||
export default async function Page(props: {
|
||||
params: Promise<{ slug?: string[] }>;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { baseOptions } from "@/app/layout.config";
|
||||
import { source } from "@/lib/source";
|
||||
import { DocsLayout } from "fumadocs-ui/layouts/docs";
|
||||
import type { ReactNode } from "react";
|
||||
import { baseOptions } from "@/app/layout.config";
|
||||
import { source } from "@/lib/source";
|
||||
|
||||
export default function Layout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
export const dynamic = "force-static";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
|
||||
import { RootProvider } from "fumadocs-ui/provider";
|
||||
import type { Metadata } from "next";
|
||||
import { Poppins } from "next/font/google";
|
||||
import { NuqsAdapter } from "nuqs/adapters/next/app";
|
||||
import type { ReactNode } from "react";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
import "./global.css";
|
||||
|
||||
const poppins = Poppins({
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export const dynamic = "force-static";
|
||||
|
||||
import type { MetadataRoute } from "next";
|
||||
|
||||
export default function manifest(): MetadataRoute.Manifest {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export const dynamic = "force-static";
|
||||
|
||||
import type { MetadataRoute } from "next";
|
||||
|
||||
export default function robots(): MetadataRoute.Robots {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export const dynamic = "force-static";
|
||||
|
||||
import type { MetadataRoute } from "next";
|
||||
|
||||
export default function sitemap(): MetadataRoute.Sitemap {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
"use client";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
||||
import { Moon, Sun } from "lucide-react";
|
||||
import { useTheme } from "next-themes";
|
||||
import * as React from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export function ThemeToggle({ className }: { className?: string }) {
|
||||
const { setTheme, resolvedTheme } = useTheme();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type VariantProps, cva } from "class-variance-authority";
|
||||
import { cva, type VariantProps } from "class-variance-authority";
|
||||
import { Slot as SlotPrimitive } from "radix-ui";
|
||||
import type * as React from "react";
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
|
||||
|
||||
return (
|
||||
<style
|
||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: <explanation>
|
||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: This is safe as we control the content.
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: Object.entries(THEMES)
|
||||
.map(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { docs } from "@/.source";
|
||||
import { loader } from "fumadocs-core/source";
|
||||
import { docs } from "@/.source";
|
||||
|
||||
export const source = loader({
|
||||
baseUrl: "/docs",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { DEFAULT_STACK, type StackState, TECH_OPTIONS } from "@/lib/constant";
|
||||
import {
|
||||
type UrlKeys,
|
||||
parseAsArrayOf,
|
||||
parseAsString,
|
||||
parseAsStringEnum,
|
||||
type UrlKeys,
|
||||
} from "nuqs";
|
||||
import { DEFAULT_STACK, type StackState, TECH_OPTIONS } from "@/lib/constant";
|
||||
|
||||
const getValidIds = (category: keyof typeof TECH_OPTIONS): string[] => {
|
||||
return TECH_OPTIONS[category]?.map((opt) => opt.id) ?? [];
|
||||
|
||||
Reference in New Issue
Block a user