File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-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 ESLint Svelte parser.
17+
18+ <!-- eslint-skip-->
19+
20+ ``` svelte
21+ <!-- ✓ GOOD -->
22+ <style>
23+ .class {
24+ font-weight: bold;
25+ }
26+ </style>
27+
28+ <style lang="scss">
29+ .class {
30+ font-weight: bold;
31+ }
32+ </style>
33+
34+ <!-- ✗ BAD -->
35+ <style>
36+ .class
37+ font-weight: bold;
38+ </style>
39+
40+ <style lang="unknown">
41+ .class {
42+ font-weight: bold;
43+ }
44+ </style>
45+ ```
46+
47+ ## :wrench : Options
48+
49+ ``` json
50+ {
51+ "svelte/valid-style-parse" : [" error" , {}]
52+ }
53+ ```
54+
55+ ## :mag : Implementation
56+
57+ - [ Rule source] ( https://github.com/sveltejs/eslint-plugin-svelte/blob/main/packages/eslint-plugin-svelte/src/rules/valid-style-parse.ts )
58+ - [ 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