Skip to content

Commit

Permalink
docs(valid-style-parse): documented the rule
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Feb 5, 2025
1 parent 5837518 commit 50f5003
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions docs/rules/valid-style-parse.md
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)

0 comments on commit 50f5003

Please sign in to comment.