One of the biggest challenges in software development is time. It’s something we can’t easily get more of, but linting can help us make the most out of the time we have.

时间是软件开发中最大的挑战之一。 这是我们无法轻易获得的更多东西,但是棉绒可以帮助我们充分利用自己的时间。

那么什么是棉绒呢? (So what is linting?)

lint, or a linter, is a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs. https://en.wikipedia.org/wiki/Lint(software)

lintlinter ,是一种分析源代码以标记编程错误,bug,样式错误和可疑结构的工具。 https://zh.wikipedia.org/wiki/林特(软件)

Simply put, a linter is a tool that programmatically scans your code with the goal of finding issues that can lead to bugs or inconsistencies with code health and style. Some can even help fix them for you!

简而言之,lint是一种以编程方式扫描您的代码的工具,旨在发现可能导致错误或代码健康状况和样式不一致的问题。 有些甚至可以帮您修复它们!

Take for instance, the following example:

例如,以下示例:

const test = 'I am a test';
console.log(`Test: ${test}`);
const test = 'Another one.';

We’re declaring the constant test twice, which our javascript engine won’t be happy about. With the proper linter settings and watch configuration, instead of getting caught later as an error when the code runs, you’ll immediately get an error through your linter running in the background:

我们将两次声明常数test ,这对于我们的javascript引擎不会感到满意。 有了正确的lint设置和监视配置,您不会立即在后台运行lint时得到错误,而不会在代码运行时稍后被捕获为错误:

10:9  error  Parsing error: Identifier 'test' has already been declared8 |   const test = 'I am a test';9 |   console.log(`Test: ${2}`);
> 10 |   const test = 'Another one.';|         ^

It might be pretty obvious that you have 2 of the same const declarations given this is only 3 lines, but in a more complex application, this can save tons of time having to hunt down a pesky bug that’s not always obvious.

很显然,由于只有3行,所以您有2个相同的const声明,但是在更复杂的应用程序中,这可以节省大量时间来寻找讨厌的bug(这并不总是很明显)。

棉绒能提供什么帮助? (What all can linting help with?)

Lots of things, including but not limited to:

很多东西 ,包括但不限于:

  • Flagging bugs in your code from syntax errors标记语法错误中的错误
  • Giving you warnings when code may not be intuitive在代码可能不直观时发出警告
  • Providing suggestions for common best practices提供常见最佳做法的建议
  • Keeping track of TODO’s and FIXME’s跟踪TODO和FIXME
  • Keeping a consistent code style保持一致的代码风格

Most things you can think of probably already exist in one form or another, and if not, you can even create custom rules that fit your needs!

您可以想到的大多数事情可能已经以一种或另一种形式存在 ,如果没有,您甚至可以创建适合您需求的自定义规则 !

这实际上有什么帮助?我为什么要关心呢? (How is this actually helping or why should I care?)

