vue3-cli创建项目后每个文件的第一行都爆红,或者每个文建都 : No Babel config file detected for...

Parsing error: No Babel config file detected for D:\mySelf\myProject\vue3\demo_vue3.0.eslintrc.js. Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files.

在这里插入图片描述
打开了多个文件,每个文件都会在第一行报,看着难受,
解决
当我们创建完文件后会自动生成一个 .eslintre.js文件,只需要把把下边的代码赋值过去就好了。
requireConfigFile: false,最重要的就是这个

 parserOptions: {
    parser: "@babel/eslint-parser",
    requireConfigFile: false, 
  },

完美解决,亲测有效
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/lzfengquan/article/details/125386727