File tree 1 file changed +74
-0
lines changed 1 file changed +74
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ pageClass : ' rule-details'
3
+ sidebarDepth : 0
4
+ title : ' svelte/valid-style-parse'
5
+ description : ' require valid style element parsing'
6
+ ---
7
+
8
+ # svelte/valid-style-parse
9
+
10
+ > require valid style element parsing
11
+
12
+ - :exclamation : <badge text =" This rule has not been released yet. " vertical =" middle " type =" error " > ** _ This rule has not been released yet._ ** </badge >
13
+
14
+ ## :book : Rule Details
15
+
16
+ This rule reports issues with parsing of the ` <style> ` element by the svelte-eslint-parser.
17
+
18
+ <!-- eslint-skip-->
19
+
20
+ ``` svelte
21
+ <script>
22
+ /* eslint svelte/valid-style-parse: ["error"] */
23
+ </script>
24
+ <!-- ✓ GOOD -->
25
+ <style>
26
+ .class {
27
+ font-weight: bold;
28
+ }
29
+ </style>
30
+ ```
31
+
32
+ ``` svelte
33
+ <script>
34
+ /* eslint svelte/valid-style-parse: ["error"] */
35
+ </script>
36
+ <!-- ✓ GOOD -->
37
+ <style lang="scss">
38
+ .class {
39
+ font-weight: bold;
40
+ }
41
+ </style>
42
+ ```
43
+
44
+ ``` svelte
45
+ <script>
46
+ /* eslint svelte/valid-style-parse: ["error"] */
47
+ </script>
48
+ <!-- ✗ BAD -->
49
+ <style>
50
+ .class
51
+ font-weight: bold;
52
+ </style>
53
+ ```
54
+
55
+ ``` svelte
56
+ <script>
57
+ /* eslint svelte/valid-style-parse: ["error"] */
58
+ </script>
59
+ <!-- ✗ BAD -->
60
+ <style lang="unknown">
61
+ .class {
62
+ font-weight: bold;
63
+ }
64
+ </style>
65
+ ```
66
+
67
+ ## :wrench : Options
68
+
69
+ Nothing.
70
+
71
+ ## :mag : Implementation
72
+
73
+ - [ Rule source] ( https://github.com/sveltejs/eslint-plugin-svelte/blob/main/packages/eslint-plugin-svelte/src/rules/valid-style-parse.ts )
74
+ - [ Test source] ( https://github.com/sveltejs/eslint-plugin-svelte/blob/main/packages/eslint-plugin-svelte/tests/src/rules/valid-style-parse.ts )
You can’t perform that action at this time.
0 commit comments