You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/block-lang.md
+4
Original file line number
Diff line number
Diff line change
@@ -64,13 +64,17 @@ This rule enforces all svelte components to use the same set of languages for th
64
64
"svelte/block-lang": [
65
65
"error",
66
66
{
67
+
"enforceScriptPresent": true,
68
+
"enforceStylePresent": false,
67
69
"script": ["ts", null], // a list of languages or null to signify no language specified
68
70
"style": "scss"// same as for script, a single value can be used instead of an array.
69
71
}
70
72
]
71
73
}
72
74
```
73
75
76
+
-`enforceScriptPresent` ... Whether to enforce the presence of a `<script>` block with one of the given languages. This may be useful as for example TypeScript checks some uses of a component if it is defined as being TypeScript. Default `false`.
77
+
-`enforceStylePresent` ... Whether to enforce the presence of a `<style>` block with one of the given languages. Default `false`.
74
78
-`script` ... A list of languages allowed for the `<script>` block. If `null` is included, no `lang` attribute is also allowed. A plain string or `null` can be used instead of one-item array. Default `null`.
75
79
-`style` ... A list of languages allowed for the `<style>` block. If `null` is included, no `lang` attribute is also allowed. A plain string or `null` can be used instead of one-item array. Default `null`.
0 commit comments