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
+37-12Lines changed: 37 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,30 @@ If you are using [eslint-plugin-svelte3] you need to remove it.
99
99
100
100
:::
101
101
102
+
#### settings["@ota-meshi/svelte"]
103
+
104
+
You can change the behavior of this plugin with some settings.
105
+
106
+
-`ignoreWarnings` (optional) ... Specifies an array of rules that ignore reports in the template.
107
+
For example, set rules on the template that cannot avoid false positives.
108
+
109
+
e.g.
110
+
111
+
```js
112
+
module.exports= {
113
+
// ...
114
+
settings: {
115
+
"@ota-meshi/svelte": {
116
+
ignoreWarnings: [
117
+
"@typescript-eslint/no-unsafe-assignment",
118
+
"@typescript-eslint/no-unsafe-member-access",
119
+
],
120
+
},
121
+
},
122
+
// ...
123
+
}
124
+
```
125
+
102
126
### Running ESLint from the command line
103
127
104
128
If you want to run `eslint` from the command line, make sure you include the `.svelte` extension using [the `--ext` option](https://eslint.org/docs/user-guide/configuring#specifying-file-extensions-to-lint) or a glob pattern, because ESLint targets only `.js` files by default.
@@ -138,18 +162,19 @@ The rules with the following star :star: are included in the configs.
138
162
139
163
<!--RULES_TABLE_START-->
140
164
141
-
| Rule ID | Description ||
142
-
|:--------|:------------|:---|
143
-
|[@ota-meshi/svelte/button-has-type](https://ota-meshi.github.io/eslint-plugin-svelte/rules/button-has-type.html)| disallow usage of button without an explicit type attribute ||
144
-
|[@ota-meshi/svelte/comment-directive](https://ota-meshi.github.io/eslint-plugin-svelte/rules/comment-directive.html)| support comment-directives in HTML template |:star:|
145
-
|[@ota-meshi/svelte/no-at-debug-tags](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-at-debug-tags.html)| disallow the use of `{@debug}`|:star:|
146
-
|[@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:|
|[@ota-meshi/svelte/no-inner-declarations](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-inner-declarations.html)| disallow variable or `function` declarations in nested blocks |:star:|
149
-
|[@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" ||
|[@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:|
152
-
|[@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/button-has-type](https://ota-meshi.github.io/eslint-plugin-svelte/rules/button-has-type.html)| disallow usage of button without an explicit type attribute ||
168
+
|[@ota-meshi/svelte/comment-directive](https://ota-meshi.github.io/eslint-plugin-svelte/rules/comment-directive.html)| support comment-directives in HTML template |:star:|
169
+
|[@ota-meshi/svelte/no-at-debug-tags](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-at-debug-tags.html)| disallow the use of `{@debug}`|:star:|
170
+
|[@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:|
|[@ota-meshi/svelte/no-inner-declarations](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-inner-declarations.html)| disallow variable or `function` declarations in nested blocks |:star:|
173
+
|[@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" ||
|[@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:|
176
+
|[@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:|
177
+
|[@ota-meshi/svelte/system](https://ota-meshi.github.io/eslint-plugin-svelte/rules/system.html)| system rule for working this plugin |:star:|
|[@ota-meshi/svelte/prefer-class-directive](./prefer-class-directive.md)| require class directives instead of ternary expressions |:wrench:|
23
23
|[@ota-meshi/svelte/spaced-html-comment](./spaced-html-comment.md)| enforce consistent spacing after the `<!--` and before the `-->` in a HTML comment |:wrench:|
24
+
|[@ota-meshi/svelte/system](./system.md)| system rule for working this plugin |:star:|
description: "system rule for working this plugin"
6
+
---
7
+
8
+
# @ota-meshi/svelte/system
9
+
10
+
> system rule for working this plugin
11
+
12
+
-:exclamation: <badgetext="This rule has not been released yet."vertical="middle"type="error"> **_This rule has not been released yet._** </badge>
13
+
-:gear: This rule is included in `"plugin:@ota-meshi/svelte/base"` and `"plugin:@ota-meshi/svelte/recommended"`.
14
+
15
+
## :book: Rule Details
16
+
17
+
This rule is a system rule for working the this plugin. This rule does not report any errors, but make sure the rule is enabled for the this plugin to work properly.
Copy file name to clipboardExpand all lines: docs/user-guide/README.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,30 @@ If you are using [eslint-plugin-svelte3] you need to remove it.
57
57
58
58
:::
59
59
60
+
#### settings["@ota-meshi/svelte"]
61
+
62
+
You can change the behavior of this plugin with some settings.
63
+
64
+
-`ignoreWarnings` (optional) ... Specifies an array of rules that ignore reports in the template.
65
+
For example, set rules on the template that cannot avoid false positives.
66
+
67
+
e.g.
68
+
69
+
```js
70
+
module.exports= {
71
+
// ...
72
+
settings: {
73
+
"@ota-meshi/svelte": {
74
+
ignoreWarnings: [
75
+
"@typescript-eslint/no-unsafe-assignment",
76
+
"@typescript-eslint/no-unsafe-member-access",
77
+
],
78
+
},
79
+
},
80
+
// ...
81
+
}
82
+
```
83
+
60
84
### Running ESLint from the command line
61
85
62
86
If you want to run `eslint` from the command line, make sure you include the `.svelte` extension using [the `--ext` option](https://eslint.org/docs/user-guide/configuring#specifying-file-extensions-to-lint) or a glob pattern, because ESLint targets only `.js` files by default.
0 commit comments