Skip to content

valid-prop-names-in-kit-pages false positive when exporting trailingSlash variable #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
DetachHead opened this issue Dec 12, 2022 · 1 comment
Closed
2 tasks done

Comments

@DetachHead
Copy link
Contributor

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.

What version of ESLint are you using?

8.28.0

What version of eslint-plugin-svelte are you using?

2.14.0

What did you do?

Configuration
module.exports = {
    rules: {
        'svelte/valid-prop-names-in-kit-pages': 'error'
    }
}
<!-- +page.svelte -->
<script lang="ts">
    export const trailingSlash = 'always'
</script>

What did you expect to happen?

no error, as trailingSlash is valid to export on sveltekit page components. see sveltejs/kit#7719

What actually happened?

> eslint .


C:\projects\project\src\routes\+page.svelte
  10:18  error  disallow props other than data or errors in Svelte Kit page components  svelte/valid-prop-names-in-kit-pages

Link to GitHub Repo with Minimal Reproducible Example

cant be bothered but i'm gonna make a PR fixing it myself anyway

Additional comments

No response

@DetachHead
Copy link
Contributor Author

nvm i misread the docs, it's only valid in +layout.ts, not .svelte files

@DetachHead DetachHead closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant