Skip to content

<script setup lang="ts" generic=" multiline generic definition "> cause ESLint Parsing error, but can correctly build. #66

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

Closed
pronitsateli731 opened this issue Dec 1, 2023 · 1 comment

Comments

@pronitsateli731
Copy link

This code cause error Parsing error: ';' expected. at TBar comment row.
It is not occur not only when comment row exists, but also when generic definition has line breaks.

<script setup lang="ts" generic="
    // comment of TFoo
    TFoo extends Record<string, any>,
    // comment of TBar
    TBar
">
  ...
</script>

I write a component which has 6 generics and each definition lasting about 50 characters, so generic definition has 13 lines.
Vue.js can parse this and can built and move correctly, but only ESLint displays error.

ESLint seems not responsible for Vue, so I submit this bug? to here.
If more suitable place exsits, I'm please to tell me that and sorry for your bother.

@pronitsateli731 pronitsateli731 changed the title <script setup lang="js" generic=" multiline generic definition "> cause ESLint Parsing error, but can correctly build. <script setup lang="ts" generic=" multiline generic definition "> cause ESLint Parsing error, but can correctly build. Dec 1, 2023
@pronitsateli731
Copy link
Author

pronitsateli731 commented Jan 19, 2024

I noticed this issue is a problem on parser, not this config, so I close this.
See vuejs/vue-eslint-parser#217

@pronitsateli731 pronitsateli731 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2024
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

No branches or pull requests

1 participant