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
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -244,8 +244,9 @@ Example **.vscode/settings.json**:
244
244
245
245
<!--RULES_SECTION_START-->
246
246
247
-
The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) automatically fixes problems reported by rules which have a wrench :wrench: below.
248
-
The rules with the following star :star: are included in the configs.
247
+
:wrench: Indicates that the rule is fixable, and using `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.
248
+
:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
249
+
:star: Indicates that the rule is included in the `plugin:svelte/recommended` config.
249
250
250
251
<!--RULES_TABLE_START-->
251
252
@@ -281,7 +282,7 @@ These rules relate to better ways of doing things to help you avoid problems:
281
282
|:--------|:------------|:---|
282
283
|[svelte/button-has-type](https://ota-meshi.github.io/eslint-plugin-svelte/rules/button-has-type/)| disallow usage of button without an explicit type attribute ||
283
284
|[svelte/no-at-debug-tags](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-at-debug-tags/)| disallow the use of `{@debug}`|:star:|
284
-
|[svelte/no-reactive-literals](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-reactive-literals/)| Don't assign literal values in reactive statements ||
285
+
|[svelte/no-reactive-literals](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-reactive-literals/)| Don't assign literal values in reactive statements |:bulb:|
|[svelte/require-optimized-style-attribute](https://ota-meshi.github.io/eslint-plugin-svelte/rules/require-optimized-style-attribute/)| require style attributes that can be optimized ||
@@ -298,7 +299,7 @@ These rules relate to style guidelines, and are therefore quite subjective:
|[svelte/max-attributes-per-line](https://ota-meshi.github.io/eslint-plugin-svelte/rules/max-attributes-per-line/)| enforce the maximum number of attributes per line |:wrench:|
300
301
|[svelte/mustache-spacing](https://ota-meshi.github.io/eslint-plugin-svelte/rules/mustache-spacing/)| enforce unified spacing in mustache |:wrench:|
301
-
|[svelte/no-extra-reactive-curlies](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-extra-reactive-curlies/)| disallow wrapping single reactive statements in curly braces ||
302
+
|[svelte/no-extra-reactive-curlies](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-extra-reactive-curlies/)| disallow wrapping single reactive statements in curly braces |:bulb:|
302
303
|[svelte/no-spaces-around-equal-signs-in-attribute](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-spaces-around-equal-signs-in-attribute/)| disallow spaces around equal signs in attribute |:wrench:|
303
304
|[svelte/prefer-class-directive](https://ota-meshi.github.io/eslint-plugin-svelte/rules/prefer-class-directive/)| require class directives instead of ternary expressions |:wrench:|
304
305
|[svelte/prefer-style-directive](https://ota-meshi.github.io/eslint-plugin-svelte/rules/prefer-style-directive/)| require style directives instead of style attribute |:wrench:|
Copy file name to clipboardExpand all lines: docs/rules.md
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,9 @@ sidebarDepth: 0
4
4
5
5
# Available Rules
6
6
7
-
The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) automatically fixes problems reported by rules which have a wrench :wrench: below.
8
-
The rules with the following star :star: are included in the `plugin:svelte/recommended` config.
7
+
:wrench: Indicates that the rule is fixable, and using `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.
8
+
:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
9
+
:star: Indicates that the rule is included in the `plugin:svelte/recommended` config.
9
10
10
11
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->
11
12
@@ -41,7 +42,7 @@ These rules relate to better ways of doing things to help you avoid problems:
41
42
|:--------|:------------|:---|
42
43
|[svelte/button-has-type](./rules/button-has-type.md)| disallow usage of button without an explicit type attribute ||
43
44
|[svelte/no-at-debug-tags](./rules/no-at-debug-tags.md)| disallow the use of `{@debug}`|:star:|
44
-
|[svelte/no-reactive-literals](./rules/no-reactive-literals.md)| Don't assign literal values in reactive statements ||
45
+
|[svelte/no-reactive-literals](./rules/no-reactive-literals.md)| Don't assign literal values in reactive statements |:bulb:|
|[svelte/max-attributes-per-line](./rules/max-attributes-per-line.md)| enforce the maximum number of attributes per line |:wrench:|
60
61
|[svelte/mustache-spacing](./rules/mustache-spacing.md)| enforce unified spacing in mustache |:wrench:|
61
-
|[svelte/no-extra-reactive-curlies](./rules/no-extra-reactive-curlies.md)| disallow wrapping single reactive statements in curly braces ||
62
+
|[svelte/no-extra-reactive-curlies](./rules/no-extra-reactive-curlies.md)| disallow wrapping single reactive statements in curly braces |:bulb:|
62
63
|[svelte/no-spaces-around-equal-signs-in-attribute](./rules/no-spaces-around-equal-signs-in-attribute.md)| disallow spaces around equal signs in attribute |:wrench:|
63
64
|[svelte/prefer-class-directive](./rules/prefer-class-directive.md)| require class directives instead of ternary expressions |:wrench:|
64
65
|[svelte/prefer-style-directive](./rules/prefer-style-directive.md)| require style directives instead of style attribute |:wrench:|
Copy file name to clipboardExpand all lines: docs/rules/no-extra-reactive-curlies.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ description: "disallow wrapping single reactive statements in curly braces"
10
10
> disallow wrapping single reactive statements in curly braces
11
11
12
12
-:exclamation: <badgetext="This rule has not been released yet."vertical="middle"type="error"> **_This rule has not been released yet._** </badge>
13
+
-:bulb: Some problems reported by this rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
> Don't assign literal values in reactive statements
11
11
12
12
-:exclamation: <badgetext="This rule has not been released yet."vertical="middle"type="error"> **_This rule has not been released yet._** </badge>
13
+
-:bulb: Some problems reported by this rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
13
14
14
15
## :book: Rule Details
15
16
@@ -23,18 +24,25 @@ This rule reports on any assignment of a static, unchanging value within a react
23
24
<script>
24
25
/* eslint svelte/no-reactive-literals: "error" */
25
26
/* ✓ GOOD */
26
-
let foo = "bar";
27
-
27
+
let foo = "bar"
28
+
28
29
/* ✗ BAD */
29
-
$: foo = "bar";
30
+
$: foo = "bar"
30
31
</script>
31
32
```
32
33
33
34
</ESLintCodeBlock>
34
35
35
36
## :wrench: Options
36
37
37
-
Nothing
38
+
Nothing.
39
+
40
+
## :heart: Compatibility
41
+
42
+
This rule was taken from [@tivac/eslint-plugin-svelte].
43
+
This rule is compatible with `@tivac/svelte/reactive-literals` rule.
Copy file name to clipboardExpand all lines: tools/update-docs-rules-index.ts
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,9 @@ sidebarDepth: 0
12
12
13
13
# Available Rules
14
14
15
-
The \`--fix\` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) automatically fixes problems reported by rules which have a wrench :wrench: below.
16
-
The rules with the following star :star: are included in the \`plugin:svelte/recommended\` config.
15
+
:wrench: Indicates that the rule is fixable, and using \`--fix\` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.
16
+
:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
17
+
:star: Indicates that the rule is included in the \`plugin:svelte/recommended\` config.
17
18
18
19
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->
Copy file name to clipboardExpand all lines: tools/update-docs.ts
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,7 @@ class DocFile {
64
64
const{
65
65
meta: {
66
66
fixable,
67
+
hasSuggestions,
67
68
deprecated,
68
69
replacedBy,
69
70
docs: { ruleId, description, recommended },
@@ -103,6 +104,11 @@ class DocFile {
103
104
"- :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.",
104
105
)
105
106
}
107
+
if(hasSuggestions){
108
+
notes.push(
109
+
"- :bulb: Some problems reported by this rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).",
110
+
)
111
+
}
106
112
if(!this.since){
107
113
notes.unshift(
108
114
`- :exclamation: <badge text="This rule has not been released yet." vertical="middle" type="error"> **_This rule has not been released yet._** </badge>`,
0 commit comments