Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Missing scopes when parsing <script> with custom parser #228

Open
@DMartens

Description

@DMartens

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I'm usingeslint-plugin-vue.
  • I'm sure the problem is a parser problem. (If you are not sure, search for the issue ineslint-plugin-vue repo and open the issue ineslint-plugin-vue repo if there is no solution.
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.

What version of ESLint are you using?

8.57.0

What version ofeslint-plugin-vue andvue-eslint-parser are you using?

  • vue-eslint-parser@9.4.2
  • eslint-plugin-vue: irrelevant

What did you do?

Configuration
import*asvuefrom'vue-eslint-parser';exportdefault[{languageOptions:{parser:vue,parserOptions:{parser:{ts:'@typescript-eslint/parser'}}}}]
<script setup lang="ts">function fn() {}</script>

What did you expect to happen?

There is a child scope for the function declaration nested in themodule scope.

What actually happened?

Themodule scope has no child scopes.

Link to Minimal Reproducible Example

https://github.com/DMartens/vue-eslint-parser-script-custom-parser-scope

Additional comments

This only happens when using a custom parser via thelang attribute.

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp