Skip to content

Commit 6c712f9

Browse files
authored
style(dprint): add dprint workflow (#90)
1 parent 840aaeb commit 6c712f9

37 files changed

+244
-118
lines changed

.github/ISSUE_TEMPLATE/recipe-request.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ assignees: ''
88
---
99

1010
**Is your recipe related to a category/tag/menu section? Please describe.**
11-
A clear and concise description of what type of recipe it is is. Ex. This pasta dish is nice to this occasion [...]
11+
12+
A clear and concise description of what type of recipe it is is. Ex. This pasta dish is
13+
nice to this occasion [...]
1214

1315
**Describe the recipe you'd like**
16+
1417
A recipe that is as close to a proper one as possible:
1518

1619
```text
@@ -35,13 +38,15 @@ authors:
3538
3639
![](https://via.placeholder.com/1280x480)
3740
41+
<!-- dprint-ignore-start -->
3842
||| :timer_clock: Tid
3943
65 min
4044
||| :knife_fork_plate: Porsjoner
4145
2
4246
||| :cook: Vanskelighetsgrad
4347
Medium
4448
|||
49+
<!-- dprint-ignore-end -->
4550
4651
## Ingredienser
4752
@@ -54,4 +59,5 @@ Medium
5459
```
5560

5661
**Additional context**
62+
5763
Add any other context or screenshots about the recipe request here.

.github/workflows/dprint-check.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
on: push
2+
3+
name: dprint-check
4+
5+
jobs:
6+
style:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
11+
- name: Check with dprint
12+
run: |
13+
curl -fsSL https://dprint.dev/install.sh | sh -s 0.45.0 > /dev/null 2>&1
14+
$HOME/.dprint/bin/dprint check --allow-no-files

CODE_OF_CONDUCT.md

Lines changed: 65 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -2,124 +2,116 @@
22

33
## Our Pledge
44

5-
We as members, contributors, and leaders pledge to make participation in our
6-
community a harassment-free experience for everyone, regardless of age, body
7-
size, visible or invisible disability, ethnicity, sex characteristics, gender
8-
identity and expression, level of experience, education, socio-economic status,
9-
nationality, personal appearance, race, religion, or sexual identity
10-
and orientation.
5+
We as members, contributors, and leaders pledge to make participation in our community a
6+
harassment-free experience for everyone, regardless of age, body size, visible or
7+
invisible disability, ethnicity, sex characteristics, gender identity and expression,
8+
level of experience, education, socio-economic status, nationality, personal appearance,
9+
race, religion, or sexual identity and orientation.
1110

12-
We pledge to act and interact in ways that contribute to an open, welcoming,
13-
diverse, inclusive, and healthy community.
11+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse,
12+
inclusive, and healthy community.
1413

1514
## Our Standards
1615

17-
Examples of behavior that contributes to a positive environment for our
18-
community include:
16+
Examples of behavior that contributes to a positive environment for our community
17+
include:
1918

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
24-
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
26-
overall community
19+
- Demonstrating empathy and kindness toward other people
20+
- Being respectful of differing opinions, viewpoints, and experiences
21+
- Giving and gracefully accepting constructive feedback
22+
- Accepting responsibility and apologizing to those affected by our mistakes, and
23+
learning from the experience
24+
- Focusing on what is best not just for us as individuals, but for the overall community
2725

2826
Examples of unacceptable behavior include:
2927

30-
* The use of sexualized language or imagery, and sexual attention or
31-
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
35-
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
37-
professional setting
28+
- The use of sexualized language or imagery, and sexual attention or advances of any
29+
kind
30+
- Trolling, insulting or derogatory comments, and personal or political attacks
31+
- Public or private harassment
32+
- Publishing others' private information, such as a physical or email address, without
33+
their explicit permission
34+
- Other conduct which could reasonably be considered inappropriate in a professional
35+
setting
3836

3937
## Enforcement Responsibilities
4038

4139
Community leaders are responsible for clarifying and enforcing our standards of
42-
acceptable behavior and will take appropriate and fair corrective action in
43-
response to any behavior that they deem inappropriate, threatening, offensive,
44-
or harmful.
40+
acceptable behavior and will take appropriate and fair corrective action in response to
41+
any behavior that they deem inappropriate, threatening, offensive, or harmful.
4542

46-
Community leaders have the right and responsibility to remove, edit, or reject
47-
comments, commits, code, wiki edits, issues, and other contributions that are
48-
not aligned to this Code of Conduct, and will communicate reasons for moderation
49-
decisions when appropriate.
43+
Community leaders have the right and responsibility to remove, edit, or reject comments,
44+
commits, code, wiki edits, issues, and other contributions that are not aligned to this
45+
Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
5046

5147
## Scope
5248

53-
This Code of Conduct applies within all community spaces, and also applies when
54-
an individual is officially representing the community in public spaces.
55-
Examples of representing our community include using an official e-mail address,
56-
posting via an official social media account, or acting as an appointed
57-
representative at an online or offline event.
49+
This Code of Conduct applies within all community spaces, and also applies when an
50+
individual is officially representing the community in public spaces. Examples of
51+
representing our community include using an official e-mail address, posting via an
52+
official social media account, or acting as an appointed representative at an online or
53+
offline event.
5854

5955
## Enforcement
6056

61-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62-
reported to the community leaders responsible for enforcement at
63-
engeir@pm.me.
64-
All complaints will be reviewed and investigated promptly and fairly.
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to
58+
the community leaders responsible for enforcement at engeir@pm.me. All complaints will
59+
be reviewed and investigated promptly and fairly.
6560

66-
All community leaders are obligated to respect the privacy and security of the
67-
reporter of any incident.
61+
All community leaders are obligated to respect the privacy and security of the reporter
62+
of any incident.
6863

6964
## Enforcement Guidelines
7065

71-
Community leaders will follow these Community Impact Guidelines in determining
72-
the consequences for any action they deem in violation of this Code of Conduct:
66+
Community leaders will follow these Community Impact Guidelines in determining the
67+
consequences for any action they deem in violation of this Code of Conduct:
7368

7469
### 1. Correction
7570

7671
**Community Impact**: Use of inappropriate language or other behavior deemed
7772
unprofessional or unwelcome in the community.
7873

79-
**Consequence**: A private, written warning from community leaders, providing
80-
clarity around the nature of the violation and an explanation of why the
81-
behavior was inappropriate. A public apology may be requested.
74+
**Consequence**: A private, written warning from community leaders, providing clarity
75+
around the nature of the violation and an explanation of why the behavior was
76+
inappropriate. A public apology may be requested.
8277

8378
### 2. Warning
8479

85-
**Community Impact**: A violation through a single incident or series
86-
of actions.
80+
**Community Impact**: A violation through a single incident or series of actions.
8781

88-
**Consequence**: A warning with consequences for continued behavior. No
89-
interaction with the people involved, including unsolicited interaction with
90-
those enforcing the Code of Conduct, for a specified period of time. This
91-
includes avoiding interactions in community spaces as well as external channels
92-
like social media. Violating these terms may lead to a temporary or
93-
permanent ban.
82+
**Consequence**: A warning with consequences for continued behavior. No interaction with
83+
the people involved, including unsolicited interaction with those enforcing the Code of
84+
Conduct, for a specified period of time. This includes avoiding interactions in
85+
community spaces as well as external channels like social media. Violating these terms
86+
may lead to a temporary or permanent ban.
9487

9588
### 3. Temporary Ban
9689

97-
**Community Impact**: A serious violation of community standards, including
98-
sustained inappropriate behavior.
90+
**Community Impact**: A serious violation of community standards, including sustained
91+
inappropriate behavior.
9992

100-
**Consequence**: A temporary ban from any sort of interaction or public
101-
communication with the community for a specified period of time. No public or
102-
private interaction with the people involved, including unsolicited interaction
103-
with those enforcing the Code of Conduct, is allowed during this period.
104-
Violating these terms may lead to a permanent ban.
93+
**Consequence**: A temporary ban from any sort of interaction or public communication
94+
with the community for a specified period of time. No public or private interaction with
95+
the people involved, including unsolicited interaction with those enforcing the Code of
96+
Conduct, is allowed during this period. Violating these terms may lead to a permanent
97+
ban.
10598

10699
### 4. Permanent Ban
107100

108-
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
110-
individual, or aggression toward or disparagement of classes of individuals.
101+
**Community Impact**: Demonstrating a pattern of violation of community standards,
102+
including sustained inappropriate behavior, harassment of an individual, or aggression
103+
toward or disparagement of classes of individuals.
111104

112-
**Consequence**: A permanent ban from any sort of public interaction within
113-
the community.
105+
**Consequence**: A permanent ban from any sort of public interaction within the
106+
community.
114107

115108
## Attribution
116109

117-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118-
version 2.0, available at
119-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
110+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
111+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120112

121-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122-
enforcement ladder](https://github.com/mozilla/diversity).
113+
Community Impact Guidelines were inspired by
114+
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
123115

124116
[homepage]: https://www.contributor-covenant.org
125117

TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ authors:
1414

1515
![](https://via.placeholder.com/1280x480)
1616

17+
<!-- dprint-ignore-start -->
1718
||| :timer_clock: Tid
1819
65 min
1920
||| :knife_fork_plate: Porsjoner
2021
2
2122
||| :cook: Vanskelighetsgrad
2223
Medium
2324
|||
25+
<!-- dprint-ignore-end -->
2426

2527
## Ingredienser
2628

dprint.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"json": {
3+
"indentWidth": 2,
4+
"associations": ["**/*.avsc"]
5+
},
6+
"markdown": {
7+
"lineWidth": 88,
8+
"textWrap": "always"
9+
},
10+
"toml": {},
11+
"excludes": ["**/*-lock.json"],
12+
"plugins": [
13+
"https://plugins.dprint.dev/json-0.19.2.wasm",
14+
"https://plugins.dprint.dev/markdown-0.16.4.wasm",
15+
"https://plugins.dprint.dev/toml-0.6.1.wasm"
16+
]
17+
}

src/bakst/bananbrod.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ authors:
1616

1717
![](/static/bananbrod/bananbrod-banner.webp)
1818

19+
<!-- dprint-ignore-start -->
1920
||| :timer_clock: Tid
2021
45 mins
2122
||| :knife_fork_plate: Porsjoner
2223
2 brød
2324
||| :cook: Vanskelighetsgrad
2425
Lett
2526
|||
27+
<!-- dprint-ignore-end -->
2628

2729
## Ingredienser
2830

@@ -46,11 +48,14 @@ Lett
4648
4. Smelt smør i en liten kjele, hell i melk og bland det deretter i bollen.
4749
5. Bland inn mel, natron og bakepulver til en jevn og fin røre.
4850

51+
<!-- dprint-ignore-start -->
4952
!!!success Tips
5053
Hakk f.eks. noe sjokoladebiter eller annet som frister og ha det i brødet.
5154
!!!
55+
<!-- dprint-ignore-end -->
5256

53-
6. Hell røren over i en form på ca. 1.5 liter, og sett formen på nederste rille i ovnen i omlag 35 min.
57+
6. Hell røren over i en form på ca. 1.5 liter, og sett formen på nederste rille i ovnen
58+
i omlag 35 min.
5459
7. Ta brødet ut av formen og avkjøl på rist.
5560

5661
![Ferdige bananbrød, klare for avkjøling](/static/bananbrod/bananbrod-ovn.webp)

src/bakst/bananpannekaker.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ category:
1111

1212
# Bananpannekaker
1313

14+
<!-- dprint-ignore-start -->
1415
||| :timer_clock: Tid
1516
20 mins
1617
||| :knife_fork_plate: Porsjoner
1718
2
1819
||| :cook: Vanskelighetsgrad
1920
Lett
2021
|||
22+
<!-- dprint-ignore-end -->
2123

2224
## Ingredienser
2325

src/bakst/tante-wallys-hveteboller.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ authors:
1111

1212
# Tante Wallys hveteboller
1313

14+
<!-- dprint-ignore-start -->
1415
||| :timer_clock: Tid
1516
120 min
1617
||| :knife_fork_plate: Porsjoner
1718
ca. 20 boller
1819
||| :cook: Vanskelighetsgrad
1920
Lett
2021
|||
22+
<!-- dprint-ignore-end -->
2123

2224
## Ingredienser
2325

src/blog/2022-5-24-hvordan-bidra.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ En ny oppskrift kan legges til ved å opprette en ny fil i en eksisterende eller
1313
mappe.
1414

1515
Nye filer __ ha filendelsen `.md`, og filnavnet må være uten mellomrom (bruk heller
16-
bindestrek, `-`) og kun med små bokstaver, også kjent som [kebab
17-
case](https://en.wikipedia.org/wiki/Letter_case#Kebab_case).
16+
bindestrek, `-`) og kun med små bokstaver, også kjent som
17+
[kebab case](https://en.wikipedia.org/wiki/Letter_case#Kebab_case).
1818

1919
La oss si at du ønsker å legge til en bolleoppskrift. Da oppretter du en ny fil i mappen
2020
`bakst` og kaller den for eksempel `ferske-boller.md`. Kopier innholdet i
21-
[TEMPLATE.md](https://github.com/engeir/simple-recipes-cookbook/blob/main/TEMPLATE.md?plain=1) inn i
22-
`ferske-boller.md`, og rediger etter eget ønske.
21+
[TEMPLATE.md](https://github.com/engeir/simple-recipes-cookbook/blob/main/TEMPLATE.md?plain=1)
22+
inn i `ferske-boller.md`, og rediger etter eget ønske.
2323

2424
Filstrukturen du ønsker å legge til filer i ser omlag slik ut, før og etter:
2525

src/dessert/hello-world.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ foo: "baz"
1919

2020
![](/static/hello-world-kake/hello-world-fin.webp)
2121

22+
<!-- dprint-ignore-start -->
2223
||| :icon-clock: Time
2324
35 mins
2425
||| :timer_clock: Preparations
2526
60 mins
2627
||| :cook: Cooking
2728
10 min
2829
|||
30+
<!-- dprint-ignore-end -->
2931

3032
Du kan se det endelige resultatet i bildet over, og under er et bildet av kakemassen før
3133
den gikk i forma. Den var ikke helt konge, men smakte helt greit. Man kan nok helt fint

src/dessert/kake-sjokolade-og-kaffe.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ authors:
1616

1717
![](/static/kake-sjokolade-og-kaffe/kake-sjokolade-og-kaffe.webp)
1818

19+
<!-- dprint-ignore-start -->
1920
||| :timer_clock: Tid
2021
60 min
2122
||| :knife_fork_plate: Porsjoner
2223
1 langpanne
2324
||| :cook: Vanskelighetsgrad
2425
Medium
2526
|||
27+
<!-- dprint-ignore-end -->
2628

2729
## Ingredienser
2830

0 commit comments

Comments
 (0)