Skip to content

Commit 125964c

Browse files
committed
Add changeset and prettier fixup on .md file.
1 parent d48f644 commit 125964c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/popular-hotels-invent.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-svelte": minor
3+
---
4+
5+
Added prefer option to prefer-class-directive rule ('always' or 'empty'). The default is now 'empty' which is a slight relaxation of the rule.

docs/rules/prefer-class-directive.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This rule aims to replace a class with ternary operator with the class directive
2727
</script>
2828
2929
<!-- ✓ GOOD -->
30-
<button class:selected={selected}>foo</button>
30+
<button class:selected>foo</button>
3131
<button class:selected={current === 'foo'}>foo</button>
3232
3333
<!-- ✗ BAD -->
@@ -55,8 +55,8 @@ You cannot enforce this style by using [prettier-plugin-svelte]. That is, this r
5555
```
5656

5757
- `prefer` ... Whether to apply this rule always or just when there's an empty string. Default is `"empty"`.
58-
- `"empty"` ... Requires class directives only if one of the strings is empty.
59-
- `"always"` ... Requires class directives always rather than interpolation.
58+
- `"empty"` ... Requires class directives only if one of the strings is empty.
59+
- `"always"` ... Requires class directives always rather than interpolation.
6060

6161
## :couple: Related Rules
6262

0 commit comments

Comments
 (0)