日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

Syntax Error: Error: No ESLint configuration found Syntax Error: TypeError: eslint.CLIEngine i

發(fā)布時(shí)間:2023/12/16 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Syntax Error: Error: No ESLint configuration found Syntax Error: TypeError: eslint.CLIEngine i 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Syntax Error: Error: No ESLint configuration found.

方法一:
1.全局安裝 ESLint :npm i eslint -g
2.生成配置文件:eslint --init
3.根據(jù)自己的項(xiàng)目需求進(jìn)行設(shè)置:

√ 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:eslint-plugin-vue@latest ? Would you like to install them now with npm? ? Yes

方法二:
1.在項(xiàng)目中安裝 ESLint :npm install eslint --save-dev
2.生成配置文件:./node_modules/.bin/eslint --init
3.初始化成功后,會(huì)在項(xiàng)目根目錄生成一個(gè) .eslintrc.js 文件,文件內(nèi)容:

module.exports = {"env": {"browser": true,"es2021": true},"extends": ["eslint:recommended","plugin:vue/essential"],"parserOptions": {"ecmaVersion": 12,"sourceType": "module"},"plugins": ["vue"],"rules": {} };

Syntax Error: TypeError: eslint.CLIEngine is not a constructor

解決方法:打開(kāi)package.json將以下代碼刪除重新運(yùn)行(將項(xiàng)目停掉,重新npm run serve)

刪除后本項(xiàng)目的eslint語(yǔ)法校驗(yàn)會(huì)失效,即可運(yùn)行成功(需重新npm run serve)

參考文檔:
Syntax Error: Error: No ESLint configuration found.:https://www.w3h5.com/post/618.html
Syntax Error: TypeError: eslint.CLIEngine is not a constructor:https://blog.csdn.net/weixin_43928774/article/details/120805055

總結(jié)

以上是生活随笔為你收集整理的Syntax Error: Error: No ESLint configuration found Syntax Error: TypeError: eslint.CLIEngine i的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。