Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,22 @@ jobs:
steps:
- name: git checkout
uses: actions/checkout@v4

- name: Install node
uses: actions/setup-node@v4
with:
cache: npm
cache-dependency-path: site/package-lock.json
node-version: 20

- name: Install dependencies
working-directory: site
run: npm ci

- name: Format Check (Prettier)
working-directory: site
run: npm run format:check

- name: Check (TypeScript)
working-directory: site
run: npm run check
116 changes: 116 additions & 0 deletions docs/adr/0000-adr-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# ADR-XXXX: Title

<!--
Replace XXXX with the next sequential number.
Use a short, descriptive title.
-->

---

## Status

Proposed | Accepted | Implemented | Deprecated | Superseded

<!--
- Proposed: Draft decision under discussion
- Accepted: Approved and ready to be implemented
- Implemented: Changes made and available in main
- Deprecated: Obsolete, no longer applicable
- Superseded: Replaced by another ADR (reference it)
-->

## History

| Date | Status | Notes |
|------------|----------|---------------|
| YYYY-MM-DD | Proposed | Initial draft |

<!--
Add new rows on the bottom
Do not delete previous rows
-->

---

## Context

<!--
Describe the topic, background, constraints

Who, what, why
-->

---

## Decision

<!--
Describe what was decided
-->

### Reason

<!--
Expain why this decision was made
-->

---

### Alternatives Considered

<!--
List alternatives evaluated

Outline for each:
- Pros
- Cons
- Why rejected
-->

### Considerations

#### Pros

<!--
Benefits of the decision. List each one separately
-->

#### Cons

<!--
Describe any risks, friction points, tradeoffs for this decision. List each one separaretly
Describe mitigation steps or why the con did not block the decision
-->

---

## Implementation Notes

> [!NOTE]
> This is just for the initial implementation
> Any updates will be documented in PRs



```

<!--
Notes on implementation details. This is just needed for the initial ADR. Updates can be documented in PRs
-->

---

## Future Considerations


<!--
What factors might influence changing this decision in the future
-->

---

## References

<!--
Links to PRs, docs, discussions, benchmarks, related ADRs.
-->
157 changes: 157 additions & 0 deletions docs/adr/0001-formatters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# ADR-0001: Add a code formatter

<!--
Replace XXXX with the next sequential number.
Use a short, descriptive title.
-->

---

## Status

Proposed

<!--
- Proposed: Draft decision under discussion
- Accepted: Approved and ready to be implemented
- Implemented: Changes made and available in main
- Deprecated: Obsolete, no longer applicable
- Superseded: Replaced by another ADR (reference it)
-->

## History

| Date | Status | Notes |
|------------|----------|---------------|
| 2026-03-03 | Proposed | Initial draft |

<!--
Add new rows on the bottom
Do not delete previous rows
-->

---

## Context

Code formatters enforce commonly agreed upon style across the codebase.

Who is this for: Developers.
Why is this needed: Formatting the code using common style results in a consistent developer experience, and helps make the code more readable.

Prettier is already installed as a project dependency, but has not yet been configured or added to the ci workflow.

[Prettier on npm](https://www.npmjs.com/package/prettier)

- Download frequency: 77+ million weekly downloads
- Last update: last released a month ago
- License: MIT - [Link to license](https://github.com/prettier/prettier/blob/main/LICENSE)

[prettier-plugin-astro on npm](https://www.npmjs.com/package/prettier-plugin-astro)

- Download frequency: 369,270 weekly downloads
- Last update: 2 years ago
- License: MIT - [link to license](https://github.com/withastro/prettier-plugin-astro/blob/main/LICENSE)

<!--
Describe the topic, background, constraints

Who, what, why
-->

---

## Decision

<!--
Describe what was decided
-->

### Reason

<!--
Expain why this decision was made
-->

---

### Alternatives Considered

#### Biome

- Pros
- Extremely fast
- Provides formatting and linting

- Cons
- Astro support is still experimental
- May not be widely used in the Astro ecosystem

- Why was it rejected
- Biome's support for astro is experimental - [Biome language support](https://biomejs.dev/internals/language-support/)

<!--
List alternatives evaluated

Outline for each:
- Pros
- Cons
- Why was it rejected
-->

### Considerations

#### Pros

- Widely used and stable package
- Cleaner, more consistent code style
- Eliminates some inconsistencies across developer styles

<!--
Benefits of the decision. List each one separately
-->

#### Cons

- Slight decrease in performance as compared to Biome
- Some developer may need have a ramp up to adjust to formatting settings

<!--
Describe any risks, friction points, tradeoffs for this decision. List each one separaretly
Describe mitigation steps or why the con did not block the decision
-->

---

## Implementation Notes

> [!NOTE]
> This is just for the initial implementation
> Any updates will be documented in PRs

<!--
Notes on implementation details. This is just needed for the initial ADR. Updates can be documented in PRs
-->

Proposed initial configuration. Based in part on [Astro prettier configuration](https://github.com/withastro/astro/blob/main/prettier.config.mjs)

See the full list of options - [Prettier docs - Options](https://prettier.io/docs/options)

see PR #

---

## Future Considerations


<!--
What factors might influence changing this decision in the future
-->

---

## References

<!--
Links to PRs, docs, discussions, benchmarks, related ADRs.
-->
20 changes: 20 additions & 0 deletions site/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"printWidth": 80,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false,
"endOfLine": "lf",
"bracketSpacing": true,
"plugins": ["prettier-plugin-astro"],
"proseWrap": "preserve",
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
}
]
}
2 changes: 1 addition & 1 deletion site/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from 'astro/config';
import { defineConfig } from "astro/config";

import icon from "astro-icon";

Expand Down
Loading