vuejs / vue-eslint-parser

The ESLint custom parser for `.vue` files.
MIT License
435 stars 74 forks source link

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

Open DMartens opened 3 months ago

DMartens commented 3 months ago

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

What version of ESLint are you using?

8.57.0

What version of eslint-plugin-vue and vue-eslint-parser are you using?

What did you do?

Configuration ```js import * as vue from 'vue-eslint-parser'; export default [{ 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 the module scope.

What actually happened?

The module 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 the lang attribute.