Bug: Parsing error: Cannot set property index of Error which has only a getter
zWingz opened this issue · 5 comments
zWingz commented
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?
latest
What version of eslint-plugin-vue and vue-eslint-parser are you using?
- vue-eslint-parser@latest
- eslint-plugin-vue@latest
What did you do?
Configuration
ESLint Config
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
{
"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
<template>
<div>1</div>
</template>
<script lang="tsx">
import { defineComponent } from 'vue'
const test = 1;
const b = 2;
const test = defineComponent({
props: {
test: String,
},
render() {
return <div>test</div>
}
})
</script>What did you expect to happen?
What actually happened?
Link to Minimal Reproducible Example
https://github.com/zWingz/test-vue-eslint
Additional comments
enable or disable the project: true

k713927 commented
me too ,how to do
ernestoalejo commented
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.1zWingz commented
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
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.1still no work
Same here (Windows 10, pnpm, node@18.15.0, vue@3.3.4)