Skip to content

Conversation

@ota-meshi
Copy link
Member

@ota-meshi ota-meshi commented Jun 17, 2024

close #652

This PR fixes the issue mentioned in the comments below.

#652 (comment)

In the code posted at the top of the thread the rule seems to work correctly, and correctly shows the svelte compiler warnings.

@changeset-bot
Copy link

changeset-bot bot commented Jun 17, 2024

🦋 Changeset detected

Latest commit: 1ea6d93

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

This PR includes changesets to release 1 package
Name Type
eslint-plugin-svelte 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
Member

@baseballyama baseballyama left a comment

Choose a reason for hiding this comment

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

Thank you🙏

@ota-meshi ota-meshi merged commit f7b7649 into main Jun 17, 2024
@ota-meshi ota-meshi deleted the fix-valid-compile branch June 17, 2024 09:46
ota-meshi pushed a commit that referenced this pull request Jun 17, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## eslint-plugin-svelte@2.39.5

### Patch Changes

- [#790](#790)
[`f7b7649`](f7b7649)
Thanks [@ota-meshi](https://github.com/ota-meshi)! - fix: false
positives for import vars with TS in `svelte/valid-compile`

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ts.ScriptTarget.ESNext,
module: ts.ModuleKind.ESNext,
importsNotUsedAsValues: ts.ImportsNotUsedAsValues.Preserve,
preserveValueImports: true,
Copy link
Member

@dummdidumm dummdidumm Jun 17, 2024

Choose a reason for hiding this comment

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

That option is deprecated since TypeScript 5.0 and AFAIK will not do anything anymore starting 5.5. (not sure if this also applies to transpileModule, but definitely when running tsc). I think it's better to use verbatimModuleSyntax instead, assuming a TS version that has it is the minimum required version.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for your comment!
I knew it was deprecated, but I didn't know it would be removed in 5.5. It seems that we need to specify both so that it works with older versions of typescript 😅

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.

$page is an illegal variable name

4 participants