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

Parsing error: Computed property names are not allowed in enums. #274

Closed
vuejs/eslint-plugin-vue
#2923
@FloEdelmann

Description

@FloEdelmann

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?

9.34.0

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

  • vue-eslint-parser@10.2.0
  • eslint-plugin-vue@10.4.0

What did you do?

seehttps://github.com/vuejs/eslint-plugin-vue/actions/runs/17426870338/job/49476333521?pr=2920 andhttps://github.com/vuejs/eslint-plugin-vue/blob/master/tests/fixtures/script-indent/ts-enum-member-01.vue:

Configuration
{"languageOptions": {"parserOptions": {"parser":"@typescript-eslint/parser"}}}
<script lang="ts">enumDirection {// commentUp=1,// commentDown,Left    = 2,  [Right  ] =    3,}</script>

What did you expect to happen?

This test case used to pass withhttps://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.41.0, but started to fail when@typescript-eslint/parser was updated tov8.42.0.

What actually happened?

Parsing error: Computed property names are not allowed in enums.

Note that TypeScript itself complains about the same problem:https://typescript-eslint.io/play#ts=5.9.2&fileType=.tsx&code=KYOwrgtgBAIglgJ2AYwC5wPYigbwFBRQD0RUyGEEoqBUAqgA5QC8UAjADS0lkVUg1CMDAHcQXQgBlgAM0EsoAJglQA2rQBKcAOYALeQF0WtAMxcAvniA&eslintrc=N4KABGBEBOCuA2BTAzpAXGYBfEWg&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false

Link to Minimal Reproducible Example

https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/fixtures/script-indent/ts-enum-member-01.vue

Additional comments

No response

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