Skip to content

Commit 5933794

Browse files
authored
fix: false positives for form in svelte/valid-prop-names-in-kit-pages (#353)
1 parent aa7ab6c commit 5933794

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.changeset/nice-buses-repeat.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-svelte": patch
3+
---
4+
5+
fix: false positives for `form` in `svelte/valid-prop-names-in-kit-pages`

src/rules/valid-prop-names-in-kit-pages.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { TSESTree } from "@typescript-eslint/types"
33
import { createRule } from "../utils"
44
import { isKitPageComponent } from "../utils/svelte-kit"
55

6-
const EXPECTED_PROP_NAMES = ["data", "errors"]
6+
const EXPECTED_PROP_NAMES = ["data", "errors", "form"]
77

88
export default createRule("valid-prop-names-in-kit-pages", {
99
meta: {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<script lang="ts">
2+
import type { PageData, ActionData } from "./$types"
3+
export let form: ActionData
4+
</script>

0 commit comments

Comments
 (0)