看着这个报错 感觉是版本不对引起的
ERROR in [eslint] Invalid Options:
- Unknown options: extensions
- 'extensions' has been removed.
ERROR in Error: Child compilation failed:
[eslint] Invalid Options:
- Unknown options: extensions
- 'extensions' has been removed.
查询了一翻, 发现 eslint版本太高也不行
package.json 用到了最新的 9.15, 需要退回, 那么如何退回? 应该退到哪个版本?
{
"name": "chat-ui",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.39.0",
"html-webpack-plugin": "^5.6.3",
"marked": "^15.0.2",
"vue": "^3.5.13"
},
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/eslint-parser": "^7.25.9",
"@eslint/js": "^9.15.0",
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/cli-service": "^5.0.8",
"eslint": "^9.15.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-vue": "^9.31.0",
"globals": "^15.12.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}
通过 pnpm view eslint versions 命令查询都有哪些版本可用, 低于9版本的最新的就是8.57.1
降低版本即可.