Description
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?
9.23.0
What version of eslint-plugin-svelte
are you using?
3.4.0
What did you do?
Configuration
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import svelte from "eslint-plugin-svelte";
import prettierConfig from "eslint-config-prettier/flat";
import globals from "globals";
import svelteConfig from "./svelte.config.js";
export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommended,
svelte.configs.recommended,
prettierConfig,
svelte.configs.prettier,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ["**/*.svelte", "**/*.svelte.js", "**/*.svelte.ts"],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
extraFileExtensions: [".svelte"],
projectService: true,
svelteConfig
}
}
},
{
rules: {
"@typescript-eslint/no-unused-vars": ["error", { ignoreRestSiblings: true }]
}
},
{
ignores: ["build/", ".svelte-kit/", "dist/", "src/lib/components/ui/", "src/lib/utils.[jt]s"]
}
);
<script lang="ts">
type MyType = { thing: string };
type Props = {
myProp: { a: string } & MyType;
};
let { myProp }: Props = $props();
</script>
{myProp.thing}
If I don't use myProp.a
in my code, even if I use one or more properties of MyType
, a
is marked as unused props
What did you expect to happen?
Not having this reported because I do use myProp
What actually happened?
Got this error reported on my $props()
Link to GitHub Repo with Minimal Reproducible Example
Additional comments
No response
Metadata
Metadata
Assignees
Labels
No labels