Skip to content

Commit a05343a

Browse files
committed
chore: Run prettier on docs
To ensure that the sample code is consistent.
1 parent bb7aa0a commit a05343a

Some content is hidden

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

70 files changed

+966
-901
lines changed

.eslintrc.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": [
3-
"next/core-web-vitals",
4-
"plugin:@typescript-eslint/recommended"
5-
],
2+
"extends": ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"],
63
"parser": "@typescript-eslint/parser",
74
"plugins": ["@typescript-eslint"],
85
"rules": {
96
"@typescript-eslint/no-explicit-any": "warn"
107
}
11-
}
8+
}

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
**
1+
um.js

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
3535
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Enforcement Responsibilities
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
106106
### 4. Permanent Ban
107107

108108
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
110110
individual, or aggression toward or disparagement of classes of individuals.
111111

112112
**Consequence**: A permanent ban from any sort of public interaction within

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ This feature-packed documentation template, built with Next.js, offers a sleek a
66

77
<img src="./public/public-og.png" />
88

9-
109
<br/>
1110

1211
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
@@ -50,9 +49,6 @@ Check out our [Next.js deployment documentation](https://nextjs.org/docs/deploym
5049

5150
Got it! Here's a way to present the features in a more structured and visually appealing way using a table:
5251

53-
54-
55-
5652
## Features
5753

5854
```plaintext
@@ -68,4 +64,4 @@ Features
6864
```
6965

7066
<img src="./public/1.png" />
71-
<img src="./public/2.png" />
67+
<img src="./public/2.png" />

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import Toc from "@/components/toc";
2-
import Pagination from "@/components/Pagination";
3-
import { page_routes } from "@/lib/routes-config";
4-
import { notFound } from "next/navigation";
5-
import { getDocsForSlug } from "@/lib/markdown";
6-
import { Typography } from "@/components/typography";
7-
import CopyContent from "@/components/ui/copy-content";
1+
import Toc from '@/components/toc';
2+
import Pagination from '@/components/Pagination';
3+
import {page_routes} from '@/lib/routes-config';
4+
import {notFound} from 'next/navigation';
5+
import {getDocsForSlug} from '@/lib/markdown';
6+
import {Typography} from '@/components/typography';
7+
import CopyContent from '@/components/ui/copy-content';
88

99
type PageProps = {
10-
params: { slug: string[] };
10+
params: {slug: string[]};
1111
};
1212

13-
export default async function DocsPage({ params: { slug = [] } }: PageProps) {
14-
const pathName = slug.join("/");
13+
export default async function DocsPage({params: {slug = []}}: PageProps) {
14+
const pathName = slug.join('/');
1515
const res = await getDocsForSlug(pathName);
1616

1717
if (!res) notFound();
@@ -34,19 +34,19 @@ export default async function DocsPage({ params: { slug = [] } }: PageProps) {
3434
);
3535
}
3636

37-
export async function generateMetadata({ params: { slug = [] } }: PageProps) {
38-
const pathName = slug.join("/");
37+
export async function generateMetadata({params: {slug = []}}: PageProps) {
38+
const pathName = slug.join('/');
3939
const res = await getDocsForSlug(pathName);
4040
if (!res) return null;
41-
const { frontmatter } = res;
41+
const {frontmatter} = res;
4242
return {
4343
title: frontmatter.title,
4444
description: frontmatter.description,
4545
};
4646
}
4747

4848
export function generateStaticParams() {
49-
return page_routes.map((item) => ({
50-
slug: item.href.split("/").slice(1),
49+
return page_routes.map(item => ({
50+
slug: item.href.split('/').slice(1),
5151
}));
5252
}

app/docs/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Leftbar } from "@/components/leftbar";
1+
import {Leftbar} from '@/components/leftbar';
22

33
export default function DocsLayout({
44
children,
@@ -8,7 +8,7 @@ export default function DocsLayout({
88
return (
99
<div className="flex items-start gap-14">
1010
<Leftbar key="leftbar" />
11-
<div className="flex-[4]">{children}</div>{" "}
11+
<div className="flex-[4]">{children}</div>{' '}
1212
</div>
1313
);
1414
}

app/error.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
"use client"; // Error components must be Client Components
1+
'use client'; // Error components must be Client Components
22

3-
import { Button } from "@/components/ui/button";
4-
import { useEffect } from "react";
3+
import {Button} from '@/components/ui/button';
4+
import {useEffect} from 'react';
55

66
export default function Error({
77
error,
88
reset,
99
}: {
10-
error: Error & { digest?: string };
10+
error: Error & {digest?: string};
1111
reset: () => void;
1212
}) {
1313
useEffect(() => {

app/globals.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@
6565
body {
6666
@apply bg-background text-foreground;
6767
font-variant-ligatures: none;
68-
font-feature-settings: "liga" 0, "clig" 0, "calt" 0;
68+
font-feature-settings:
69+
'liga' 0,
70+
'clig' 0,
71+
'calt' 0;
6972
-webkit-font-smoothing: antialiased; /* macOS and iOS (WebKit) smoothing */
7073
-moz-osx-font-smoothing: grayscale; /* macOS (Firefox) smoothing */
7174
font-smooth: always; /* fallback smoothing */
@@ -83,7 +86,7 @@
8386

8487
.prose
8588
aside
86-
:where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
89+
:where(h3):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
8790
margin-top: 0.75rem;
8891
}
8992

@@ -184,7 +187,10 @@
184187
max-width: inherit !important;
185188
padding: 14px 0 !important;
186189
font-variant-ligatures: none;
187-
font-feature-settings: "liga" 0, "clig" 0, "calt" 0;
190+
font-feature-settings:
191+
'liga' 0,
192+
'clig' 0,
193+
'calt' 0;
188194
}
189195

190196
.code-line {
@@ -272,7 +278,7 @@
272278
}
273279

274280
.heading-link::after {
275-
content: "";
281+
content: '';
276282
position: absolute;
277283
right: -1.3rem;
278284
top: 0.5rem;

app/layout.tsx

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import type { Metadata } from "next";
2-
import localFont from "next/font/local";
3-
import ClientBoundary from "@/components/ClientBoundary"; // Add a wrapper for client components
4-
import "./globals.css";
5-
import Script from "next/script";
1+
import type {Metadata} from 'next';
2+
import localFont from 'next/font/local';
3+
import ClientBoundary from '@/components/ClientBoundary'; // Add a wrapper for client components
4+
import './globals.css';
5+
import Script from 'next/script';
66

77
const muoto = localFont({
8-
src: "./fonts/muoto-var.ttf",
9-
variable: "--font-regular",
10-
weight: "100 900",
8+
src: './fonts/muoto-var.ttf',
9+
variable: '--font-regular',
10+
weight: '100 900',
1111
});
1212

1313
const codeFont = localFont({
14-
src: "./fonts/fira-var.woff2",
15-
variable: "--font-code",
16-
weight: "100 900",
14+
src: './fonts/fira-var.woff2',
15+
variable: '--font-code',
16+
weight: '100 900',
1717
});
1818

1919
export const metadata: Metadata = {
@@ -29,9 +29,8 @@ export const metadata: Metadata = {
2929
description: 'The official documentation for Zero by Rocicorp.',
3030
images: '/opengraph-image.jpg',
3131
},
32-
title: "Zero Docs",
33-
description:
34-
"The official documentation for Zero by Rocicorp.",
32+
title: 'Zero Docs',
33+
description: 'The official documentation for Zero by Rocicorp.',
3534
};
3635

3736
export default function RootLayout({
@@ -43,7 +42,7 @@ export default function RootLayout({
4342
<html
4443
lang="en"
4544
className="dark"
46-
style={{ colorScheme: "dark" }}
45+
style={{colorScheme: 'dark'}}
4746
suppressHydrationWarning
4847
>
4948
<body

app/not-found.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { buttonVariants } from "@/components/ui/button";
2-
import Link from "next/link";
1+
import {buttonVariants} from '@/components/ui/button';
2+
import Link from 'next/link';
33

44
export default function NotFound() {
55
return (

app/page.tsx

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import Link from "next/link";
2-
import Image from "next/image";
3-
import styles from "./page.module.css";
4-
import ResponsiveImage from "@/components/ui/responsive-image";
5-
import CodeBlock from "@/components/CodeBlock";
6-
import { Button } from "@/components/ui/button";
1+
import Link from 'next/link';
2+
import Image from 'next/image';
3+
import styles from './page.module.css';
4+
import ResponsiveImage from '@/components/ui/responsive-image';
5+
import CodeBlock from '@/components/CodeBlock';
6+
import {Button} from '@/components/ui/button';
77

88
export default function Home() {
99
// Code block
@@ -48,9 +48,12 @@ export default function Home() {
4848
height={32}
4949
/>
5050

51-
52-
53-
<Button variant="outline" className={styles.primaryButton} size="default" asChild>
51+
<Button
52+
variant="outline"
53+
className={styles.primaryButton}
54+
size="default"
55+
asChild
56+
>
5457
<a href="/docs/introduction">Docs</a>
5558
</Button>
5659
</div>
@@ -67,8 +70,8 @@ export default function Home() {
6770
<p>It&apos;s time for a rethink.</p>
6871
<p>
6972
We&apos;re building a general-purpose sync engine for the web. You put
70-
Zero in front of your database or web service, and we
71-
distribute your backend all the way to main thread of the UI.
73+
Zero in front of your database or web service, and we distribute your
74+
backend all the way to main thread of the UI.
7275
</p>
7376

7477
{/* Zero Diagram */}
@@ -102,8 +105,8 @@ export default function Home() {
102105
updates, in the next frame.
103106
</li>
104107
<li>
105-
<strong>Automatic reactivity</strong> &ndash; a user changes
106-
something and all other users see the change live.
108+
<strong>Automatic reactivity</strong> &ndash; a user changes something
109+
and all other users see the change live.
107110
</li>
108111
<li>
109112
<strong>Dramatically faster</strong> development velocity &ndash;
@@ -127,8 +130,8 @@ export default function Home() {
127130
even an old-fashioned server-rendered web app.
128131
</p>
129132
<p>
130-
We have open sourced{" "}
131-
<Link href="https://replicache.dev">Replicache</Link> and{" "}
133+
We have open sourced{' '}
134+
<Link href="https://replicache.dev">Replicache</Link> and{' '}
132135
<Link href="https://reflect.net">Reflect</Link>. Once Zero is ready, we
133136
will encourage users to move. We expect the migration to be easy, and
134137
the benefits once migrated to be dramatic.
@@ -138,7 +141,12 @@ export default function Home() {
138141
past five years. Ready to dive in?
139142
</p>
140143
<p className={styles.ctaContainer}>
141-
<Button variant="outline" className={styles.primaryButton} size="default" asChild>
144+
<Button
145+
variant="outline"
146+
className={styles.primaryButton}
147+
size="default"
148+
asChild
149+
>
142150
<a href="/docs/introduction">Get Started</a>
143151
</Button>
144152
</p>

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
"components": "@/components",
1515
"utils": "@/lib/utils"
1616
}
17-
}
17+
}

components/ClientBoundary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"use client";
1+
'use client';
22

3-
import ConditionalNavbar from "@/components/ConditionalNavbar";
3+
import ConditionalNavbar from '@/components/ConditionalNavbar';
44

55
export default function ClientBoundary() {
66
return <ConditionalNavbar />;

0 commit comments

Comments
 (0)