# svelte/no-export-load-in-svelte-module-in-kit-pages
disallow exporting load functions in
*.sveltemodule in SvelteKit page components.
- ⚙️ This rule is included in
"plugin:svelte/recommended".
# 📖 Rule Details
This rule reports unexpected exported load function at <script context="module">.
At SvelteKit v1.0.0-next.405, load function has been moved into a separate file — +page.js for pages, +layout.js for layouts.
And the API has changed.
<script context="module">
/* eslint svelte/no-export-load-in-svelte-module-in-kit-pages: "error" */
/* ✓ GOOD */
export function foo() {}
export function bar() {}
/* ✗ BAD */
export function disallow exporting load functions in `*.svelte` module in SvelteKit page components. (svelte/no-export-load-in-svelte-module-in-kit-pages)load() {}
// export const load = () => {}
</script>
# 🔧 Options
Nothing. But if you are not using the default routes folder, please set configuration according to the user guide.
# 📚 Further Reading
# 🚀 Version
This rule was introduced in eslint-plugin-svelte v2.12.0