Skip to content

Commit 6275de2

Browse files
committed
Update eslint config
1 parent ad41bbd commit 6275de2

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

docs-svelte-kit/.eslintrc.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,11 @@ module.exports = {
44
parserOptions: {
55
sourceType: "module",
66
},
7+
rules: {
8+
"@ota-meshi/svelte/no-target-blank": "error",
9+
"@ota-meshi/svelte/button-has-type": "error",
10+
"@ota-meshi/svelte/no-useless-mustaches": "error",
11+
"@ota-meshi/svelte/prefer-class-directive": "error",
12+
"@ota-meshi/svelte/spaced-html-comment": "error",
13+
},
714
}

docs-svelte-kit/src/lib/components/ESLintPlayground.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@
161161
class="rule-link {getRule(msg.ruleId)?.classes}"
162162
class:is-rule-error={msg.ruleId}
163163
href={getRule(msg.ruleId)?.url}
164-
target="_blank">({msg.ruleId})</a
164+
target="_blank"
165+
rel="noopener noreferrer">({msg.ruleId})</a
165166
>
166167
</li>
167168
{/each}

docs-svelte-kit/src/lib/eslint/ESLintEditor.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
/>
222222
<div class="eslint-editor__tools">
223223
{#if showApplyFix}
224-
<button on:click={applyFix}>Apply Fix</button>
224+
<button on:click={applyFix} type="button">Apply Fix</button>
225225
{/if}
226226
</div>
227227
</div>

docs-svelte-kit/src/lib/eslint/RulesSettings.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
}),
123123
)
124124
}}
125+
type="button"
125126
>
126127
<svg
127128
xmlns="http://www.w3.org/2000/svg"
@@ -163,7 +164,7 @@
163164
/>
164165
{rule.ruleId}
165166
</label>
166-
<a href={rule.url} target="_blank"
167+
<a href={rule.url} target="_blank" rel="noopener noreferrer"
167168
><svg
168169
xmlns="http://www.w3.org/2000/svg"
169170
aria-hidden="true"

docs-svelte-kit/src/lib/header/Header.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
href="https://github.com/ota-meshi/eslint-plugin-svelte"
6666
target="_blank"
6767
class="github-link"
68+
rel="noopener noreferrer"
6869
>
6970
<svg
7071
version="1.1"

0 commit comments

Comments
 (0)