mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 11:32:13 +01:00
refactor: fix biome linting issues and update project documentation
- Fix 36+ biome linting issues reducing errors/warnings from 227 to 191 - Replace explicit 'any' types with proper TypeScript interfaces - Fix React hooks dependencies and useCallback patterns - Resolve unused variables and parameter assignment issues - Improve accessibility with proper label associations - Add comprehensive API documentation for admin and security features - Update README.md with accurate PostgreSQL setup and current tech stack - Create complete documentation for audit logging, CSP monitoring, and batch processing - Fix outdated project information and missing developer workflows
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
import "./globals.css";
|
||||
import type { ReactNode } from "react";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
import { NonceProvider } from "@/lib/nonce-context";
|
||||
import { getNonce } from "@/lib/nonce-utils";
|
||||
import { Providers } from "./providers";
|
||||
|
||||
export const metadata = {
|
||||
@ -88,7 +90,13 @@ export const metadata = {
|
||||
},
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
}) {
|
||||
const nonce = await getNonce();
|
||||
|
||||
const jsonLd = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "SoftwareApplication",
|
||||
@ -126,7 +134,8 @@ export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
<head>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: Safe use for JSON-LD structured data
|
||||
nonce={nonce}
|
||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: Safe use for JSON-LD structured data with CSP nonce
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||
/>
|
||||
</head>
|
||||
@ -138,7 +147,9 @@ export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
>
|
||||
Skip to main content
|
||||
</a>
|
||||
<Providers>{children}</Providers>
|
||||
<NonceProvider nonce={nonce}>
|
||||
<Providers>{children}</Providers>
|
||||
</NonceProvider>
|
||||
<Toaster />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user