Skip to content

Commit 5aaa84c

Browse files
committed
Converted build scripts into tasks & ran vp check --fix
1 parent 6a53028 commit 5aaa84c

47 files changed

Lines changed: 1200 additions & 909 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/app/(home)/_components/SpotlightCard.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export const SpotlightCard: React.FC<{
1010
const [opacity, setOpacity] = useState(0);
1111

1212
const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
13-
if (!divRef.current) return;
13+
if (!divRef.current) {
14+
return;
15+
}
1416
const rect = divRef.current.getBoundingClientRect();
1517
setPosition({ x: e.clientX - rect.left, y: e.clientY - rect.top });
1618
setOpacity(1);

docs/app/(home)/_components/TextLoop.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ export function TextLoop({
3636
const items = Children.toArray(children);
3737

3838
useEffect(() => {
39-
if (!trigger) return;
39+
if (!trigger) {
40+
return;
41+
}
4042

4143
const intervalMs = interval * 1000;
4244
const timer = setInterval(() => {

docs/app/[...slug]/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import { notFound } from "next/navigation";
99
export default async function Page(props: PageProps<"/[...slug]">) {
1010
const params = await props.params;
1111
const page = source.getPage(params.slug);
12-
if (!page) notFound();
12+
if (!page) {
13+
notFound();
14+
}
1315

1416
const MDX = page.data.body;
1517

@@ -36,7 +38,9 @@ export async function generateMetadata(
3638
): Promise<Metadata> {
3739
const params = await props.params;
3840
const page = source.getPage(params.slug);
39-
if (!page) notFound();
41+
if (!page) {
42+
notFound();
43+
}
4044

4145
return getFullMetadata({
4246
title: page.data.title,

docs/app/docs/[[...slug]]/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ import { notFound } from "next/navigation";
1010
export default async function Page(props: PageProps<"/docs/[[...slug]]">) {
1111
const params = await props.params;
1212
const page = source.getPage(params.slug);
13-
if (!page) notFound();
13+
if (!page) {
14+
notFound();
15+
}
1416

1517
const MDX = page.data.body;
1618

@@ -54,7 +56,9 @@ export async function generateMetadata(
5456
): Promise<Metadata> {
5557
const params = await props.params;
5658
const page = source.getPage(params.slug);
57-
if (!page) notFound();
59+
if (!page) {
60+
notFound();
61+
}
5862

5963
return getFullMetadata({
6064
title: page.data.title,

docs/app/og/docs/[...slug]/route.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export async function GET(
1010
) {
1111
const { slug } = await params;
1212
const page = source.getPage(slug.slice(0, -1));
13-
if (!page || slug[slug.length - 1] !== "image.png") notFound();
13+
if (!page || slug[slug.length - 1] !== "image.png") {
14+
notFound();
15+
}
1416

1517
let title = page.data.imageTitle || page.data.title;
1618

docs/app/og/examples/[...slug]/route.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export async function GET(
1010
) {
1111
const { slug } = await params;
1212
const page = source.getPage(slug.slice(0, -1));
13-
if (!page || slug[slug.length - 1] !== "image.png") notFound();
13+
if (!page || slug[slug.length - 1] !== "image.png") {
14+
notFound();
15+
}
1416

1517
let title = page.data.imageTitle || page.data.title;
1618

docs/app/og/pages/[...slug]/route.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export async function GET(
1010
) {
1111
const { slug } = await params;
1212
const page = source.getPage(slug.slice(0, -1));
13-
if (!page || slug[slug.length - 1] !== "image.png") notFound();
13+
if (!page || slug[slug.length - 1] !== "image.png") {
14+
notFound();
15+
}
1416

1517
let title = page.data.imageTitle || page.data.title;
1618

examples/03-ui-components/17-advanced-tables-2/src/App.tsx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -530,19 +530,29 @@ export default function App() {
530530

531531
// Function to calculate totals for a table
532532
const calculateTableTotals = (tableBlock: Block<DefaultBlockSchema>) => {
533-
if (tableBlock.type !== "table") return;
533+
if (tableBlock.type !== "table") {
534+
return;
535+
}
534536

535537
const rows = tableBlock.content.rows;
536-
if (rows.length < 2) return; // Need at least header + 1 data row
538+
if (rows.length < 2) {
539+
return;
540+
} // Need at least header + 1 data row
537541

538542
let grandTotal = 0;
539543
const updatedRows = rows.map((row, rowIndex: number) => {
540-
if (rowIndex === 0) return row; // Skip header row
541-
if (rowIndex === rows.length - 1) return row; // Skip grand total row
544+
if (rowIndex === 0) {
545+
return row;
546+
} // Skip header row
547+
if (rowIndex === rows.length - 1) {
548+
return row;
549+
} // Skip grand total row
542550

543551
// Helper function to extract text from a cell
544552
const getCellText = (cell: any): string => {
545-
if (typeof cell === "string") return cell;
553+
if (typeof cell === "string") {
554+
return cell;
555+
}
546556
if (cell && typeof cell === "object" && "content" in cell) {
547557
return cell.content?.[0]?.text || "0";
548558
}
@@ -649,7 +659,9 @@ export default function App() {
649659
onChange={(editor, { getChanges }) => {
650660
const changes = getChanges();
651661

652-
if (changes.length === 0 || applying.current) return;
662+
if (changes.length === 0 || applying.current) {
663+
return;
664+
}
653665

654666
// prevents a double onChange because we're updating the block here
655667
applying.current = true;

examples/07-collaboration/06-comments-with-sidebar/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default function App() {
7373
doc.getMap("threads"),
7474
new DefaultThreadStoreAuth(activeUser.id, activeUser.role),
7575
);
76-
}, [doc, activeUser]);
76+
}, [activeUser]);
7777

7878
// setup the editor with comments and collaboration
7979
const editor = useCreateBlockNote(

packages/ariakit/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
},
5151
"scripts": {
5252
"dev": "vp dev",
53-
"build": "tsc && vp build",
5453
"preview": "vp preview",
5554
"lint": "vp lint src",
5655
"clean": "rimraf dist && rimraf types"

0 commit comments

Comments
 (0)