Skip to content

Commit 8067252

Browse files
authored
chore: run prettier (#32)
* chore: run prettier * chore: add mdx to list of recommneded extension * chore: setup format on save and use prettier for mdx * chore: handle html whitespace properly
1 parent 6801afa commit 8067252

27 files changed

+297
-227
lines changed

.devcontainer/devcontainer.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
33
{
4-
"name": "Node.js",
5-
"image": "mcr.microsoft.com/devcontainers/javascript-node:16-bullseye"
4+
"name": "Node.js",
5+
"image": "mcr.microsoft.com/devcontainers/javascript-node:16-bullseye"
66

7-
// Features to add to the dev container. More info: https://containers.dev/features.
8-
// "features": {},
7+
// Features to add to the dev container. More info: https://containers.dev/features.
8+
// "features": {},
99

10-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
11-
// "forwardPorts": [],
10+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
11+
// "forwardPorts": [],
1212

13-
// Use 'postCreateCommand' to run commands after the container is created.
14-
// "postCreateCommand": "yarn install",
13+
// Use 'postCreateCommand' to run commands after the container is created.
14+
// "postCreateCommand": "yarn install",
1515

16-
// Configure tool-specific properties.
17-
// "customizations": {},
16+
// Configure tool-specific properties.
17+
// "customizations": {},
1818

19-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
20-
// "remoteUser": "root"
19+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
20+
// "remoteUser": "root"
2121
}

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.prettierrc.cjs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
module.exports = {
2-
plugins: [require.resolve('prettier-plugin-astro')],
3-
overrides: [
4-
{
5-
files: '*.astro',
6-
options: {
7-
parser: 'astro',
8-
},
2+
plugins: [require.resolve("prettier-plugin-astro")],
3+
overrides: [
4+
{
5+
files: "*.astro",
6+
options: {
7+
parser: "astro",
8+
// ensure HTML tag breaks properly
9+
htmlWhitespaceSensitivity: "ignore",
910
},
10-
],
11-
};
11+
},
12+
],
13+
};

.vscode/extensions.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2-
"recommendations": ["astro-build.astro-vscode", "esbenp.prettier-vscode"],
2+
"recommendations": [
3+
"astro-build.astro-vscode",
4+
"esbenp.prettier-vscode",
5+
"unifiedjs.vscode-mdx"
6+
],
37
"unwantedRecommendations": []
48
}

.vscode/settings.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55
"deno.importMap": ".netlify/edge-functions-import-map.json",
66
"deno.path": "/home/codespace/.config/netlify/deno-cli/deno",
77
"prettier.documentSelectors": ["**/*.astro"],
8-
"[astro]": {
8+
"[astro]": {
99
"editor.defaultFormatter": "esbenp.prettier-vscode"
10+
},
11+
"[mdx]": {
12+
"editor.defaultFormatter": "esbenp.prettier-vscode"
13+
},
14+
"editor.formatOnSave": true,
15+
"editor.formatOnSaveMode": "file",
16+
"editor.codeActionsOnSave": {
17+
"source.organizeImports": true
1018
}
1119
}

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

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,
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,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
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
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
3535
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Enforcement Responsibilities
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
106106
### 4. Permanent Ban
107107

108108
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
110110
individual, or aggression toward or disparagement of classes of individuals.
111111

112112
**Consequence**: A permanent ban from any sort of public interaction within

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Angular Snippets
2+
23
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4+
35
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
6+
47
<!-- ALL-CONTRIBUTORS-BADGE:END -->
58

69
A website to find and share code snippets for Angular.

src/components/BlogCard.astro

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ url = url + "/";
1919
<li
2020
class="flex flex-col leading-relaxed rounded-2xl border border-zinc-900/10 dark:border-zinc-700/40 hover:dark:bg-zinc-800/20 hover:bg-zinc-200/20 dark:text-zinc-400"
2121
>
22-
<a
23-
class="flex flex-col gap-2 sm:gap-4 pt-5 px-5 pb-8"
24-
href={url}
25-
>
22+
<a class="flex flex-col gap-2 sm:gap-4 pt-5 px-5 pb-8" href={url}>
2623
<time class="shrink-0 text-base sm:hidden">{shortDate}</time>
2724
<span class="flex items-center justify-between mb-1">
2825
<h2 class="text-xl font-medium text-black dark:text-white">{title}</h2>

src/components/BlogImage.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ const { src, alt, loading = "lazy" } = Astro.props;
1515
loading={loading}
1616
alt={alt}
1717
class="rounded-xl overflow-hidden"
18-
/>
18+
/>

src/components/Footer.astro

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
<footer class="mx-auto text-sm px-8 pt-8 pb-12 text-gray-500 dark:text-gray-400 max-w-7xl text-right">
2-
An open source project created by Santhosh Yadav.
3-
</footer>
1+
<footer
2+
class="mx-auto text-sm px-8 pt-8 pb-12 text-gray-500 dark:text-gray-400 max-w-7xl text-right"
3+
>
4+
An open source project created by Santhosh Yadav.
5+
</footer>

0 commit comments

Comments
 (0)