Skip to content

multiline generic definition in <script setup lang="ts" generic=""> cause "Parsing error: ';' expected. eslint". #217

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
4 tasks done
pronitsateli731 opened this issue Jan 19, 2024 · 0 comments · Fixed by #220

Comments

@pronitsateli731
Copy link

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?

What did you do?

Configuration

In reproduction, I use tsconfig.json and .eslintrc.cjs which were created by "npm init vue@latest".

<script setup lang="ts" generic="
  /** definition of data in FormContext */
  TDefinitionOfFormContext extends Record<string, unknown>,
  /** Output of FormContext */
  TOutputOfFormContext,
  /** Vee Validate Path of whole this component */
  TObjectArrayFieldPath extends Path<TDefinitionOfFormContext>,
  /** Row data type */
  TItemValue extends Item<PathValue<TDefinitionOfFormContext, TObjectArrayFieldPath>>
">
  // import and code
</script>

What did you expect to happen?

No error. For example, in .ts file multiline generic definition cause no error, which is indicated in this picture.
スクリーンショット 2024-01-19 130734

What actually happened?

Parsing error: ';' expected. eslint
スクリーンショット 2024-01-19 130803
スクリーンショット 2024-01-19 130825

Link to Minimal Reproducible Example

https://github.com/pronitsateli731/vue-parser-report-r60119

Actually happened:

  • src/components/ObjectArrayField.vue
  • src/components/PeopleDetailItemRow.vue

Expect to Happen (TypeScript File)

  • src/components/useObjectArrayField.ts

Additional comments

No response

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

Successfully merging a pull request may close this issue.

1 participant