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

define-macros-order: should ignore declare TypeScript declarations along with type definitions #2590

Copy link
Copy link
Closed
@andreww2012

Description

@andreww2012
Issue body actions

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 9.13.0
  • eslint-plugin-vue version: 9.30.3
  • Vue version: 3.5.12
  • Node version:
  • Operating System:

What did you do?

Since declare TypeScript declarations only exist at compile time, I think they should be allowed to be placed before macros along with type definitions, meaning that the following code should not be reported:

<script setup lang="ts">
declare global {};

defineProps(/* ... */)
defineEmits(/* ... */)
</script>

Test on the rule page

What did you expect to happen?

What actually happened?

Repository to reproduce this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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.