Skip to content

Commit 9cd75ea

Browse files
authored
chore: add formatter (#83)
1 parent 241f332 commit 9cd75ea

Some content is hidden

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

86 files changed

+1002
-979
lines changed

.github/actions/build-docs/action.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: Build Docs
22
description: Build docs pages inside /docs directory
33

44
runs:
5-
using: 'composite'
6-
steps:
7-
- name: Install dependencies
8-
run: bun install
9-
shell: bash
5+
using: "composite"
6+
steps:
7+
- name: Install dependencies
8+
run: bun install
9+
shell: bash
1010

11-
- name: Build with Next.js
12-
run: bun next build
13-
shell: bash
11+
- name: Build with Next.js
12+
run: bun next build
13+
shell: bash
1414

15-
- name: Export static HTML with Next.js
16-
run: bun next export
17-
shell: bash
15+
- name: Export static HTML with Next.js
16+
run: bun next export
17+
shell: bash

.github/actions/format/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Format codebase
2+
description: Run prettier to check codebase formatting
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Install dependencies
8+
run: bun install
9+
shell: bash
10+
11+
- name: Run prettier
12+
run: bun run prettier:check
13+
shell: bash

.github/workflows/check.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
name: Validate merge requests
22

33
on:
4-
pull_request:
5-
branches:
6-
- main
4+
pull_request:
5+
branches:
6+
- main
77

88
jobs:
9-
validate:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v4
14-
- uses: oven-sh/setup-bun@v2
15-
- uses: ./.github/actions/build-docs
9+
validate:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
- uses: oven-sh/setup-bun@v2
15+
- uses: ./.github/actions/format
16+
- uses: ./.github/actions/build-docs

.github/workflows/nextjs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ permissions:
2323

2424
# Allow one concurrent deployment
2525
concurrency:
26-
group: 'pages'
26+
group: "pages"
2727
cancel-in-progress: true
2828

2929
jobs:

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"printWidth": 110,
3+
"singleQuote": false,
4+
"semi": true,
5+
"useTabs": false,
6+
"tabWidth": 2,
7+
"trailingComma": "es5"
8+
}

bun.lockb

416 Bytes
Binary file not shown.

components/Footer.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import styles from "../styles/Layout.module.css";
44
export default function Footer() {
55
return (
66
<footer className={styles.footer}>
7-
<span>
8-
Maintained by the OpenNext community
9-
</span>
7+
<span>Maintained by the OpenNext community</span>
108
<div>
119
<a target="_blank" href={SITE.github} rel="noopener noreferrer">
1210
GitHub

components/Logo.svg.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
export default function Logo() {
22
return (
3-
<svg
4-
width="195"
5-
height="36"
6-
fill="none"
7-
viewBox="0 0 195 36"
8-
xmlns="http://www.w3.org/2000/svg"
9-
>
3+
<svg width="195" height="36" fill="none" viewBox="0 0 195 36" xmlns="http://www.w3.org/2000/svg">
104
<path
115
d="M89.9565 27V2.88H95.8965L108.713 19.908V2.88H113.248V27H108.676L94.4925 8.136V27H89.9565Z"
126
fill="currentColor"
@@ -19,10 +13,7 @@ export default function Logo() {
1913
d="M145.8 27L154.764 14.58L145.944 2.88H151.776L158.4 11.592L164.664 2.88H170.1L161.28 15.12L170.28 27H164.412L157.644 18.072L151.236 27H145.8Z"
2014
fill="currentColor"
2115
/>
22-
<path
23-
d="M181.074 27V7.092H172.218V2.88H194.646V7.092H185.79V27H181.074Z"
24-
fill="currentColor"
25-
/>
16+
<path d="M181.074 27V7.092H172.218V2.88H194.646V7.092H185.79V27H181.074Z" fill="currentColor" />
2617
<path
2718
d="M10.2284 27.3516C8.15422 27.3516 6.40813 26.9473 4.99016 26.1387C3.58391 25.3184 2.5175 24.1641 1.79094 22.6758C1.0761 21.1875 0.718674 19.4473 0.718674 17.4551C0.718674 16.0488 0.841721 14.6719 1.08781 13.3242C1.34563 11.9648 1.72063 10.6699 2.21281 9.43945C2.705 8.20898 3.32024 7.07227 4.05852 6.0293C4.80852 4.98633 5.6757 4.08398 6.66008 3.32227C7.64445 2.54883 8.74602 1.95117 9.96477 1.5293C11.1952 1.10742 12.537 0.896484 13.9902 0.896484C16.9902 0.896484 19.287 1.78125 20.8808 3.55078C22.4863 5.32031 23.289 7.72266 23.289 10.7578C23.289 12.1641 23.1718 13.5527 22.9374 14.9238C22.7148 16.2832 22.3632 17.584 21.8827 18.8262C21.414 20.0566 20.8222 21.1934 20.1073 22.2363C19.3925 23.2676 18.5488 24.1641 17.5761 24.9258C16.6152 25.6875 15.5195 26.2852 14.289 26.7188C13.0702 27.1406 11.7167 27.3516 10.2284 27.3516ZM10.4745 23.748C11.33 23.748 12.1327 23.5957 12.8827 23.291C13.6327 22.9863 14.3183 22.5586 14.9394 22.0078C15.5722 21.4453 16.1347 20.7715 16.6269 19.9863C17.1308 19.2012 17.5527 18.3281 17.8925 17.3672C18.2441 16.4062 18.5136 15.375 18.7011 14.2734C18.8886 13.1602 18.9823 12 18.9823 10.793C18.9823 8.83594 18.5195 7.29492 17.5937 6.16992C16.6796 5.04492 15.373 4.48242 13.6738 4.48242C12.7948 4.48242 11.9687 4.64062 11.1952 4.95703C10.4335 5.26172 9.73039 5.70703 9.08586 6.29297C8.44133 6.86719 7.86711 7.55273 7.3632 8.34961C6.87102 9.13477 6.44914 10.0078 6.09758 10.9688C5.74602 11.9297 5.47649 12.9551 5.28899 14.0449C5.1132 15.123 5.02531 16.248 5.02531 17.4199C5.02531 18.7559 5.23625 19.8984 5.65813 20.8477C6.09172 21.7969 6.71281 22.5176 7.52141 23.0098C8.34172 23.502 9.3261 23.748 10.4745 23.748Z"
2819
fill="currentColor"

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint"
9+
"lint": "next lint",
10+
"prettier:check": "prettier --check .",
11+
"prettier:fix": "prettier --write .",
12+
"fix": "bun run prettier:fix"
1013
},
1114
"dependencies": {
1215
"@types/node": "18.11.9",
@@ -18,5 +21,8 @@
1821
"react": "18.2.0",
1922
"react-dom": "18.2.0",
2023
"typescript": "4.9.3"
24+
},
25+
"devDependencies": {
26+
"prettier": "^3.5.2"
2127
}
2228
}

pages/_app.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default function App({ Component, pageProps }) {
2-
return <Component {...pageProps} />
3-
}
2+
return <Component {...pageProps} />;
3+
}

0 commit comments

Comments
 (0)