解决errors and 0 warnings potentially fixable with the `--fix` option.问题
新建vue-cli的时候,选择了eslint语法,很烦人
这里注释掉就行
还是解决不了,那没办法,如果能接受的话,
老老实实安装个eslint插件吧
ESLint有很多规范,用的比较多的是
标准规范
特点:
- 代码结束不能加分号
- js中字符串要用单引号
- 不能有过多的换行
- 不能有过多个空格
- 函数名的小括号两边必须有且只有一个空格
- …
vscode默认不具备代码不规范报错的能力,所以可以装一个vscode插件叫
ESLint
装一个格式化插件
Prettier-Standard
,作用:可以右键格式化时,帮我们自动修复不规范的代码变成规范的代码下面的设置是为了让你保存代码时自动修复不规范的代码
然后把下面的配置,加到设置里
// 默认使用prittier作为格式化工具"editor.defaultFormatter": "numso.prettier-standard-vscode",// 保存时自动格式化 - 按照eslint的规则格式化"editor.codeActionsOnSave": {"source.fixAll": true},"[javascript]": {"editor.defaultFormatter": "numso.prettier-standard-vscode"},"[html]": {"editor.defaultFormatter": "numso.prettier-standard-vscode"},"[vue]": {"editor.defaultFormatter": "numso.prettier-standard-vscode"},
当时新建项目选择eslint语法,没办法的话,在package.json
把这个地方删了
“@vue/cli-plugin-eslint”: “~4.5.0”,
解决errors and 0 warnings potentially fixable with the `--fix` option.问题相关推荐
- Vue报错:3 errors and 0 warnings potentially fixable with the `--fix` option.
Vue报错:3 errors and 0 warnings potentially fixable with the --fix option. 报错如下 解决办法 注释掉.eslintrc.js文件 ...
- 2 errors and 0 warnings potentially fixable with the `--fix` option,vue-cli3中eslint详解
当我们创建vue项目的时候,我们往往会选择linter/Formatter,eslint-config-standard,下面我放张vue图形化配置界面 但这往往是进坑的开始 特别注意一下这里的插件: ...
- errors and 0 warnings potentially fixable with the `--fix` option.
Vue项目运行中出现 errors and 0 warnings potentially fixable with the --fix option.的报错问题 一.原因: 与创建项目 eslint ...
- 7 errors and 0 warnings potentially fixable with the `--fix` option.报错处理
做vue2项目的时候出现了这种错误,发现原有的代码没有出错,自己写的就报错,后来经过查找发现原来是规范写法了,但是每个人的书写习惯不一样,那怎么才能解决掉这个问题呢? 其实很简单我们只需要进入根目录里 ...
- 8 errors and 0 warnings potentially fixable with the `--fix` option.
在用vue-cli3脚手架搭建项目,开始打码之后,各种报错,信息如下: 后来在这个地方去掉了@vue/standard,重启之后就好了- 我看网上一些都是说: 注释掉.eslintrc.js文件中的' ...
- ✖ 48 problems (48 errors, 0 warnings) 45 errors and 0 warnings potentially fixable with the `--fix
✖ 48 problems (48 errors, 0 warnings) 45 errors and 0 warnings potentially fixable with the `--fix ...
- 解决关于0 errors and 27 warnings potentially fixable with the `--fix` option.的问题
配置eslint后运行项目有如下警告(换行格式问题): 执行以下命令(可以自动修复这些问题): npm run lint --fix 原因 在window系统中,clone代码下来,会自动把换行符LF ...
- 2 problems (2 errors, 0 warnings) 2 errors and 0 warnings potentially fixable with the `--fix` opt
创建vue项目初始化完成之后 在终端运行 npm run serve 出现一个错误,如下图: 解决的方法是: ① 项目的代码中找到.eslintrc.js 文件夹将extends中的'@vue/sta ...
- 2 problems (2 errors, 0 warnings) 2 errors and 0 warnings potentially fixable with the `--fix` opt
创建vue项目初始化完成之后 在终端运行 npm run serve 出现一个错误,如下图: 解决的方法是: ① 项目的代码中找到.eslintrc.js 文件夹将extends中的'@vue/sta ...
最新文章
- python excel 教程推荐_python对Excel按条件进行内容补充(推荐)
- 加油站会员管理系统源码php_分享一下:关于一对一直播源码的重要组成部分
- simulink中错误object[id]!=NULL Component: Simulink | Category:Model error
- Linux Shell下”/dev/null 21“相关知识说明
- 查看ios设备型号网址
- 玩转oracle 11g(42):增加表空间
- Tips--解决安装Multisim时出现No software will be installed or removed无法安装的问题
- “项目运行时出错,无法启动调试。绑定句柄无效”的解决办法
- P Laguna/ A database for evaluation of algorithms for measurement of QT and other waveform interval
- 《人月神话》读书笔记
- 数据通信技术初级工程师证题库
- Nvivo 12 Plus WIN版本丨中文英文 软件安装包下载 安装教程步骤丨WIN系统
- 【SAM】bzoj5084: hashit
- 【翻译】【词典】【词库】(PC版)离线词典GoldenDict+离线词库--地表最强 (by shany shang)
- MSU转Uniprot转Entrez ID
- EOS区块链技术开发(一)环境搭建
- feign+hystrix相关超时时间配置问题
- oneUI 如何获取swtch值
- 小学生的搞笑考试卷子
- EBGP使用环回口建邻居用到ebgp-multihop和update source loopback
热门文章
- ubuntu小技巧2——安装国际版的QQ
- LL(1)预测分析程序C++实现
- 打不过完美日记,国货美妆集体出海
- Azure IoT Hub DPS custom allocation policies by functions- 在DPS中启用设备自定义分配策略
- Xmake进阶----系统操作详解
- 【原创】BSC链只涨不跌的合约学习【完整源码】
- MySQL学习笔记-03高级查询、多表联合查询、聚合函数、子查询、视图、存储过程、权限、
- word中带圈符号如何手动输入
- WebSocket--使用/教程/实例
- ercharts一个页面能放几个_在同一页面中显示多个echart图表