You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -254,7 +254,7 @@ These rules relate to security vulnerabilities in Svelte code:
254
254
| Rule ID | Description ||
255
255
|:--------|:------------|:---|
256
256
|[@ota-meshi/svelte/no-at-html-tags](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-at-html-tags.html)| disallow use of `{@html}` to prevent XSS attack |:star:|
257
-
|[@ota-meshi/svelte/no-target-blank](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-target-blank.html)| disallow target="_blank" attribute without rel="noopener noreferrer" ||
257
+
|[@ota-meshi/svelte/no-target-blank](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-target-blank.html)| disallow `target="_blank"` attribute without `rel="noopener noreferrer"`||
258
258
259
259
## Best Practices
260
260
@@ -276,6 +276,7 @@ These rules relate to style guidelines, and are therefore quite subjective:
|[@ota-meshi/svelte/max-attributes-per-line](https://ota-meshi.github.io/eslint-plugin-svelte/rules/max-attributes-per-line.html)| enforce the maximum number of attributes per line |:wrench:|
278
278
|[@ota-meshi/svelte/prefer-class-directive](https://ota-meshi.github.io/eslint-plugin-svelte/rules/prefer-class-directive.html)| require class directives instead of ternary expressions |:wrench:|
279
+
|[@ota-meshi/svelte/shorthand-attribute](https://ota-meshi.github.io/eslint-plugin-svelte/rules/shorthand-attribute.html)| enforce use of shorthand syntax in attribute |:wrench:|
279
280
|[@ota-meshi/svelte/spaced-html-comment](https://ota-meshi.github.io/eslint-plugin-svelte/rules/spaced-html-comment.html)| enforce consistent spacing after the `<!--` and before the `-->` in a HTML comment |:wrench:|
|[@ota-meshi/svelte/max-attributes-per-line](./max-attributes-per-line.md)| enforce the maximum number of attributes per line |:wrench:|
48
48
|[@ota-meshi/svelte/prefer-class-directive](./prefer-class-directive.md)| require class directives instead of ternary expressions |:wrench:|
49
+
|[@ota-meshi/svelte/shorthand-attribute](./shorthand-attribute.md)| enforce use of shorthand syntax in attribute |:wrench:|
49
50
|[@ota-meshi/svelte/spaced-html-comment](./spaced-html-comment.md)| enforce consistent spacing after the `<!--` and before the `-->` in a HTML comment |:wrench:|
@@ -40,6 +41,8 @@ This rule enforces the quotes style of HTML attributes.
40
41
<img src="{src}" alt='{name} dances.' />
41
42
```
42
43
44
+
<!-- prettier-ignore-end -->
45
+
43
46
</eslint-code-block>
44
47
45
48
## :wrench: Options
@@ -59,7 +62,7 @@ This rule enforces the quotes style of HTML attributes.
59
62
}
60
63
```
61
64
62
-
-`prefer` ... If `"double"`, requires double quotes. If `"single"` requires single quotes.
65
+
-`prefer` ... If `"double"`, requires double quotes. If `"single"`, requires single quotes.
63
66
-`dynamic` ... Settings for dynamic attribute values and directive values using curly braces.
64
67
-`quoted` ... If `true`, enforce the use of quotes. If `false`, do not allow the use of quotes. The default is `false`.
65
68
-`avoidInvalidUnquotedInHTML` ... If `true`, enforces the use of quotes if they are invalid as HTML attribute when not using quotes. The default is `false`.
description: "enforce use of shorthand syntax in attribute"
6
+
---
7
+
8
+
# @ota-meshi/svelte/shorthand-attribute
9
+
10
+
> enforce use of shorthand syntax in attribute
11
+
12
+
-:exclamation: <badgetext="This rule has not been released yet."vertical="middle"type="error"> **_This rule has not been released yet._** </badge>
13
+
-:wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
14
+
15
+
## :book: Rule Details
16
+
17
+
This rule enforces the use of the shorthand syntax in attribute.
0 commit comments