vuejs / vue-eslint-parser

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

Bug: Parsing error: Cannot set property index of Error which has only a getter #206

Closed zWingz closed 9 months ago

zWingz commented 10 months ago

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

What version of ESLint are you using?

latest

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

What did you do?

Configuration ### ESLint Config ```javascript module.exports = { extends: [ // add more generic rulesets here, such as: 'eslint:recommended', ], parser: 'vue-eslint-parser', parserOptions: { parser: '@typescript-eslint/parser', ecmaVersion: 6, extraFileExtensions: ['.vue'], ecmaFeatures: { jsx: true, }, project: true, // will work if disable this line }, plugins: ['@typescript-eslint'], } ``` ### tsconfig ```json { "compilerOptions": { "baseUrl": ".", "target": "es6", "module": "esnext", "moduleResolution": "node", "strict": true, "jsx": "preserve", "sourceMap": true, "resolveJsonModule": true, "esModuleInterop": true, "experimentalDecorators": true, "skipLibCheck": true, "lib": ["esnext", "dom"], }, "include": [ "." ], "exclude": ["node_modules"] } ``` App ```vue ```

What did you expect to happen?

image

What actually happened?

image

Link to Minimal Reproducible Example

https://github.com/zWingz/test-vue-eslint

Additional comments

enable or disable the project: true

image image
zWingz commented 10 months ago

https://github.com/typescript-eslint/typescript-eslint/issues/7597

k713927 commented 10 months ago

me too ,how to do

ernestoalejo commented 10 months ago

Downgrading to v9.2.1 removes the bug but misses out on important things like the integration with generic Vue 3.3 components.

npm i -D vue-eslint-parser@v9.2.1
zWingz commented 10 months ago

Downgrading to v9.2.1 removes the bug but misses out on important things like the integration with generic Vue 3.3 components.

npm i -D vue-eslint-parser@v9.2.1

still no work

PaulCEllsworth commented 9 months ago

Downgrading to v9.2.1 removes the bug but misses out on important things like the integration with generic Vue 3.3 components.

npm i -D vue-eslint-parser@v9.2.1

still no work

Same here (Windows 10, pnpm, node@18.15.0, vue@3.3.4)