Skip to content

Commit 929e38e

Browse files
committed
Update formatter.
1 parent 62314df commit 929e38e

Some content is hidden

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

79 files changed

+1912
-1923
lines changed

.github/workflows/update-data.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ jobs:
2626
- name: Open pull request
2727
uses: peter-evans/create-pull-request@v6
2828
with:
29-
author:
30-
github-actions[bot] <github-actions[bot]@users.noreply.github.com>
31-
committer:
32-
github-actions[bot] <github-actions[bot]@users.noreply.github.com>
29+
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
30+
committer: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3331
commit-message: "🆕 Update data"
3432
title: "🆕 Update data"
3533
body: "🆕 Update data"

.pre-commit-config.yaml

+24-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,29 @@ repos:
1616
rev: v4.0.0-alpha.8
1717
hooks:
1818
- id: prettier
19-
args: ["--tab-width", "2", "--trailing-comma", "es5"]
19+
args:
20+
[
21+
"--tab-width",
22+
"2",
23+
"--trailing-comma",
24+
"es5",
25+
"--print-width",
26+
"100",
27+
"--single-attribute-per-line",
28+
"true",
29+
"--bracket-same-line",
30+
"true",
31+
]
2032
additional_dependencies: ["prettier", "prettier-plugin-astro"]
2133
exclude: "pnpm-lock.yaml"
34+
files: \.(astro|mdx|md|yml|yaml|ts|js|mjs)$
35+
36+
- repo: local
37+
hooks:
38+
- id: astro-check
39+
name: astro check
40+
entry: astro check
41+
language: node
42+
files: "^(?:public|src)/.+|astro\\.config\\.mjs|tsconfig\\.json"
43+
pass_filenames: false
44+
additional_dependencies: ["astro", "@astrojs/check"]

.prettierignore

-1
This file was deleted.

.prettierrc

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"tabWidth": 2,
3+
"trailingComma": "es5",
4+
"plugins": ["prettier-plugin-astro"],
5+
"overrides": [
6+
{
7+
"files": "*.astro",
8+
"options": {
9+
"parser": "astro"
10+
}
11+
}
12+
],
13+
"printWidth": 100,
14+
"bracketSameLine": true,
15+
"singleAttributePerLine": true,
16+
"endOfLine": "lf"
17+
}

README.md

+20-21
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,30 @@
22

33
## Introduction 👋
44

