Skip to content

Commit 374c336

Browse files
committed
chore: add lint script to docs
1 parent dcbf1d8 commit 374c336

File tree

14 files changed

+105
-58
lines changed

14 files changed

+105
-58
lines changed

packages/docs/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
.astro
3+
node_modules
4+
package.json

packages/docs/.prettierrc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"singleQuote": true,
3-
"quoteProps": "as-needed",
4-
"trailingComma": "all",
5-
"bracketSpacing": true,
6-
"arrowParens": "always",
7-
"semi": true,
8-
"useTabs": true,
9-
"tabWidth": 4,
10-
"svelteSortOrder": "scripts-options-markup-styles",
11-
"svelteAllowShorthand": true,
12-
"svelteBracketNewLine": false,
13-
"svelteIndentScriptAndStyle": true
14-
}
2+
"singleQuote": true,
3+
"quoteProps": "as-needed",
4+
"trailingComma": "all",
5+
"bracketSpacing": true,
6+
"arrowParens": "always",
7+
"semi": true,
8+
"useTabs": true,
9+
"tabWidth": 4,
10+
"svelteSortOrder": "scripts-options-markup-styles",
11+
"svelteAllowShorthand": true,
12+
"svelteBracketNewLine": false,
13+
"svelteIndentScriptAndStyle": true
14+
}

packages/docs/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"build": "astro build",
99
"preview": "astro preview",
1010
"astro": "astro",
11-
"check": "astro check"
11+
"check": "astro check",
12+
"lint": "prettier --check .",
13+
"format": "prettier --write ."
1214
},
1315
"devDependencies": {
1416
"@astrojs/check": "^0.9.4",
@@ -17,6 +19,9 @@
1719
"astro": "^4.16.12",
1820
"css-tree": "^3.0.1",
1921
"klona": "^2.0.6",
22+
"prettier": "^3.3.3",
23+
"prettier-plugin-astro": "^0.14.1",
24+
"prettier-plugin-svelte": "^3.2.8",
2025
"sharp": "^0.33.5",
2126
"starlight-links-validator": "^0.13.2",
2227
"svelte": "^5.2.0",

packages/docs/src/content/docs/components/image/configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ a background, or an object, which can take the following options:
498498
{
499499
prop: 'seed',
500500
type: 'number',
501-
example: () => (<code>3</code>),
501+
example: () => <code>3</code>,
502502
},
503503
]}
504504
/>

packages/docs/src/content/docs/guides/custom-domain.mdx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: "Adding a Custom Domain"
2+
title: 'Adding a Custom Domain'
33
---
44

5-
Enhance the delivery of your media assets by integrating svelte-cloudinary with a [private CDN and/or custom domain](https://cloudinary.com/documentation/advanced_url_delivery_options#private_cdns_and_custom_delivery_hostnames_cnames).
5+
Enhance the delivery of your media assets by integrating svelte-cloudinary with a [private CDN and/or custom domain](https://cloudinary.com/documentation/advanced_url_delivery_options#private_cdns_and_custom_delivery_hostnames_cnames).
66

77
:::note
88
**Private CDN** and **Custom Domain** features are available exclusively on [Cloudinary's Advanced plan](https://cloudinary.com/pricing).
9-
:::
9+
:::
1010

1111
## Step-by-Step Configuration
1212

@@ -23,10 +23,11 @@ npm install svelte-cloudinary
2323
Create a `.env` file in your project root (if it doesn't exist already) and add the following variables:
2424

2525
```bash
26-
VITE_CLOUDINARY_CLOUD_NAME="your_cloud_name"
27-
VITE_CLOUDINARY_PRIVATE_CDN="true"
28-
VITE_CLOUDINARY_SECURE_DISTRIBUTION="your-custom-domain.com"
26+
VITE_CLOUDINARY_CLOUD_NAME="your_cloud_name"
27+
VITE_CLOUDINARY_PRIVATE_CDN="true"
28+
VITE_CLOUDINARY_SECURE_DISTRIBUTION="your-custom-domain.com"
2929
```
30+
3031
Replace your_cloud_name with your actual Cloudinary cloud name and your-custom-domain.com with your custom domain. Read more about [configuring svelte-cloudinary here](https://svelte.cloudinary.dev/config).
3132

3233
:::caution
@@ -43,7 +44,7 @@ With the configuration in place, use the `<CldImage />` component to serve image
4344
</script>
4445
4546
<CldImage
46-
src="<Your Public ID>"
47+
src="<Your Public ID>"
4748
alt="Sample Image"
4849
width="800"
4950
height="600"
@@ -52,7 +53,7 @@ With the configuration in place, use the `<CldImage />` component to serve image
5253

5354
This setup ensures that the image URL follows your custom domain structure:
5455

55-
- **Before:** `https://res.cloudinary.com/your_cloud_name/image/upload/sample.jpg`
56-
- **After:** `https://your-custom-domain.com/image/upload/sample.jpg`
56+
- **Before:** `https://res.cloudinary.com/your_cloud_name/image/upload/sample.jpg`
57+
- **After:** `https://your-custom-domain.com/image/upload/sample.jpg`
5758

58-
Learn more about setting up CNAME records on the [Cloudinary docs](https://cloudinary.com/documentation/advanced_url_delivery_options#private_cdns_and_custom_delivery_hostnames_cnames).
59+
Learn more about setting up CNAME records on the [Cloudinary docs](https://cloudinary.com/documentation/advanced_url_delivery_options#private_cdns_and_custom_delivery_hostnames_cnames).

packages/docs/src/content/docs/helpers/getcldimageurl/configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ a background, or an object, which can take the following options:
469469
{
470470
prop: 'seed',
471471
type: 'number',
472-
example: () => (<code>3</code>),
472+
example: () => <code>3</code>,
473473
},
474474
]}
475475
/>

packages/docs/src/content/docs/helpers/getcldimageurl/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ const url = getCldImageUrl({
1515
src: 'images/turtle',
1616
height: 600,
1717
width: 960,
18-
})
18+
});
1919
```

packages/docs/src/content/docs/helpers/getcldogimageurl/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ import { getCldOgImageUrl } from 'svelte-cloudinary';
1313

1414
const url = getCldOgImageUrl({
1515
src: 'images/turtle',
16-
})
16+
});
1717
```

packages/docs/src/content/docs/index.mdx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,10 @@ import { CardGrid, Card } from '@astrojs/starlight/components';
3030
<Card title="Social Cards" icon="comment">
3131
Easiest way to create beautiful social cards in Svelte.
3232
</Card>
33-
<Card title="And More..." icon="list-format">
34-
- Adaptive Bitrate Streaming
35-
- Generative AI
36-
- Text & Image Overlays
37-
- ...
38-
</Card>
33+
<Card title="And More..." icon="list-format">
34+
- Adaptive Bitrate Streaming - Generative AI - Text & Image Overlays -
35+
...
36+
</Card>
3937
</CardGrid>
4038

41-
<center>
42-
### Transform & Deliver at Scale with Cloudinary
43-
</center>
39+
<center>### Transform & Deliver at Scale with Cloudinary</center>

packages/docs/src/content/docs/missing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
title: 'Missing Page!'
33
---
44

5-
This page hasn't been ported over to v2 yet - you can check [the GitHub](https://github.com/cloudinary-community/svelte-cloudinary/issues) for updates.
5+
This page hasn't been ported over to v2 yet - you can check [the GitHub](https://github.com/cloudinary-community/svelte-cloudinary/issues) for updates.

0 commit comments

Comments
 (0)