fix: resolve Prettier markdown code block parsing errors

- Fix syntax errors in skills markdown files (.github/skills, .opencode/skills)
- Change typescript to tsx for code blocks with JSX
- Replace ellipsis (...) in array examples with valid syntax
- Separate CSS from TypeScript into distinct code blocks
- Convert JavaScript object examples to valid JSON in docs
- Fix enum definitions with proper comma separation
This commit is contained in:
2026-01-20 21:09:29 +01:00
parent 7932fe7386
commit cd05fc8648
177 changed files with 5042 additions and 5541 deletions

View File

@@ -1,20 +1,20 @@
"use client";
import { Database, Save, Settings, ShieldX } from "lucide-react";
import { useSession } from "next-auth/react";
import { useEffect, useId, useState } from "react";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import type { Company } from "../../../lib/types";
import { authClient } from "@/lib/auth/client";
import type { Company } from "@/lib/types";
export default function CompanySettingsPage() {
const csvUrlId = useId();
const csvUsernameId = useId();
const csvPasswordId = useId();
const { data: session, status } = useSession();
const { data, isPending } = authClient.useSession();
// We store the full company object for future use and updates after save operations
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
const [_company, setCompany] = useState<Company | null>(null);
@@ -25,7 +25,7 @@ export default function CompanySettingsPage() {
const [loading, setLoading] = useState(true);
useEffect(() => {
if (status === "authenticated") {
if (!isPending && data?.session) {
const fetchCompany = async () => {
setLoading(true);
try {
@@ -46,7 +46,7 @@ export default function CompanySettingsPage() {
};
fetchCompany();
}
}, [status]);
}, [isPending, data]);
async function handleSave() {
setMessage("");
@@ -99,8 +99,8 @@ export default function CompanySettingsPage() {
);
}
// Check for ADMIN access
if (session?.user?.role !== "ADMIN") {
// Check for admin access
if (data?.user?.role !== "admin") {
return (
<div className="space-y-6">
<Card>