Skip to content

fix: resolve issues in Runes mode detection causing parser malfunctions #638

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

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

baseballyama
Copy link
Member

@baseballyama baseballyama commented Jan 13, 2025

Fixed: #633 (comment)

Before #633, the default value was set to true when it was unclear whether the file was in Runes mode. However, this approach could cause eslint-plugin-svelte to malfunction if the file was not in Runes mode. The behavior was changed to return undefined when the mode was uncertain to address this. Unfortunately, this caused issues in parts of the parser that rely on Runes. This PR fixes that bug.

I want to add a test for this, but I’m not sure how to do it. 😅
-> I added a test and I confirmed that this test is failed without changes.👍

Copy link

changeset-bot bot commented Jan 13, 2025

🦋 Changeset detected

Latest commit: 68abb47

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

This PR includes changesets to release 1 package
Name Type
svelte-eslint-parser Patch

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

Copy link

pkg-pr-new bot commented Jan 13, 2025

Open in Stackblitz

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

commit: 68abb47

@baseballyama baseballyama marked this pull request as draft January 13, 2025 06:20
@coveralls
Copy link

coveralls commented Jan 13, 2025

Pull Request Test Coverage Report for Build 12742284310

Details

  • 10 of 12 (83.33%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 94.744%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser/typescript/analyze/index.ts 4 6 66.67%
Totals Coverage Status
Change from base Build 12738544566: 0.02%
Covered Lines: 10330
Relevant Lines: 10780

💛 - Coveralls

@baseballyama baseballyama force-pushed the fix/parse-script branch 2 times, most recently from 2887ff0 to d730eec Compare January 13, 2025 06:27
@baseballyama baseballyama changed the title fix: revert part of #633 fix: resolve issues in Runes mode detection causing parser malfunctions Jan 13, 2025
@baseballyama baseballyama marked this pull request as ready for review January 13, 2025 06:57

Verified

This commit was signed with the committer’s verified signature.
Anaethelion Laurent Saint-Félix
@baseballyama
Copy link
Member Author

I’m merging this because, without this fix, a large number of lint errors could occur.

@baseballyama baseballyama merged commit df461c3 into main Jan 13, 2025
13 checks passed
@baseballyama baseballyama deleted the fix/parse-script branch January 13, 2025 07:12
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 this pull request may close these issues.

None yet

2 participants