Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Require default export on <script> #2383

Copy link
Copy link
Closed
@privatenumber

Description

@privatenumber
Issue body actions

Please describe what the rule should do:

To warn when there's a <script> tag with no default export.

With the new <script setup> syntax, I've noticed cases where devs forget or miss the setup and can't figure why their code is not working correctly.

What category should the rule belong to?

[ ] Enforces code style (layout)
[x] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

<!-- Forgetting to add `setup` -->
<script>
const value = 1;
</script>

Additional context

From: #2328

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.