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

vue/cli 5.0.8版本使用ts+vue的例子时,出现ERROR #252

Open
AsukaSoryu0 opened this issue Sep 22, 2023 · 1 comment
Open

vue/cli 5.0.8版本使用ts+vue的例子时,出现ERROR #252

AsukaSoryu0 opened this issue Sep 22, 2023 · 1 comment

Comments

@AsukaSoryu0
Copy link

ERROR in [eslint] Error while loading rule '@typescript-eslint/consistent-type-assertions': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.
看样子是parserOptions.project这里要写tsconfig.json的位置,配置了但还是没生效,求解。
"devDependencies": { "@babel/core": "^7.22.20", "@babel/eslint-parser": "^7.22.15", "@typescript-eslint/eslint-plugin": "^6.7.2", "@typescript-eslint/parser": "^6.7.2", "@vue/cli-plugin-babel": "~5.0.8", "@vue/cli-plugin-eslint": "~5.0.8", "@vue/cli-plugin-pwa": "~5.0.8", "@vue/cli-plugin-router": "~5.0.8", "@vue/cli-plugin-typescript": "~5.0.8", "@vue/cli-plugin-vuex": "~5.0.8", "@vue/cli-service": "~5.0.8", "@vue/eslint-config-typescript": "^12.0.0", "eslint": "^8.49.0", "eslint-config-alloy": "^5.1.2", "eslint-plugin-vue": "^9.17.0", "less": "^4.2.0", "less-loader": "^8.1.1", "typescript": "~5.2.2", "vue-eslint-parser": "^9.3.1" }

@aidenchen8
Copy link

把 @typescript-eslint/parser 和 @typescript-eslint/eslint-plugin 固定在 6.4.0 及以下就可以了

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

No branches or pull requests

2 participants