Skip to content

feat(block-lang): Added support for multiple modules of the same type #511

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 5 commits into from
Jun 28, 2023
Merged

feat(block-lang): Added support for multiple modules of the same type #511

merged 5 commits into from
Jun 28, 2023

Conversation

marekdedic
Copy link
Contributor

Closes #507

  • The enforcePresent option doesn't fail when there's only a context="module" block present (it checks for the presence of any block) - should it?

@changeset-bot
Copy link

changeset-bot bot commented Jun 20, 2023

🦋 Changeset detected

Latest commit: 333bf9d

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

@marekdedic marekdedic marked this pull request as ready for review June 27, 2023 09:56
Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you! (Sorry, I missed this PR.)

@ota-meshi ota-meshi merged commit bb30943 into sveltejs:main Jun 28, 2023
@marekdedic
Copy link
Contributor Author

Thanks! What do you think about the enforcePresent thing?

@marekdedic marekdedic deleted the block-lang-context-module branch June 28, 2023 13:31
@ota-meshi
Copy link
Member

I've checked the behavior of that rule, and I don't think there's anything wrong with the current behavior.
Did you have any concerns?

@marekdedic
Copy link
Contributor Author

Well, this will not trigger with {script: "ts", enforceScriptPresent: true}:

<script context="module" lang="ts"></script>

<div>Hello!</div>

@ota-meshi
Copy link
Member

I think that svelte file is fine.
But if the language server can't handle that svelte file well, the rule might better report it, but I don't use it much with Svelte and TypeScript, so I'm not familiar with it 😅

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.

svelte/block-lang does not check <script context="module"> when a component script tag is present
2 participants