博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
保存到VS Code后如何修复ESLint错误
阅读量:2526 次
发布时间:2019-05-11

本文共 1229 字,大约阅读时间需要 4 分钟。

Two of the most prominent utilities in web development today are ESLint and Microsoft's Visual Studio Code. I enjoy using both, and I love the integration between both tools, but warnings from ESLint inside Visual Studio Code aren't fulfilling -- I'd rather lint errors be fixed each time I save.

当今Web开发中最著名的两个实用程序是ESLint和Microsoft的Visual Studio Code。 我喜欢同时使用这两种工具,而且我喜欢这两种工具之间的集成,但是Visual Studio Code中来自ESLint的警告并没有实现-我宁愿每次保存时都修正lint错误。

Complete the following steps to make Visual Studio Code fix any lint errors when a file is saved:

完成以下步骤以使Visual Studio Code在保存文件时修复所有棉绒错误:

  • Open the following file path: ~/Library/Application Support/Code/User/settings.json

    打开以下文件路径: ~/Library/Application Support/Code/User/settings.json

  • Within the JSON structure, add the following:

    在JSON结构中,添加以下内容:
{    // ... Existing JSON here ...    "editor.codeActionsOnSave": {        "source.fixAll": true    }}

Every time you save applicable files within Visual Studio Code, ESLint will be run to fix any errors.

每次在Visual Studio Code中保存适用的文件时,将运行ESLint修复任何错误。

For me this is a massive time savings. There is some risk that this task might take a while one large files but for me it's worth it.

对我来说,这可节省大量时间。 这项任务可能需要花费一个大文件一段时间,但是对我来说这是值得的。

翻译自:

转载地址:http://rkvwd.baihongyu.com/

你可能感兴趣的文章
bzoj 1179: [Apio2009]Atm
查看>>
利用LDA进行文本聚类(hadoop, mahout)
查看>>
第三周作业
查看>>
js添加删除行
查看>>
浏览器性能测试网址
查看>>
[MTK FP]用Python把图片资源image.rar中为.pbm后缀的文件更改为.bmp后缀的方法
查看>>
实验二
查看>>
[LeetCode]203. Remove Linked List Elements 解题小结
查看>>
测试一下
查看>>
vue base64
查看>>
【Django实战开发】案例一:创建自己的blog站点-1.安装及搭建开发环境
查看>>
Pie(二分)
查看>>
Mysql 索引优化
查看>>
09湖州二模(自选模块不等式)
查看>>
Mybatis Batch 批量操作
查看>>
Ubuntu server搭建Java web服务器
查看>>
WSGI学习系列WSME
查看>>
java读取xml配置文件和properties配置文件
查看>>
HDU 4300 Contest 1
查看>>
POJ 3311
查看>>