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

Lines changed: 2 additions & 4 deletions
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

Lines changed: 24 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierrc

Lines changed: 17 additions & 0 deletions
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

Lines changed: 20 additions & 21 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 3 deletions
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

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/BaseHead.astro

Lines changed: 3 additions & 9 deletions
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

Lines changed: 1 addition & 3 deletions
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
}

0 commit comments

Comments
 (0)