@@ -50,26 +50,43 @@ You can choose either two styles for elements without content
50
50
51
51
## :wrench : Options
52
52
53
+ presets:
54
+ ``` jsonc
55
+ {
56
+ " svelte/html-self-closing" : [
57
+ " error" ,
58
+ " all" , // or "html" or "none"
59
+ ]
60
+ }
61
+ ```
62
+
63
+ config object:
53
64
``` jsonc
54
65
{
55
66
" svelte/html-self-closing" : [
56
67
" error" ,
57
68
{
58
- " void" : " always" , // or "always " or "ignore"
69
+ " void" : " always" , // or "never " or "ignore"
59
70
" normal" : " always" , // or "never" or "ignore"
60
71
" component" : " always" , // or "never" or "ignore"
61
- " svelte" : " always" // or "never" or "ignore "
72
+ " svelte" : " always" // or "never" or "igore "
62
73
}
63
74
]
64
75
}
65
76
```
66
77
67
- - ` void ` (` "always" ` by default)... Style of HTML void elements
68
- - ` component ` (` "always" ` by default)... Style of svelte components
69
- - ` svelte ` (` "always" ` by default)... Style of svelte special elements (` <svelte:head> ` , ` <svelte:self> ` )
70
- - ` normal ` (` "always" ` by default)... Style of other elements
78
+ presets:
79
+ - ` all ` - all elements should be self closing (unless they have children)
80
+ - ` html ` - html-compliant - only void elements and svelte special elements should be self closing
81
+ - ` none ` - no elements should be self closing
82
+
83
+ config object:
84
+ - ` void ` (` "always" ` in default preset)... Style of HTML void elements
85
+ - ` component ` (` "always" ` in default preset)... Style of svelte components
86
+ - ` svelte ` (` "always" ` in default preset)... Style of svelte special elements (` <svelte:head> ` , ` <svelte:self> ` )
87
+ - ` normal ` (` "always" ` in default preset)... Style of other elements
71
88
72
- Every option can be set to
89
+ Every config oject option can be set to
73
90
- "always" (` <div /> ` )
74
91
- "never" (` <div></div> ` )
75
92
- "ignore" (either ` <div /> ` or ` <div></div> ` )
0 commit comments