Skip to content

Commit

Permalink
fix: false positives for form in `svelte/valid-prop-names-in-kit-p…
Browse files Browse the repository at this point in the history
…ages` (#353)
  • Loading branch information
ota-meshi committed Jan 24, 2023
1 parent aa7ab6c commit 5933794
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nice-buses-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-svelte": patch
---

fix: false positives for `form` in `svelte/valid-prop-names-in-kit-pages`
2 changes: 1 addition & 1 deletion src/rules/valid-prop-names-in-kit-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { TSESTree } from "@typescript-eslint/types"
import { createRule } from "../utils"
import { isKitPageComponent } from "../utils/svelte-kit"

const EXPECTED_PROP_NAMES = ["data", "errors"]
const EXPECTED_PROP_NAMES = ["data", "errors", "form"]

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

0 comments on commit 5933794

Please sign in to comment.