Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/strange-actors-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-svelte": patch
---

feat(valid-prop-names-in-kit-pages): add support for the new `params` page prop
1 change: 1 addition & 0 deletions docs/rules/valid-prop-names-in-kit-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ At SvelteKit v1.0.0-next.405, instead of having multiple props corresponding to
export let data;
export let errors;
export let form;
export let params;
export let snapshot;
// export let { data, errors } = { data: {}, errors: {} }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createRule } from '../utils/index.js';
import type { RuleContext } from '../types.js';
import { getSvelteVersion } from '../utils/svelte-context.js';

const EXPECTED_PROP_NAMES = ['data', 'errors', 'form', 'snapshot'];
const EXPECTED_PROP_NAMES = ['data', 'errors', 'form', 'params', 'snapshot'];
const EXPECTED_PROP_NAMES_SVELTE5 = [...EXPECTED_PROP_NAMES, 'children'];

function checkProp(
Expand Down
Loading