Skip to content
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

Generic definition with Generic Parameter Defaults in <script setup lang="ts" generic=""> causes "Parsing error: ';' expected. after #220 #221

Closed
4 tasks done
danwithabox opened this issue Jan 22, 2024 · 0 comments · Fixed by #222
Labels

Comments

@danwithabox
Copy link

danwithabox commented Jan 22, 2024

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

  • I'm using eslint-plugin-vue.
  • I'm sure the problem is a parser problem. (If you are not sure, search for the issue in eslint-plugin-vue repo and open the issue in eslint-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.56.0

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

  • vue-eslint-parser@9.4.1
  • eslint-plugin-vue@9.20.1

What did you do?

Configuration I provide a stripped-down Vite project as the repro.

Issue is configuration-independent, any valid TS+Vue config will cause this.

<script setup lang="ts" generic="STitle extends string | undefined = undefined, SSubtitle extends string | undefined = undefined">
</script>

What did you expect to happen?

No error on Ln 1, Col 68

image

What actually happened?

Error on Ln 1, Col 68

image

Link to Minimal Reproducible Example

https://github.com/danwithabox/issue_vue-eslint-parser_221

Additional comments

Generic Parameter Defaults in generic attribute.

Works in 9.4.0, fails in 9.4.1

When searching for the issue, I found #217 to be similar.
It seems to me, the fix for that, i.e. #220 is probably the culprit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants