-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(valid-style-parse): documented the rule
- Loading branch information
1 parent
5837518
commit 50f5003
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
pageClass: 'rule-details' | ||
sidebarDepth: 0 | ||
title: 'svelte/valid-style-parse' | ||
description: 'require valid style element parsing' | ||
--- | ||
|
||
# svelte/valid-style-parse | ||
|
||
> require valid style element parsing | ||
- :exclamation: <badge text="This rule has not been released yet." vertical="middle" type="error"> **_This rule has not been released yet._** </badge> | ||
|
||
## :book: Rule Details | ||
|
||
This rule reports issues with parsing of the `<style>` element by the ESLint Svelte parser. | ||
|
||
<!--eslint-skip--> | ||
|
||
```svelte | ||
<!-- ✓ GOOD --> | ||
<style> | ||
.class { | ||
font-weight: bold; | ||
} | ||
</style> | ||
<style lang="scss"> | ||
.class { | ||
font-weight: bold; | ||
} | ||
</style> | ||
<!-- ✗ BAD --> | ||
<style> | ||
.class | ||
font-weight: bold; | ||
</style> | ||
<style lang="unknown"> | ||
.class { | ||
font-weight: bold; | ||
} | ||
</style> | ||
``` | ||
|
||
## :wrench: Options | ||
|
||
```json | ||
{ | ||
"svelte/valid-style-parse": ["error", {}] | ||
} | ||
``` | ||
|
||
## :mag: Implementation | ||
|
||
- [Rule source](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/packages/eslint-plugin-svelte/src/rules/valid-style-parse.ts) | ||
- [Test source](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/packages/eslint-plugin-svelte/tests/src/rules/valid-style-parse.ts) |