Skip to content

Commit a8d2b80

Browse files
authored
Docs: formatting (#1616)
format mdx with Prettier
1 parent 1312a4b commit a8d2b80

38 files changed

+37
-54
lines changed

.prettierignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@ npm-debug.log*
2020
/test/**/*.html
2121
/test/**/*.xml
2222

23-
# CHANGELOG.md will be generated by semantic-release
24-
CHANGELOG.md
23+
changelog.mdx
2524

2625
# Report created by test
2726
report.html
2827

2928
# Miscellaneous
3029
CODEOWNERS
31-
*.mdx
3230
*.txt
3331

3432
## Website

.prettierrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"semi": false,
33
"singleQuote": true,
44
"bracketSpacing": true,
5+
"embeddedLanguageFormatting": "off",
56
"trailingComma": "es5",
67
"useTabs": false,
78
"tabWidth": 2,

website/.htmlhintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"attr-whitespace": false,
1212
"doctype-first": false,
1313
"doctype-html5": true,
14+
"h1-require": true,
1415
"head-script-disabled": false,
1516
"href-abs-or-rel": false,
1617
"html-lang-require": true,
@@ -20,6 +21,7 @@
2021
"inline-script-disabled": false,
2122
"inline-style-disabled": false,
2223
"input-requires-label": false,
24+
"main-require": true,
2325
"script-disabled": false,
2426
"space-tab-mixed-disabled": false,
2527
"spec-char-escape": false,

website/src/content/docs/rules/alt-require.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ keywords:
1010

1111
import { Badge } from '@astrojs/starlight/components';
1212

13-
1413
Alt of `img` must be present and alt of `area[href]` and `input[type=image]` must be set with a value.
1514

1615
Level: <Badge text="Warning" variant="caution" />

website/src/content/docs/rules/attr-lowercase.mdx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ description: Enforces all attribute names in HTML to be lowercase for consistenc
66

77
import { Badge } from '@astrojs/starlight/components';
88

9-
109
Attribute name must be lowercase.
1110

1211
Level: <Badge text="Error" variant="danger" />
@@ -27,7 +26,6 @@ Level: <Badge text="Error" variant="danger" />
2726
}
2827
```
2928

30-
3129
### The following pattern is **not** considered a rule violation:
3230

3331
```html
@@ -37,7 +35,6 @@ Level: <Badge text="Error" variant="danger" />
3735
<svg width="200" height="200" viewBox="0 0 200 200" />
3836
```
3937

40-
4138
### The following pattern is considered a rule violation:
4239

4340
```html

website/src/content/docs/rules/attr-no-unnecessary-whitespace.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ id: attr-no-unnecessary-whitespace
33
title: attr-no-unnecessary-whitespace
44
description: Disallows unnecessary spaces between attribute names and values in HTML elements.
55
---
6+
67
import { Badge } from '@astrojs/starlight/components';
78

89
No spaces between attribute names and values.

website/src/content/docs/rules/attr-sorted.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ id: attr-sorted
33
title: attr-sorted
44
description: Enforces a specific order for attributes in HTML elements to improve readability and consistency.
55
---
6+
67
import { Badge } from '@astrojs/starlight/components';
78

89
Attributes should be sorted in the following order:
@@ -26,15 +27,12 @@ Level: <Badge text="Error" variant="danger" />
2627
1. true: enable rule
2728
2. false: disable rule
2829

29-
3030
### The following patterns are **not** considered rule violations:
3131

3232
```html
3333
<div img="image" meta="meta" font="font"></div>
3434
```
3535

36-
37-
3836
### The following pattern is considered a rule violation:
3937

4038
```html

website/src/content/docs/rules/attr-unsafe-chars.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ id: attr-unsafe-chars
33
title: attr-unsafe-chars
44
description: Disallows unsafe characters in attribute values to prevent rendering and security issues.
55
---
6+
67
import { Badge } from '@astrojs/starlight/components';
78

89
Attribute value cannot use unsafe chars.
@@ -16,7 +17,6 @@ Level: <Badge text="Warning" variant="caution" />
1617
1. true: enable rule
1718
2. false: disable rule
1819

19-
2020
### The following patterns are **not** considered rule violations:
2121

2222
```html
@@ -25,7 +25,6 @@ Level: <Badge text="Warning" variant="caution" />
2525
</li>
2626
```
2727

28-
2928
### The following pattern is considered a rule violation:
3029

3130
```html

website/src/content/docs/rules/attr-value-double-quotes.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ id: attr-value-double-quotes
33
title: attr-value-double-quotes
44
description: Requires attribute values in HTML to be enclosed in double quotes for consistency and standards compliance.
55
---
6+
67
import { Badge } from '@astrojs/starlight/components';
78

89
Attribute value must closed by double quotes.
@@ -14,14 +15,12 @@ Level: <Badge text="Error" variant="danger" />
1415
1. true: enable rule
1516
2. false: disable rule
1617

17-
1818
### The following patterns are **not** considered rule violations:
1919

2020
```html
2121
<a href="" title="abc"></a>
2222
```
2323

24-
2524
### The following pattern is considered a rule violation:
2625

2726
```html

website/src/content/docs/rules/attr-value-not-empty.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ id: attr-value-not-empty
33
title: attr-value-not-empty
44
description: Ensures all attributes have non-empty values to prevent invalid or ambiguous HTML.
55
---
6+
67
import { Badge } from '@astrojs/starlight/components';
78

89
Attribute must set value.
@@ -20,7 +21,6 @@ Level: <Badge text="Warning" variant="caution" />
2021
<input type="button" disabled="disabled" />
2122
```
2223

23-
2424
### The following pattern is considered a rule violation:
2525

2626
```html

0 commit comments

Comments
 (0)