Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 1.68 KB

no-not-data-props-in-kit-pages.md

File metadata and controls

61 lines (44 loc) · 1.68 KB
pageClass sidebarDepth title description
rule-details
0
svelte/no-not-data-props-in-kit-pages
disallow props other than data or errors in Svelte Kit page components.

svelte/no-not-data-props-in-kit-pages

disallow props other than data or errors in Svelte Kit page components.

  • This rule has not been released yet.

📖 Rule Details

This rule reports unexpected exported variables at <script>.
At SvelteKit v1.0.0-next.405, instead of having multiple props corresponding to the props returned from a load function, page components now have a single data prop.

<script> const config = {settings: { kit: { files: { routes: "", }, }, }, } </script>
<script>
  /* eslint svelte/no-not-data-props-in-kit-pages: "error" */
  /** ✓ GOOD */
  export let data
  export let errors
  /** ✗ BAD */
  export let foo
  export let bar
</script>

{foo}, {bar}

🔧 Options

Nothing. But if use are using not default routes folder, please set configuration according to the user guide.

📚 Further Reading

🔍 Implementation