From 1903af835200e83f1fc36152e754a5d795f908d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Thu, 10 Nov 2022 01:01:24 +0100 Subject: [PATCH] Apply prettier to all files --- website/.eslintrc.json | 2 +- website/README.md | 34 +++++--- website/next.config.js | 16 ++-- website/pages/_app.tsx | 2 +- website/pages/api/hello.ts | 9 +-- website/pages/index.tsx | 113 +++++++++++++------------- website/styles/Home.module.css | 142 ++++++++++++++++----------------- website/styles/globals.css | 28 +++---- website/tsconfig.json | 36 ++++----- 9 files changed, 195 insertions(+), 187 deletions(-) diff --git a/website/.eslintrc.json b/website/.eslintrc.json index bffb357a7..1c2aa65d7 100644 --- a/website/.eslintrc.json +++ b/website/.eslintrc.json @@ -1,3 +1,3 @@ { - "extends": "next/core-web-vitals" + "extends": "next/core-web-vitals" } diff --git a/website/README.md b/website/README.md index c87e0421d..e06b1a5f8 100644 --- a/website/README.md +++ b/website/README.md @@ -1,4 +1,5 @@ -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). +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). ## Getting Started @@ -10,25 +11,38 @@ npm run dev yarn dev ``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +Open [http://localhost:3000](http://localhost:3000) with your browser to see the +result. -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. +You can start editing the page by modifying `pages/index.tsx`. The page +auto-updates as you edit the file. -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. +[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on +[http://localhost:3000/api/hello](http://localhost:3000/api/hello). This +endpoint can be edited in `pages/api/hello.ts`. -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. +The `pages/api` directory is mapped to `/api/*`. Files in this directory are +treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead +of React pages. ## Learn More To learn more about Next.js, take a look at the following resources: -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js + features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! +You can check out +[the Next.js GitHub repository](https://github.com/vercel/next.js/) - your +feedback and contributions are welcome! ## Deploy on Vercel -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. +The easiest way to deploy your Next.js app is to use the +[Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) +from the creators of Next.js. -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +Check out our +[Next.js deployment documentation](https://nextjs.org/docs/deployment) for more +details. diff --git a/website/next.config.js b/website/next.config.js index 41876139b..3a8a89775 100644 --- a/website/next.config.js +++ b/website/next.config.js @@ -1,12 +1,12 @@ -const withMDX = require("@next/mdx")({ - extension: /\.mdx?$/, -}); +const withMDX = require('@next/mdx')({ + extension: /\.mdx?$/, +}) /** @type {import('next').NextConfig} */ const nextConfig = withMDX({ - reactStrictMode: true, - swcMinify: true, - pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"], -}); + reactStrictMode: true, + swcMinify: true, + pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'], +}) -module.exports = nextConfig; +module.exports = nextConfig diff --git a/website/pages/_app.tsx b/website/pages/_app.tsx index c055f25c2..8301ffda5 100644 --- a/website/pages/_app.tsx +++ b/website/pages/_app.tsx @@ -2,5 +2,5 @@ import '../styles/globals.css' import type { AppProps } from 'next/app' export default function App({ Component, pageProps }: AppProps) { - return + return } diff --git a/website/pages/api/hello.ts b/website/pages/api/hello.ts index f8bcc7e5c..d3979fec2 100644 --- a/website/pages/api/hello.ts +++ b/website/pages/api/hello.ts @@ -2,12 +2,9 @@ import type { NextApiRequest, NextApiResponse } from 'next' type Data = { - name: string + name: string } -export default function handler( - req: NextApiRequest, - res: NextApiResponse -) { - res.status(200).json({ name: 'John Doe' }) +export default function handler(req: NextApiRequest, res: NextApiResponse) { + res.status(200).json({ name: 'John Doe' }) } diff --git a/website/pages/index.tsx b/website/pages/index.tsx index cdffa57ca..aef84219f 100644 --- a/website/pages/index.tsx +++ b/website/pages/index.tsx @@ -3,69 +3,66 @@ import Image from 'next/image' import styles from '../styles/Home.module.css' export default function Home() { - return ( -
- - Create Next App - - - + return ( +
+ + Create Next App + + + -
-

- Welcome to Next.js! -

+
+

+ Welcome to Next.js! +

-

- Get started by editing{' '} - pages/index.tsx -

+

+ Get started by editing pages/index.tsx +

-
+ +
- - - -
- ) + ) } diff --git a/website/styles/Home.module.css b/website/styles/Home.module.css index bd50f42ff..7bb15a9cf 100644 --- a/website/styles/Home.module.css +++ b/website/styles/Home.module.css @@ -1,129 +1,129 @@ .container { - padding: 0 2rem; + padding: 0 2rem; } .main { - min-height: 100vh; - padding: 4rem 0; - flex: 1; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; + min-height: 100vh; + padding: 4rem 0; + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; } .footer { - display: flex; - flex: 1; - padding: 2rem 0; - border-top: 1px solid #eaeaea; - justify-content: center; - align-items: center; + display: flex; + flex: 1; + padding: 2rem 0; + border-top: 1px solid #eaeaea; + justify-content: center; + align-items: center; } .footer a { - display: flex; - justify-content: center; - align-items: center; - flex-grow: 1; + display: flex; + justify-content: center; + align-items: center; + flex-grow: 1; } .title a { - color: #0070f3; - text-decoration: none; + color: #0070f3; + text-decoration: none; } .title a:hover, .title a:focus, .title a:active { - text-decoration: underline; + text-decoration: underline; } .title { - margin: 0; - line-height: 1.15; - font-size: 4rem; + margin: 0; + line-height: 1.15; + font-size: 4rem; } .title, .description { - text-align: center; + text-align: center; } .description { - margin: 4rem 0; - line-height: 1.5; - font-size: 1.5rem; + margin: 4rem 0; + line-height: 1.5; + font-size: 1.5rem; } .code { - background: #fafafa; - border-radius: 5px; - padding: 0.75rem; - font-size: 1.1rem; - font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, - Bitstream Vera Sans Mono, Courier New, monospace; + background: #fafafa; + border-radius: 5px; + padding: 0.75rem; + font-size: 1.1rem; + font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, + Bitstream Vera Sans Mono, Courier New, monospace; } .grid { - display: flex; - align-items: center; - justify-content: center; - flex-wrap: wrap; - max-width: 800px; + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap; + max-width: 800px; } .card { - margin: 1rem; - padding: 1.5rem; - text-align: left; - color: inherit; - text-decoration: none; - border: 1px solid #eaeaea; - border-radius: 10px; - transition: color 0.15s ease, border-color 0.15s ease; - max-width: 300px; + margin: 1rem; + padding: 1.5rem; + text-align: left; + color: inherit; + text-decoration: none; + border: 1px solid #eaeaea; + border-radius: 10px; + transition: color 0.15s ease, border-color 0.15s ease; + max-width: 300px; } .card:hover, .card:focus, .card:active { - color: #0070f3; - border-color: #0070f3; + color: #0070f3; + border-color: #0070f3; } .card h2 { - margin: 0 0 1rem 0; - font-size: 1.5rem; + margin: 0 0 1rem 0; + font-size: 1.5rem; } .card p { - margin: 0; - font-size: 1.25rem; - line-height: 1.5; + margin: 0; + font-size: 1.25rem; + line-height: 1.5; } .logo { - height: 1em; - margin-left: 0.5rem; + height: 1em; + margin-left: 0.5rem; } @media (max-width: 600px) { - .grid { - width: 100%; - flex-direction: column; - } + .grid { + width: 100%; + flex-direction: column; + } } @media (prefers-color-scheme: dark) { - .card, - .footer { - border-color: #222; - } - .code { - background: #111; - } - .logo img { - filter: invert(1); - } + .card, + .footer { + border-color: #222; + } + .code { + background: #111; + } + .logo img { + filter: invert(1); + } } diff --git a/website/styles/globals.css b/website/styles/globals.css index 4f1842163..e606641cc 100644 --- a/website/styles/globals.css +++ b/website/styles/globals.css @@ -1,26 +1,26 @@ html, body { - padding: 0; - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, - Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; + padding: 0; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, + Fira Sans, Droid Sans, Helvetica Neue, sans-serif; } a { - color: inherit; - text-decoration: none; + color: inherit; + text-decoration: none; } * { - box-sizing: border-box; + box-sizing: border-box; } @media (prefers-color-scheme: dark) { - html { - color-scheme: dark; - } - body { - color: white; - background: black; - } + html { + color-scheme: dark; + } + body { + color: white; + background: black; + } } diff --git a/website/tsconfig.json b/website/tsconfig.json index b8d597880..a566d5bcc 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -1,20 +1,20 @@ { - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": false, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": false, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] }