JSLint explained

JSLint
JSLint
Author:Douglas Crockford
Developer:Douglas Crockford, Kai Zhu
Latest Release Version:v2024.6.28
Programming Language:JavaScript
Operating System:Cross-platform
Language:English
Genre:Static code analysis
License:Unlicense

JSLint is a static code analysis tool used in software development for checking if JavaScript source code complies with coding rules. It is provided primarily as a browser-based web application accessible through the domain jslint.com, but there are also command-line adaptations.[1] It was created in 2002 by Douglas Crockford.[2]

License

Since 2021, JSLint uses the FSF / OSI approved Unlicense license.

Before that, the JSLint license[3] was a derivative of the MIT License.[4] The sole modification was the addition of the line "The Software shall be used for Good, not Evil."

According to the Free Software Foundation, this previous clause made the original license non-free.[5] It had also prevented JSLint-related software from being hosted on Google Code and from being included in the Debian free software package repositories.[6] Because of this restriction, according to Crockford, IBM asked Crockford in 2011 for a license to do evil, such that their customers could use it.[7] [8] [9]

Influence

JSLint is considered by some to be the first JavaScript syntax checker.[10] [11] It has since inspired various other tools.

In 2011, Anton Kovalyov created a fork, called JSHint.[12] [13] [14] The main motivation behind the creation of JSHint was to provide a "less opinionated" and "more configurable" way for developers to analyse code.[15] [16] [17]

In 2013, Nicholas C. Zakas created ESLint. Both JSLint and JSHint lacked the ability to create additional rules for code quality and coding style. After contributing to JSHint, Zakas decided to create a new linting tool, ESLint, where all rules are configurable, and additional rules can be defined or loaded at run-time.[18] ESLint also supports linting the latest versions of JavaScript, aka ECMAScript 2015 and above.

In 2013, Palantir Technologies created TSLint,[19] which was the TypeScript equivalent for ESLint.[20] In 2019 TSLint was deprecated in favor of ESLint with a TypeScript integration.[21]

In 2014, Marat Dulin created JSCS.[22] In 2016, the JSCS Team joined the ESLint project and has since discontinued maintenance of the JSCS tool.[23] [24] [25]

In 2015, a comparison published by SitePoint, recommended ESLint above JSLint, JSHint and JSCS.[26] In 2016, CodeKit also praised ESLint for "finding more issues", being "far more configurable", and being "the industry standard" for JavaScript syntax checkers.

See also

Further reading

Notes and References

  1. Web site: JSLint from the Command Line. January 2013. www.hacksparrow.com. 2018-02-26. 2018-02-27. https://web.archive.org/web/20180227034307/https://www.hacksparrow.com/jslint-from-the-command-line.html. dead.
  2. Web site: first commit. 2010-11-12. GitHub. 2018-02-25. Copyright 2002 Douglas Crockford. All Rights Reserved Wrrrldwide and Beyond!.
  3. Web site: JSLint source file, including license. 2011-11-22. 2013-06-09. https://web.archive.org/web/20130609144601/https://raw.github.com/douglascrockford/JSLint/master/jslint.js. dead.
  4. Web site: JSMin isn't welcome on Google Code. 2008-12-08. wonko.com. Ryan Grove. 2018-02-26.
  5. Web site: Various Licenses and Comments About Them. Free Software Foundation.
  6. Web site: Re: The Software shall be used for Good, not Evil.. www.mail-archive.com.
  7. Web site: IBM and its minions .... 2011-02-13. Hasen Judy. https://web.archive.org/web/20130203112329/http://dev.hasenj.org/post/3272592502. 2013-02-03. 2018-02-26. I give permission for IBM, its customers, partners, and minions, to use JSLint for evil..
  8. Web site: Douglas Crockford: The JSON Saga. https://ghostarchive.org/varchive/youtube/20211215/-C-JoyNuQJs . 2021-12-15 . live. 2011-08-11. YouTube. 2018-02-25. "I give permission for IBM, its customers, partners, and minions, to use JSLint for evil.".
  9. The JSON Saga by Douglas Crockford
  10. Web site: Help: JSLint. 2016-12-10. codekitapp.com. https://web.archive.org/web/20180226015758/https://codekitapp.com/help/jslint/. 2018-02-26. live. 2018-02-25. JSLint is the original JavaScript syntax checker..
  11. Web site: Introducing ESLint. Zakas. Nicholas C.. 16 July 2013. nczonline.net. 2018-02-26. JSLint was the state of the art in JavaScript linting technology. 2018-02-26. https://web.archive.org/web/20180226092246/https://www.nczonline.net/blog/2013/07/16/introducing-eslint/. dead.
  12. Web site: Why I forked JSLint to JSHint. 2011-02-20. anton.kovalyov.net. Anton Kovalyov. https://web.archive.org/web/20110224022052/http://anton.kovalyov.net/2011/02/20/why-i-forked-jslint-to-jshint/. 2011-02-24. 2018-02-26. [JSLint] has gotten uncomfortably opinionated.
  13. Web site: JSHint: A Community Driven Fork of JSLint. 18 February 2011. badassjs.com. Devon Govett. https://web.archive.org/web/20110221102102/http://badassjs.com/post/3364925033/jshint-an-community-driven-fork-of-jslint. 21 February 2011. live. 2011-02-21. [..] JSLint was getting a bit too opinionated [..].
  14. Web site: Help: JSHint. 2018-02-26. codekitapp.com. 2018-02-26. designed to be less opinionated and more configurable.
  15. Web site: JSHint - the (gentler) JavaScript code quality tool. Elliot. Ian. 21 February 2011. www.i-programmer.info. https://web.archive.org/web/20110223093520/http://www.i-programmer.info/news/90-tools/2024-jshint-the-gentler-javascript-code-quality-tool.html. 2011-02-23. live. 2018-02-26.
  16. Web site: Tweet from Nicholas C. Zakas (@slicknet), creator of ESLint. Zakas. Nicholas C.. 18 December 2017. Twitter. 2018-02-26. JSLint complaint: not configurable enough. JSHint complaint: still not configurable enough [..].
  17. News: JSLint vs JSHint. Scott Logic. 2018-02-26.
  18. News: Understanding the Real Advantages of Using ESLint. 2015-03-26. Rangle.io Blog. 2018-02-26. 2019-02-09. https://web.archive.org/web/20190209232042/https://blog.rangle.io/understanding-the-real-advantages-of-using-eslint/. dead.
  19. Web site: tslint v0.1.0. npm. 28 July 2013 .
  20. Web site: TSLint. palantir.github.io.
  21. Web site: TSLint in 2019. June 5, 2019. Medium.
  22. Web site: JSCS: JavaScript Code Style — Frontend Babel. Dulin (@mdevils). Marat. 21 April 2014. frontendbabel.info. 2018-02-26.
  23. Web site: Welcoming JSCS To ESLint. ESLint - Pluggable JavaScript linter. 14 April 2016 . 2018-02-26.
  24. Web site: JSCS End of Life. ESLint - Pluggable JavaScript linter. 15 July 2016 . 2018-02-26.
  25. Web site: Future of Typescript Linting . ESLint. 18 January 2019 .
  26. News: A Comparison of JavaScript Linting Tools. Hartikainen. Jani. 2015-03-05. SitePoint. 2018-02-26.