5-
Welcome to the repository for the EuroPython website! We use
6-
[Astro](https://astro.build) in combination with pnpm to manage dependencies.
5+
Welcome to the repository for the EuroPython website! We use [Astro](https://astro.build) in
6+
combination with pnpm to manage dependencies.
77

88
## Setup 🛠️
99

1010
### Local dev env
1111

12-
To get started, clone the repository and run `pnpm install` to fetch all the
13-
dependencies. Then, use `pnpm run dev` to start the development server.
12+
To get started, clone the repository and run `pnpm install` to fetch all the dependencies. Then, use
13+
`pnpm run dev` to start the development server.
1414

1515
The website will be available at `http://localhost:4321`.
1616

1717
### Pre-commit Setup
1818

19-
To ensure code quality and consistency, we use `pre-commit` hooks. Follow these
20-
steps to set up `pre-commit` on your local environment:
19+
To ensure code quality and consistency, we use `pre-commit` hooks. Follow these steps to set up
20+
`pre-commit` on your local environment:
2121

2222
1. Install `pre-commit`. You can follow the instructions from
2323
[pre-commit.com](https://pre-commit.com/#install).
2424
2. Run `pre-commit install` in the root of your local repository.
25-
3. Now, `pre-commit` will run automatically on `git commit`. You can also run it
26-
manually on all files using `pre-commit run --all-files`.
25+
3. Now, `pre-commit` will run automatically on `git commit`. You can also run it manually on all
26+
files using `pre-commit run --all-files`.
2727

28-
This will help maintain a consistent coding style and catch common issues before
29-
submission.
28+
This will help maintain a consistent coding style and catch common issues before submission.
3029

3130
### Docker
3231

@@ -41,25 +40,22 @@ The website will be available at `http://localhost:4321`.
4140

4241
## Content Structure 🗂️
4342

44-
The content of the site is store in this repository. We are using Astro's
45-
content collections to manage the content. The collections are configure inside
46-
`src/content/config.ts`.
43+
The content of the site is store in this repository. We are using Astro's content collections to
44+
manage the content. The collections are configure inside `src/content/config.ts`.
4745

4846
### Pages
4947

50-
Pages are stored in the `src/content/pages` directory. Each page is a mdx file
51-
with frontmatter.
48+
Pages are stored in the `src/content/pages` directory. Each page is a mdx file with frontmatter.
5249

5350
### Deadlines
5451

55-
Meanwhile, our important deadlines ⏰ are located inside the
56-
`src/content/deadlines` directory.
52+
Meanwhile, our important deadlines ⏰ are located inside the `src/content/deadlines` directory.
5753

5854
## Using Astro Image Component 🖼️
5955

60-
When adding images to the website, please make sure to use astro Image component
61-
and to specify the width of the image. This will make sure we are optimizing the
62-
images and not serving large images to the users.
56+
When adding images to the website, please make sure to use astro Image component and to specify the
57+
width of the image. This will make sure we are optimizing the images and not serving large images to
58+
the users.
6359

6460
Here is an example:
6561

@@ -68,5 +64,8 @@ import { Image } from "astro:assset";
6864

6965
import image from "./image.jpg";
7066

71-
<Image src={image} width={500} />;
67+
<Image
68+
src={image}
69+
width={500}
70+
/>;
7271
```

astro.config.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default defineConfig({
5959
site: process.env.SITE_URL || "https://ep2025.europython.eu",
6060
redirects: {
6161
"/c-api-summit/": "/programme/c-api-summit/",
62-
"/programme/cfp/": "/programme/cfp/",
62+
"/cfp/": "/programme/cfp/",
6363
"/planning/": "https://forms.gle/riw6CvML8ck94A4V9",
6464
"/reviewers/": "https://forms.gle/4GTJjwZ1nHBGetM18",
6565
"/rust-summit/": "/programme/rust-summit/",

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"build": "astro check && astro build && pnpm pagefind --site dist",
99
"preview": "astro preview",
1010
"astro": "astro",
11-
"format": "prettier --write --plugin=prettier-plugin-astro ."
11+
"format:files": "pnpm prettier --config .prettierrc --write --log-level=error",
12+
"format": "pnpm run format:files ."
1213
},
1314
"dependencies": {
1415
"@astro-community/astro-embed-youtube": "^0.5.6",
@@ -21,7 +22,6 @@
2122
"@tailwindcss/typography": "^0.5.16",
2223
"@types/react": "^19.0.12",
2324
"@types/react-dom": "^19.0.4",
24-
"astro": "^5.1.6",
2525
"astro-delete-unused-images": "^1.0.3",
2626
"astro-meta-tags": "^0.3.1",
2727
"astro-pagefind": "^1.8.1",
@@ -40,7 +40,8 @@
4040
"typescript": "^5.7.3"
4141
},
4242
"devDependencies": {
43-
"prettier": "^3.4.2",
43+
"astro": "^5.5.2",
44+
"prettier": "^3.5.3",
4445
"prettier-plugin-astro": "^0.14.1"
4546
},
4647
"prettier": {

pnpm-lock.yaml

+5-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/BaseHead.astro

+3-9
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,7 @@ const { title, description, image = "/social-card.png" } = Astro.props;
5353
<meta http-equiv="X-Clacks-Overhead" content="GNU Oier Etxaniz" />
5454
<meta http-equiv="X-Clacks-Overhead" content="GNU Russel Winder" />
5555

56-
<script
57-
defer
58-
is:inline
59-
data-domain="ep2025.europython.eu"
60-
src="https://plausible.io/js/script.js"></script>
56+
<script defer is:inline data-domain="ep2025.europython.eu" src="https://plausible.io/js/script.js"
57+
></script>
6158

62-
<script
63-
is:inline
64-
src="https://kit.fontawesome.com/14a4971ab3.js"
65-
crossorigin="anonymous"></script>
59+
<script is:inline src="https://kit.fontawesome.com/14a4971ab3.js" crossorigin="anonymous"></script>

src/components/accordion/accordion.astro

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ const { title, id } = Astro.props;
2727
document.addEventListener("DOMContentLoaded", () => {
2828
const hash = window.location.hash.substring(1); // Remove #
2929
if (hash) {
30-
const details = document.getElementById(
31-
hash,
32-
) as HTMLDetailsElement | null;
30+
const details = document.getElementById(hash) as HTMLDetailsElement | null;
3331
if (details) {
3432
details.open = true;
3533
}

src/components/button-link/button-link.astro

+3-14
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,8 @@ export interface Props {
1010
isExternal?: boolean;
1111
}
1212
13-
const {
14-
url,
15-
className = "",
16-
secondary = false,
17-
disabled = false,
18-
isExternal,
19-
} = Astro.props;
20-
const resolvedIsExternal =
21-
isExternal !== undefined ? isExternal : url?.startsWith("http");
13+
const { url, className = "", secondary = false, disabled = false, isExternal } = Astro.props;
14+
const resolvedIsExternal = isExternal !== undefined ? isExternal : url?.startsWith("http");
2215
---
2316

2417
<a
@@ -31,9 +24,5 @@ const resolvedIsExternal =
3124
>
3225
<slot />
3326

34-
{
35-
resolvedIsExternal && (
36-
<span class="inline-block ml-1 font-system text-lg leading-4">↗</span>
37-
)
38-
}
27+
{resolvedIsExternal && <span class="inline-block ml-1 font-system text-lg leading-4">↗</span>}
3928
</a>
+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
export const CardContainer = ({ children }: { children: React.ReactNode }) => (
2-
<section className="justify-center gap-6 flex flex-wrap px-6">
3-
{children}
4-
</section>
2+
<section className="justify-center gap-6 flex flex-wrap px-6">{children}</section>
53
);

src/components/card/card.astro

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ const { title, subtitle, url, image } = Astro.props;
2222
src={image}
2323
width={600}
2424
height={375}
25-
alt=`Card image - ${title}`
25+
alt=`Card image - ${title}`
2626
class="not-prose rounded-xl aspect-[3/2] w-full"
2727
loading="lazy"
2828
/>
2929
</div>
3030
</a>
3131
<div class="flex items-center flex-col flex-grow mb-2">
3232
<a href={url} class="block hover:underline">
33-
<h3 >{title}</h3>
33+
<h3>{title}</h3>
3434
</a>
3535
<slot />
3636
</div>

src/components/footer.astro

+9-34
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ const gitVersion = import.meta.env.GIT_VERSION;
99
---
1010

1111
<Fullbleed className="bg-primary text-white">
12-
<footer
13-
class="max-w-4xl lg:max-w-6xl mx-auto py-16 lg:grid grid-cols-2 px-6 gap-60"
14-
>
12+
<footer class="max-w-4xl lg:max-w-6xl mx-auto py-16 lg:grid grid-cols-2 px-6 gap-60">
1513
<div>
1614
<nav class="mb-12">
1715
<h6 class="font-bold text-xl mb-6">Quicklinks</h6>
@@ -33,9 +31,7 @@ const gitVersion = import.meta.env.GIT_VERSION;
3331
</nav>
3432
</div>
3533

36-
<article
37-
class="flex flex-col lg:flex-row self-center gap-8 lg:gap-12 justify-end"
38-
>
34+
<article class="flex flex-col lg:flex-row self-center gap-8 lg:gap-12 justify-end">
3935
<div>
4036
<EPSLogo className="max-w-[100px] lg:max-w-[200px] h-auto w-full" />
4137
</div>
@@ -50,51 +46,30 @@ const gitVersion = import.meta.env.GIT_VERSION;
5046
</address>
5147

5248
<p class="mb-4">
53-
<a
54-
class="underline whitespace-nowrap"
55-
href="https://europython-society.org"
56-
>
49+
<a class="underline whitespace-nowrap" href="https://europython-society.org">
5750
europython-society.org <span> ↗</span>
5851
</a>
59-
<a
60-
class="underline whitespace-nowrap"
61-
href="https://blog.europython.eu"
62-
>
52+
<a class="underline whitespace-nowrap" href="https://blog.europython.eu">
6353
blog.europython.eu <span> ↗</span>
6454
</a>
6555
<br />
66-
<a
67-
class="underline whitespace-nowrap"
68-
href="https://fosstodon.org/@europython"
69-
>
56+
<a class="underline whitespace-nowrap" href="https://fosstodon.org/@europython">
7057
fosstodon.org/@europython <span> ↗</span>
7158
</a>
7259
<br />
73-
<a
74-
class="underline whitespace-nowrap"
75-
href="https://linkedin.com/company/europython"
76-
>
60+
<a class="underline whitespace-nowrap" href="https://linkedin.com/company/europython">
7761
linkedin.com/company/europython <span> ↗</span>
7862
</a>
7963
<br />
80-
<a
81-
class="underline whitespace-nowrap"
82-
href="https://bsky.app/profile/europython.eu"
83-
>
64+
<a class="underline whitespace-nowrap" href="https://bsky.app/profile/europython.eu">
8465
bsky.app/profile/europython.eu <span> ↗</span>
8566
</a>
8667
<br />
87-
<a
88-
class="underline whitespace-nowrap"
89-
href="https://github.com/europython"
90-
>
68+
<a class="underline whitespace-nowrap" href="https://github.com/europython">
9169
github.com/europython <span> ↗</span>
9270
</a>
9371
<br />
94-
<a
95-
class="underline whitespace-nowrap"
96-
href="https://twitter.com/europython"
97-
>
72+
<a class="underline whitespace-nowrap" href="https://twitter.com/europython">
9873
twitter.com/europython <span> ↗</span>
9974
</a>
10075
</p>

src/components/form/label.tsx

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
export const Label = ({
2-
children,
3-
htmlFor,
4-
}: {
5-
children: React.ReactNode;
6-
htmlFor: string;
7-
}) => {
1+
export const Label = ({ children, htmlFor }: { children: React.ReactNode; htmlFor: string }) => {
82
return (
9-
<label
10-
htmlFor={htmlFor}
11-
className="block text-primary font-bold mb-4 pl-3 text-lg"
12-
>
3+
<label htmlFor={htmlFor} className="block text-primary font-bold mb-4 pl-3 text-lg">
134
{children}
145
</label>
156
);

0 commit comments

Comments
 (0)