We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
9.23.0
eslint-plugin-svelte
3.4.0
When using aliases for props I get false positive from svelte/no-unused-props. See repro.
svelte/no-unused-props
export default ts.config( includeIgnoreFile(gitignorePath), js.configs.recommended, ...ts.configs.recommended, ...svelte.configs.recommended, prettier, ...svelte.configs.prettier, { languageOptions: { globals: { ...globals.browser, ...globals.node } }, rules: { 'no-undef': 'off' } }, { files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'], ignores: ['eslint.config.js', 'svelte.config.js'], languageOptions: { parserOptions: { projectService: true, extraFileExtensions: ['.svelte'], parser: ts.parser, svelteConfig } } } );
<script lang="ts"> type Props = { test: string; 'aria-label'?: string; }; const { test, 'aria-label': ariaLabel }: Props = $props(); </script> <h1>{test}</h1> <div aria-label={ariaLabel}>svelte/no-unused-props does not always respect aliases</div>
0 lint errors
❯ npm run lint > [email protected] lint > prettier --check . && eslint . Checking formatting... All matched files use Prettier code style! svelte-eslint-bug/src/routes/Bug1.svelte 7:8 error 'aria-label' is an unused Props property svelte/no-unused-props ✖ 1 problem (1 error, 0 warnings)
https://github.com/gyzerok/svelte-eslint-bug
No response
The text was updated successfully, but these errors were encountered:
This issue is fixed in v3.5.0
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Before You File a Bug Report Please Confirm You Have Done The Following...
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?
When using aliases for props I get false positive from
svelte/no-unused-props
. See repro.Configuration
What did you expect to happen?
0 lint errors
What actually happened?
Link to GitHub Repo with Minimal Reproducible Example
https://github.com/gyzerok/svelte-eslint-bug
Additional comments
No response
The text was updated successfully, but these errors were encountered: