fix: resolve issues in Runes mode detection causing parser malfunctions #638
+1,371
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 causeeslint-plugin-svelte
to malfunction if the file was not in Runes mode. The behavior was changed to returnundefined
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.👍