Conversation

baseballyama

@changeset-botchangeset-bot

🦋 Changeset detected

Latest commit: b2abfa0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
svelte-eslint-parser

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@baseballyamabaseballyama changed the title fix: resolved an issue where $props was incorrectly recognized as astore when variables shared names with runes, such as $props and props. fix: resolved an issue where $props was incorrectly recognized as astore when variables shared names with runes, such as $props and props Mar 26, 2025
@github-actionsGitHub Actions

Try the Instant Preview in Online Playground

ESLint Online Playground

Install the Instant Preview to Your Local

npm i https://pkg.pr.new/svelte-eslint-parser@692

Published Instant Preview Packages:

View Commit

@baseballyamabaseballyama changed the title fix: resolved an issue where $props was incorrectly recognized as astore when variables shared names with runes, such as $props and props fix: resolved issue of $props incorrectly detected as store when using variables named after runes like $props and props Mar 26, 2025
… store when variables shared names with runes, such as `$props` and `props`.
@coveralls

Pull Request Test Coverage Report for Build 14086358686

Details

  • 13 of 13 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 94.659%

TotalsCoverage Status
Change from base Build 14050456749:0.004%
Covered Lines:10478
Relevant Lines:10945

💛 - Coveralls

@baseballyamabaseballyama marked this pull request as draft March 26, 2025 15:02
@baseballyamabaseballyama marked this pull request as ready for review March 27, 2025 01:29
@baseballyama

I confirmed this PR fixes both issues in my project.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@ota-meshiota-meshi merged commit 1c533d8 into main Mar 27, 2025
12 of 13 checks passed
@ota-meshiota-meshi deleted the fix/runes-scope branch March 27, 2025 01:46
@github-actions-actions bot mentioned this pull request Mar 27, 2025
@Fd929c2CE5fA

@baseballyama Hello~

I think the fix might accidentally break and ignore the situation when the name of the store in v4 happens to be the same as the name of runes in v5.

For example, the $state store used by the project in v4 is now considered runes, causes a lot of false positives:

This statement is not reactive because all variables referenced in the reactive statement are immutable. eslint (svelte/no-immutable-reactive-statements)

I know I can fix my issue by refactoring the v4 store name, it just took me a little while to locate the changes causes this, so I'm leave a feedback here.

Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

no-unused-props reports false positive @typescript-eslint/no-use-before-define reports $props unepectedly