For faster navigation, this Iframe is preloading the Wikiwand page for JSLint.

JSLint

JSLint
原作者道格拉斯·克罗克福特
开发者道格拉斯·克罗克福特
首次发布2002年,​22年前​(2002
当前版本
  • 2022.3.30 (2022年3月30日;稳定版本)[1]
编辑维基数据链接
原始码库 编辑维基数据链接
编程语言JavaScript
操作系统跨平台
语言英文
类型静态程序分析
许可协议Unlicense英语Unlicense
网站www.jslint.com

JSLint是一个在软件开发中确认JavaScript原始码代码风格静态程序分析,可透过网络应用程式jslint.com及命令行界面来进行分析[2],由道格拉斯·克罗克福特于2002年建立[3]

授权条款

[编辑]

JSLint曾使用由MIT许可证衍伸而来的JSLint许可证[4][5],两者的差别在于JSLint许可证多出了一句话"The Software shall be used for Good, not Evil."。

根据自由软件基金会的说法,该条款使JSLint变相成为专有软件[6]。此条款同时阻止了JSLint相关的软件托管在Google Code[5],也阻止了Debian自由软件存储库捆绑JSLint[7]。根据Crockford的说法,基于此一限制,IBM在2011年向Crockford申请了恶作剧用的许可证,以便其客户可以使用JSLint[8][9][10]

2021年起,JSLint改使用自由软件基金会开放原始码促进会批准的Unlicense英语Unlicense许可证。

影响

[编辑]

多数人认为JSLint是第一个JavaScript语法分析器,并激发了往后其他类似工具的诞生[11][12]

2011年,Anton Kovalyov创建了一个分支,并命名为JSHint[13][14][15]。作者解释,创建JSHint的原因是想为开发人员提供一种“不那么执著”和“更容易配置”的方式来分析代码[16][17][18]

2013年,Nicholas C. Zakas创建了ESLint[12]。作者解释,由于JSLint和JSHint都无法创建额外的编程规范英语Coding conventions代码风格规则,在为JSHint做出贡献后,Zakas决定创建一个新的语法分析器。ESLint所有规则都是可配置的,并且可以在执行期定义或加载其他规则[19]。同时,ESLint还支持分析最新版本的JavaScript,即ECMAScript 2015及更高版本。

2014年,Marat Dulin创建了“JSCS”[20]。2016年,JSCS团队并入了ESLint项目,同时停止JSCS工具的维护[21][22][23]

2015年,SitePoint英语SitePoint发布了一项对ESLint、JSLint、JSHint和JSCS四个项目的比较,其结果为ESLint优于其他三个语法分析器[24]。2016年,CodeKit还称赞ESLint“发现了更多问题”、“可配置性更高”以及成为JavaScript语法分析器的“行业标准”[11]

2016年,Palantir Technologies建立了TSLint[25],即TypeScript专用的ESLint[26]。2019年,TSLint并入ESLint,成为ESLint的插件typescript-eslint[27][28]

参见

[编辑]

参考文献

[编辑]
  1. ^ https://github.com/jslint-org/jslint/releases/tag/v2022.3.30.
  2. ^ JSLint from the Command Line. www.hacksparrow.com. January 2013 [2018-02-26]. (原始内容存档于2018-02-27). 
  3. ^ first commit. GitHub. 2010-11-12 [2018-02-25]. (原始内容存档于2021-04-13). Copyright 2002 Douglas Crockford. All Rights Reserved Wrrrldwide and Beyond! 
  4. ^ JSLint source file, including license. [2022-07-12]. (原始内容存档于2013-06-09). 
  5. ^ 5.0 5.1 JSMin isn't welcome on Google Code. wonko.com. Ryan Grove. 2008-12-08 [2018-02-26]. (原始内容存档于2023-01-14). 
  6. ^ Various Licenses and Comments About Them. Free Software Foundation. [2022-07-12]. (原始内容存档于2010-07-24). 
  7. ^ Re: The Software shall be used for Good, not Evil.. www.mail-archive.com. [2022-07-12]. (原始内容存档于2022-12-05). 
  8. ^ IBM and its minions .... Hasen Judy. 2011-02-13 [2018-02-26]. (原始内容存档于2013-02-03). 
  9. ^ Douglas Crockford: The JSON Saga. YouTube. 2011-08-11 [2018-02-25]. (原始内容存档于2021-12-15). I give permission for IBM, its customers, partners, and minions, to use JSLint for evil. 
  10. ^ The JSON Saga by Douglas Crockford
  11. ^ 11.0 11.1 Help: JSLint. codekitapp.com. 2016-12-10 [2018-02-25]. (原始内容存档于2018-02-26). JSLint is the original JavaScript syntax checker. 
  12. ^ 12.0 12.1 Zakas, Nicholas C. Introducing ESLint. nczonline.net. 16 July 2013 [2018-02-26]. (原始内容存档于2018-02-26). JSLint was the state of the art in JavaScript linting technology 
  13. ^ Why I forked JSLint to JSHint. anton.kovalyov.net. Anton Kovalyov. 2011-02-20 [2018-02-26]. (原始内容存档于2011-02-24). [JSLint] has gotten uncomfortably opinionated 
  14. ^ JSHint: A Community Driven Fork of JSLint. badassjs.com. Devon Govett. 18 February 2011 [2011-02-21]. (原始内容存档于21 February 2011). [..] JSLint was getting a bit too opinionated [..] 
  15. ^ Help: JSHint. codekitapp.com. 2018-02-26 [2018-02-26]. (原始内容存档于2018-02-26). designed to be less opinionated and more configurable 
  16. ^ Elliot, Ian. JSHint - the (gentler) JavaScript code quality tool. www.i-programmer.info. 21 February 2011 [2018-02-26]. (原始内容存档于2011-02-23). 
  17. ^ Zakas, Nicholas C. Tweet from Nicholas C. Zakas (@slicknet), creator of ESLint. Twitter. 18 December 2017 [2018-02-26]. (原始内容存档于2022-07-08). JSLint complaint: not configurable enough. JSHint complaint: still not configurable enough [..] 
  18. ^ JSLint vs JSHint. Scott Logic英语Scott Logic. [2018-02-26]. (原始内容存档于2018-02-26). 
  19. ^ Understanding the Real Advantages of Using ESLint. Rangle.io Blog. 2015-03-26 [2018-02-26]. (原始内容存档于2019-02-09). 
  20. ^ Dulin (@mdevils), Marat. JSCS: JavaScript Code Style — Frontend Babel. frontendbabel.info. 21 April 2014 [2018-02-26]. (原始内容存档于2021-10-18). 
  21. ^ Welcoming JSCS To ESLint. ESLint - Pluggable JavaScript linter. [2018-02-26]. (原始内容存档于2022-12-07). 
  22. ^ JSCS End of Life. ESLint - Pluggable JavaScript linter. [2018-02-26]. (原始内容存档于2022-11-28). 
  23. ^ Future of Typescript Linting. ESLint. [2022-07-12]. (原始内容存档于2021-04-13). 
  24. ^ Hartikainen, Jani. A Comparison of JavaScript Linting Tools. SitePoint. 2015-03-05 [2018-02-26]. (原始内容存档于2022-12-05). 
  25. ^ tslint. npm. [2022-07-12]. (原始内容存档于2023-01-02). 
  26. ^ TSLint. palantir.github.io. [2022-07-12]. (原始内容存档于2022-12-21). 
  27. ^ TSLint in 2019. Medium. June 5, 2019. 
  28. ^ Roadmap: TSLint -> ESLint · Issue #4534 · palantir/tslint. GitHub. [2022-08-15]. (原始内容存档于2023-01-16). 

延伸阅读

[编辑]

外部链接

[编辑]
{{bottomLinkPreText}} {{bottomLinkText}}
JSLint
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?