Probably the biggest overlying theme of the list above is the fact that these issues will be called out immediately. No longer will these issues creep up on you in the middle of running your app or give someone anxiety during a code review. No longer will you and your reviewer endlessly fight passive aggressively through the comments about whether or not to include a semicolon at the end of JS statements (you should

什么是棉绒,它如何节省您的时间?相关推荐

  1. 节省你学习时间的百余个谷歌小技巧

    With classes, homework, and projects–not to mention your social life–time is truly at a premium for ...

  2. 九个特别的工作网站,开发人员的工具箱,可以拥有很多的使用资源,节省大量的时间,并提升工作效率

    九个特别的工作网站,开发人员的工具箱,可以拥有很多的使用资源,节省大量的时间,并提升工作效率. 一.Tool.lu-程序员的工具箱 点击进入 网站同样提供了各式各样的在线工具,但该网站侧重于编程方向. ...

  3. 手把手实例教你短视频定位,人设和变现方式,学会节省半年摸索时间

    手把手实例教你短视频定位,人设和变现方式,学会节省半年摸索时间 昨天在我赢助手的公开课上分享了一个变现模型,不光是做短视频可以用,在所有互联网项目都可以用. 基础概念就是单价.客户数量和时间的关系. ...

  4. 保存时间 默认_一些不起眼但又非常的实用的PPT制作技巧,大大节省PPT制作时间...

    从PPT小白到PPT大神的过程中,我们总会无数次碰壁,无数次陷入困境.今天为大家带来的是一些不起眼的PPT技巧,但是非常的实用,不信就看下文吧! 自定义访问工具栏 在PPT中我们有很多的常用操作,例如 ...

  5. cad2016中选择全图字体怎么操作_PPT替换字体不得不说的3种方法,节省超多时间!...

    字体是制作 PPT 避不开制作元素,如果想要更换 PPT 中的字体,你都是怎么做的呢? 面对长达几十页的 PPT,普通人选择了一个个文本框选择后再改成想要的字体-- 于是接下来的一两个小时,他都在改字 ...

  6. layui横向时间线_一些不起眼但又非常的实用的PPT制作技巧,大大节省PPT制作时间...

    从PPT小白到PPT大神的过程中,我们总会无数次碰壁,无数次陷入困境.今天为大家带来的是一些不起眼的PPT技巧,但是非常的实用,不信就看下文吧! 自定义访问工具栏 在PPT中我们有很多的常用操作,例如 ...

  7. 随想(二):简化别人的工作,就是简化自己的工作,节省自己的时间

    在一个多团队协作的工作流程当中,简化需要别人来完成的工作,是在简化工作本身,简化自己的工作,替自己省时间.很少有问题同时有多个一样优秀的解决方 案,提供那个更优秀的方案.多团队协作的时候,不要试图让很 ...

  8. autocad软件提供的哪些功能可以提高设计效率?_节省80%制图时间:AutoCAD如何有效“手脑”结合,释放创作潜能?...

    AutoCAD,是建筑设计领域的一款基础制图软件,普及程度非常高,熟练运用该软件,可以有效提高个人效率.优化设计成果. 在建筑设计作品集的创作中,同学们可以通过掌握AutoCAD使用原理及强大的相关功 ...

  9. keras训练完以后怎么预测_还在使用“龟速”的单显卡训练模型?动动手,让TPU节省你的时间...

    点击上方关注,All in AI中国 本文将介绍如何使用Keras和Google CoLaboratory与TPU一起训练LSTM模型,与本地计算机上的GPU相比,这样训练能大大缩短训练时间. 很长一 ...

最新文章

  1. 扇出性 java_索引与算法
  2. 学完计组后,我马上在「我的世界」造了台显示器,你敢信?
  3. WebSocket能干啥
  4. 修复IE下相对容器中绝对定位Bug
  5. 搜索,贪心,DP,三者的区别和联系
  6. 05 - 雷达的发展与应用
  7. python foo函数_python——函数
  8. 盘点下半年EI国际会议,值得收藏!
  9. python题目-奇偶数调用函数
  10. Ubuntu18.04的截图问题
  11. 计算机系统运用的科学原理,人工智能的工作原理是什么?
  12. Codeforces Round #694 (Div. 2) F. Strange Housing (贪心思维)
  13. KindEditor 详细介绍
  14. 近期接触到大数据业务,速上地图采集器图文教程仅供参考
  15. 项脊轩志-2017年元宵节后
  16. 42岁巨星陨落!黑客之神Dan Kaminsky去世,曾因发现DNS安全漏洞一战成名
  17. 04 Python基本数据类型
  18. HTML5+CSS3的学习(五)
  19. 《Java基础入门第2版》--黑马程序员 课后答案及其详解 第5章 Java中的常用类
  20. 极狐GitLab:从硅谷到中国,远程办公背后的挑战与创新

热门文章

  1. java日期相关的类正则表达式
  2. 实验1 应用SQL Server进行数据定义和管理
  3. deepLink iOS 应用到自己APP 记录
  4. [微信小程序]单选框以及多选框实例代码附讲解
  5. Springboot 中 Mybatis 的使用
  6. react按需加载(getComponent优美写法),并指定输出模块名称解决缓存(getComponent与chunkFilename)...
  7. spring中@value注解需要注意
  8. apache开启虚拟主机 并进行配置
  9. Windows系统安装Oracle 11g客户端
  10. Linux普通用户启动tomcat