From 920fc30a1272cc5c920414172f360ac50066055e Mon Sep 17 00:00:00 2001 From: TheRealToxicDev Date: Tue, 3 Feb 2026 17:55:06 -0700 Subject: [PATCH] Add GitHub workflows and fix import organization --- package.json | 3 +- src/components/MarkdownRenderer.tsx | 4 +-- src/components/landing/Header.tsx | 2 +- src/components/landing/Hero.tsx | 2 +- src/components/landing/QuickStart.tsx | 3 +- src/components/layouts/DocsLayout.tsx | 6 ++-- src/lib/useVersion.ts | 2 +- src/routes/docs/$.tsx | 42 ++++++++++++--------------- src/routes/features.tsx | 2 +- 9 files changed, 30 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index 0621fae..54a1a64 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "test": "vitest run", "format": "biome format", "format:fix": "biome format --write", - "format:check": "biome format --check", + "format:check": "biome check", + "format:apply": "biome check --fix", "lint": "biome lint", "check": "biome check", "deploy": "npm run build && wrangler deploy" diff --git a/src/components/MarkdownRenderer.tsx b/src/components/MarkdownRenderer.tsx index 6508e69..dec51cb 100644 --- a/src/components/MarkdownRenderer.tsx +++ b/src/components/MarkdownRenderer.tsx @@ -1,5 +1,5 @@ -import { Check, Copy, AlertTriangle, Info, Lightbulb } from "lucide-react"; -import { useState, useCallback } from "react"; +import { AlertTriangle, Check, Copy, Info, Lightbulb } from "lucide-react"; +import { useCallback, useState } from "react"; import ReactMarkdown from "react-markdown"; import rehypeHighlight from "rehype-highlight"; import rehypeRaw from "rehype-raw"; diff --git a/src/components/landing/Header.tsx b/src/components/landing/Header.tsx index b2d295b..96da1a6 100644 --- a/src/components/landing/Header.tsx +++ b/src/components/landing/Header.tsx @@ -1,8 +1,8 @@ import { Github, Menu, Twitter, X } from "lucide-react"; import { useState } from "react"; +import { useVersion } from "../../lib/useVersion"; import { LogoIcon } from "../Logo"; import { Button } from "../ui/Button"; -import { useVersion } from "../../lib/useVersion"; export function Header() { const [mobileMenuOpen, setMobileMenuOpen] = useState(false); diff --git a/src/components/landing/Hero.tsx b/src/components/landing/Hero.tsx index f13a98b..782a053 100644 --- a/src/components/landing/Hero.tsx +++ b/src/components/landing/Hero.tsx @@ -1,6 +1,6 @@ import { AlertTriangle, ChevronRight, Github, Terminal } from "lucide-react"; -import { Button } from "../ui/Button"; import { useVersion } from "../../lib/useVersion"; +import { Button } from "../ui/Button"; export function Hero() { const { version } = useVersion(); diff --git a/src/components/landing/QuickStart.tsx b/src/components/landing/QuickStart.tsx index de29d25..5de5632 100644 --- a/src/components/landing/QuickStart.tsx +++ b/src/components/landing/QuickStart.tsx @@ -1,7 +1,6 @@ import * as Tabs from "@radix-ui/react-tabs"; import { Check, Copy, GitBranch, Globe, Terminal } from "lucide-react"; -import { useId } from "react"; -import { useState } from "react"; +import { useId, useState } from "react"; type TokenType = "command" | "flag" | "path" | "comment" | "string" | "text"; diff --git a/src/components/layouts/DocsLayout.tsx b/src/components/layouts/DocsLayout.tsx index c54dfea..6ff1f4d 100644 --- a/src/components/layouts/DocsLayout.tsx +++ b/src/components/layouts/DocsLayout.tsx @@ -1,8 +1,8 @@ -import { ChevronDown, Home, Menu, X, List, Search } from "lucide-react"; -import { useState, useEffect } from "react"; +import { ChevronDown, Home, List, Menu, Search, X } from "lucide-react"; +import { useEffect, useState } from "react"; +import { useVersion } from "../../lib/useVersion"; import { LogoIcon } from "../Logo"; import { Button } from "../ui/Button"; -import { useVersion } from "../../lib/useVersion"; interface LayoutProps { children: React.ReactNode; diff --git a/src/lib/useVersion.ts b/src/lib/useVersion.ts index 36e923f..87f5c55 100644 --- a/src/lib/useVersion.ts +++ b/src/lib/useVersion.ts @@ -1,4 +1,4 @@ -import { useState, useEffect } from "react"; +import { useEffect, useState } from "react"; interface VersionInfo { version: string; diff --git a/src/routes/docs/$.tsx b/src/routes/docs/$.tsx index 57fd79a..3243c9b 100644 --- a/src/routes/docs/$.tsx +++ b/src/routes/docs/$.tsx @@ -3,40 +3,34 @@ import { createFileRoute } from "@tanstack/react-router"; const SITE_URL = "https://noslop.tech"; const DOCS_IMAGE = `${SITE_URL}/og-docs.png`; +import aiConfigurationMd from "../../../docs/ai/configuration.md?raw"; +import aiExamplesMd from "../../../docs/ai/examples.md?raw"; +import aiIndexMd from "../../../docs/ai/index.md?raw"; +import analysisGitMd from "../../../docs/analysis/git.md?raw"; +import analysisIndexMd from "../../../docs/analysis/index.md?raw"; +import analysisRepositoryMd from "../../../docs/analysis/repository.md?raw"; +import analysisWebMd from "../../../docs/analysis/web.md?raw"; +import cliCommandsMdNew from "../../../docs/cli/commands.md?raw"; +import cliDetectionStrategiesMd from "../../../docs/cli/detection-strategies.md?raw"; +import cliIndexMd from "../../../docs/cli/index.md?raw"; +import communityContributingMd from "../../../docs/community/contributing.md?raw"; +import communityIndexMd from "../../../docs/community/index.md?raw"; +import communitySecurityMd from "../../../docs/community/security.md?raw"; +import gettingStartedConfigurationMd from "../../../docs/getting-started/configuration.md?raw"; // Import all markdown files statically for Cloudflare Workers compatibility // Getting Started section import gettingStartedIndexMd from "../../../docs/getting-started/index.md?raw"; import gettingStartedInstallationMd from "../../../docs/getting-started/installation.md?raw"; -import gettingStartedQuickStartMd from "../../../docs/getting-started/quick-start.md?raw"; import gettingStartedQuickReferenceMd from "../../../docs/getting-started/quick-reference.md?raw"; -import gettingStartedConfigurationMd from "../../../docs/getting-started/configuration.md?raw"; - -import cliIndexMd from "../../../docs/cli/index.md?raw"; -import cliCommandsMdNew from "../../../docs/cli/commands.md?raw"; -import cliDetectionStrategiesMd from "../../../docs/cli/detection-strategies.md?raw"; - -import analysisIndexMd from "../../../docs/analysis/index.md?raw"; -import analysisRepositoryMd from "../../../docs/analysis/repository.md?raw"; -import analysisGitMd from "../../../docs/analysis/git.md?raw"; -import analysisWebMd from "../../../docs/analysis/web.md?raw"; - -import aiIndexMd from "../../../docs/ai/index.md?raw"; -import aiConfigurationMd from "../../../docs/ai/configuration.md?raw"; -import aiExamplesMd from "../../../docs/ai/examples.md?raw"; - -import integrationsIndexMd from "../../../docs/integrations/index.md?raw"; +import gettingStartedQuickStartMd from "../../../docs/getting-started/quick-start.md?raw"; import integrationsAgentSkillsMd from "../../../docs/integrations/agent-skills.md?raw"; +import integrationsIndexMd from "../../../docs/integrations/index.md?raw"; import integrationsWebhooksMd from "../../../docs/integrations/webhooks.md?raw"; - -import referenceIndexMd from "../../../docs/reference/index.md?raw"; import referenceAdvancedConfigMd from "../../../docs/reference/advanced-configuration.md?raw"; import referenceBuildDevMd from "../../../docs/reference/build-development.md?raw"; -import referenceTroubleshootingMd from "../../../docs/reference/troubleshooting.md?raw"; import referenceDisclaimerMd from "../../../docs/reference/disclaimer.md?raw"; - -import communityIndexMd from "../../../docs/community/index.md?raw"; -import communityContributingMd from "../../../docs/community/contributing.md?raw"; -import communitySecurityMd from "../../../docs/community/security.md?raw"; +import referenceIndexMd from "../../../docs/reference/index.md?raw"; +import referenceTroubleshootingMd from "../../../docs/reference/troubleshooting.md?raw"; import { DocsLayout } from "../../components/layouts/DocsLayout"; import { MarkdownRenderer } from "../../components/MarkdownRenderer"; diff --git a/src/routes/features.tsx b/src/routes/features.tsx index 8811fbd..01b8e09 100644 --- a/src/routes/features.tsx +++ b/src/routes/features.tsx @@ -16,10 +16,10 @@ import { Webhook, Zap, } from "lucide-react"; +import { useState } from "react"; import { LogoIcon } from "../components/Logo"; import { Footer } from "../components/landing/Footer"; import { useVersion } from "../lib/useVersion"; -import { useState } from "react"; const coreFeatures = [ {