Syntax Error Error No ESLint configuration found in statusGitmibsrc

在尝试运行Vue项目时遇到'Error: No ESLint configuration found.'的问题。解决方法包括全局或局部安装ESLint并初始化配置文件,解决ESLint环境键未知的报错,以及处理eslint parsing error关于Unexpected token的问题,通过配置babel-eslint插件来解决动态导入的解析错误。
摘要由CSDN通过智能技术生成

今天接受了一个 Vue 项目,在执行 npm run serve 命令运行项目时报错:

Error: No ESLint configuration found.

解决方法:

安装 ESlint 并初始化配置:

方法一:

全局安装 ESLint :

npm i eslint -g

生成配置文件:

eslint --init

根据自己的项目需求进行设置:

√ How would you like to use ESLint · problems
√ What type of modules does your project use · esm
√ Which framework does your project use · vue
√ Does your project use TypeScript · No / Yes
√ Where does your code run · browser
√ What format do you want your config file to be in · JavaScript
The config that you’ve selected requires the following dependencies:

[email protected]/* */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e–;)if(t[e].getAttribute('data-yjshash'))r

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值