Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"$schema": "https://biomejs.dev/schemas/2.4.0/schema.json",
"files": {
"ignoreUnknown": false,
"ignore": ["node_modules", ".next", "*.css", "src/components/ui/*"]
"includes": [
"**",
"!**/node_modules",
"!**/.next",
"!**/*.css",
"!**/src/components/ui/**/*",
"!**/public/workers/**"
]
},
"formatter": {
"enabled": true,
Expand Down Expand Up @@ -31,9 +38,10 @@
},
"suspicious": {
"noExplicitAny": "warn",
"noConsoleLog": "warn",
"noControlCharactersInRegex": "off",
"noShadowRestrictedNames": "off"
"noShadowRestrictedNames": "off",
"noConsole": "warn",
"noArrayIndexKey": "warn"
},
"style": {
"noNonNullAssertion": "warn",
Expand All @@ -45,7 +53,5 @@
}
}
},
"organizeImports": {
"enabled": true
}
"assist": { "actions": { "source": { "organizeImports": "on" } } }
}
12 changes: 9 additions & 3 deletions scripts/nextjs-list-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,20 @@ const htmlFiles = walk(serverDir)
.sort();

console.log("\n📄 Static HTML files emitted:");
htmlFiles.forEach((p) => console.log(" •", p));
htmlFiles.forEach((p) => {
console.log(" •", p);
});

console.log("\n📦 SSG routes from prerender‑manifest.json:");
ssgRoutes.forEach((p) => console.log(" •", p));
ssgRoutes.forEach((p) => {
console.log(" •", p);
});

if (dynamicSsgRoutes.length) {
console.log("\n📦 Dynamic SSG routes (ISR/fallback):");
dynamicSsgRoutes.forEach((p) => console.log(" •", p));
dynamicSsgRoutes.forEach((p) => {
console.log(" •", p);
});
}

console.log("\n✅ Done.");
8 changes: 4 additions & 4 deletions src/app/(app)/bones/cli-www/_components/component-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function ComponentDetails({
}: ComponentDetailsProps) {
const [selectedFile, setSelectedFile] = useState<string>()

const handleKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {
const handleKeyDown = (e: KeyboardEvent<HTMLButtonElement>) => {
if (e.key === 'Escape') {
onClose()
}
Expand All @@ -61,12 +61,12 @@ export function ComponentDetails({

return (
<>
<div
<button
type="button"
aria-label="Close"
className="absolute inset-0 bg-background/50 z-40"
onClick={onClose}
onKeyDown={handleKeyDown}
role="button"
tabIndex={0}
/>
<motion.div
initial={{ opacity: 0, scale: 0.95 }}
Expand Down
1 change: 1 addition & 0 deletions src/app/(app)/bones/cli-www/_components/terminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export function Terminal({ output, className }: TerminalProps) {
<div
key={`${i}-${line.slice(0, 20)}`}
className="min-h-[6px]"
// biome-ignore lint/security/noDangerouslySetInnerHtml: ansi-to-html escapes input (escapeXML: true); only its own color spans are injected
dangerouslySetInnerHTML={{
__html: convert.toHtml(cleanAnsi(line)) || '&nbsp;',
}}
Expand Down
2 changes: 2 additions & 0 deletions src/components/loaders/loader-atoms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ export interface LoaderAtomsProps
export const LoaderAtoms = React.forwardRef<HTMLDivElement, LoaderAtomsProps>(
({ className, size, color, label, ...props }, ref) => {
return (
// biome-ignore lint/a11y/useSemanticElements: keeping a div preserves the exported HTMLDivElement ref type
<div
ref={ref}
role="status"
aria-live="polite"
aria-label={label || "Loading"}
className={cn("relative", className)}
Expand Down
4 changes: 2 additions & 2 deletions src/components/primitives/accordion-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
} from "@/components/ui/accordion";
import { Separator } from "@/components/ui/separator";

export interface AccordionItem {
export interface AccordionListItem {
title: string;
content: React.ReactNode;
}

interface AccordionListProps {
items: AccordionItem[];
items: AccordionListItem[];
accordionProps?: any; // TODO: fix type
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/primitives/masonry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const ExampleMasonry: React.FC = () => {
<img
className="w-full rounded-lg object-contain"
src={imageUrl}
alt={`Random stock image ${idx + 1}`}
alt={`Random stock placeholder ${idx + 1}`}
loading="lazy"
/>
)}
Expand Down
7 changes: 4 additions & 3 deletions src/lib/utils/extract-headings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ function ensureCacheSize(): void {
entries.sort((a, b) => a[1].timestamp - b[1].timestamp);

const toRemove = entries.slice(0, headingCache.size - MAX_CACHE_SIZE + 1);
toRemove.forEach(([key]) => headingCache.delete(key));
toRemove.forEach(([key]) => {
headingCache.delete(key);
});
}
}

Expand Down Expand Up @@ -89,9 +91,8 @@ export function extractHeadings(content: string): Heading[] {
// Extract headings if not in cache or expired
const headingRegex = /^(#{1,6})\s+(.+)$/gm;
const headings: Heading[] = [];
let match;

while ((match = headingRegex.exec(content)) !== null) {
for (const match of content.matchAll(headingRegex)) {
const level = match[1]?.length ?? 0;
const text = match[2]?.trim() ?? "";
const id = slugify(text);
Expand Down
2 changes: 1 addition & 1 deletion tests/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { afterEach, beforeAll, expect, vi } from "vitest";

// Augment the global namespace for TypeScript
declare global {
// biome-ignore lint/style/noVar: <explanation>
// biome-ignore lint/suspicious/noVar: global augmentation requires var
var IS_REACT_ACT_ENVIRONMENT: boolean;
}

Expand Down
Loading