You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're in the process of migrating a codebase from Svelte 4 to 5 and hitting an odd linting issue. We'd like components to expose the standard aria-label property externally, with a different internal name like so: let { 'aria-label': ariaLabel }: { 'aria-label'?: string; } = $props();
This seems to work when it is the only property on the component, but if there are other properties then linting fails with a svelte/no-unused-props error.
Reproduction
Using:
"svelte": "5.25.3",
"svelte-eslint-parser": "^1.1.1",
Run eslint against the file below. I get an error on the aria-label prop that I think is invalid:
6:5 error 'aria-label' is an unused Props property svelte/no-unused-props
Here's the odd thing - remove the 'a' property (delete lines 3, 7, and 13) and the aria-label warning goes away. 🤷🏻♂️
Describe the bug
We're in the process of migrating a codebase from Svelte 4 to 5 and hitting an odd linting issue. We'd like components to expose the standard
aria-label
property externally, with a different internal name like so:let { 'aria-label': ariaLabel }: { 'aria-label'?: string; } = $props();
This seems to work when it is the only property on the component, but if there are other properties then linting fails with a svelte/no-unused-props error.
Reproduction
Using:
Run eslint against the file below. I get an error on the aria-label prop that I think is invalid:
6:5 error 'aria-label' is an unused Props property svelte/no-unused-props
Here's the odd thing - remove the 'a' property (delete lines 3, 7, and 13) and the aria-label warning goes away. 🤷🏻♂️
Logs
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: