JSLint

Last updated
JSLint
Original author(s) Douglas Crockford
Developer(s) Douglas Crockford, Kai Zhu
Initial release2002;21 years ago (2002)
Stable release
v2022.9.20 / September 20, 2022;11 months ago (2022-09-20)
Repository
Written in JavaScript
Operating system Cross-platform
Available inEnglish
Type Static code analysis
License Unlicense
Website www.jslint.com

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]

Contents

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 [4] 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. [11] 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. [10]

See also

Related Research Articles

<span class="mw-page-title-main">JavaScript</span> High-level programming language

JavaScript, often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2023, 98.7% of websites use JavaScript on the client side for webpage behavior, often incorporating third-party libraries. All major web browsers have a dedicated JavaScript engine to execute the code on users' devices.

Lint is the computer science term for a static code analysis tool used to flag programming errors, bugs, stylistic errors and suspicious constructs. The term originates from a Unix utility that examined C language source code. A program which performs this function is also known as a "linter".

<span class="mw-page-title-main">Eclipse (software)</span> Software development environment

Eclipse is an integrated development environment (IDE) used in computer programming. It contains a base workspace and an extensible plug-in system for customizing the environment. It is the second-most-popular IDE for Java development, and, until 2016, was the most popular. Eclipse is written mostly in Java and its primary use is for developing Java applications, but it may also be used to develop applications in other programming languages via plug-ins, including Ada, ABAP, C, C++, C#, Clojure, COBOL, D, Erlang, Fortran, Groovy, Haskell, JavaScript, Julia, Lasso, Lua, NATURAL, Perl, PHP, Prolog, Python, R, Ruby, Rust, Scala, and Scheme. It can also be used to develop documents with LaTeX and packages for the software Mathematica. Development environments include the Eclipse Java development tools (JDT) for Java and Scala, Eclipse CDT for C/C++, and Eclipse PDT for PHP, among others.

Jython is an implementation of the Python programming language designed to run on the Java platform. The implementation was formerly known as JPython until 1999.

<span class="mw-page-title-main">JSON</span> Open standard file format and data interchange

JSON is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays. It is a common data format with diverse uses in electronic data interchange, including that of web applications with servers.

<span class="mw-page-title-main">YUI Library</span>

The Yahoo! User Interface Library (YUI) is a discontinued open-source JavaScript library for building richly interactive web applications using techniques such as Ajax, DHTML, and DOM scripting. YUI includes several core CSS resources. It is available under a BSD License. Development on YUI began in 2005 and Yahoo! properties such as My Yahoo! and the Yahoo! front page began using YUI in the summer of that year. YUI was released for public use in February 2006. It was actively developed by a core team of Yahoo! engineers.

TypeScript is a free and open-source high-level programming language developed by Microsoft that adds static typing with optional type annotations to JavaScript. It is designed for the development of large applications and transpiles to JavaScript. Because TypeScript is a superset of JavaScript, all JavaScript programs are syntactically valid TypeScript, but they can fail to type-check for safety reasons.

<span class="mw-page-title-main">Douglas Crockford</span> American computer programmer

Douglas Crockford is an American computer programmer who is involved in the development of the JavaScript language. He specified the data format JSON, and has developed various JavaScript related tools such as the static code analyzer JSLint and minifier JSMin. He wrote the book JavaScript: The Good Parts, published in 2008, followed by How JavaScript Works in 2018. He was a senior JavaScript architect at PayPal until 2019, and is also a writer and speaker on JavaScript, JSON, and related web technologies.

JSDoc is a markup language used to annotate JavaScript source code files. Using comments containing JSDoc, programmers can add documentation describing the application programming interface of the code they're creating. This is then processed, by various tools, to produce documentation in accessible formats like HTML and Rich Text Format. The JSDoc specification is released under CC BY-SA 3.0, while its companion documentation generator and parser library is free software under the Apache License 2.0.

NetRexx is an open source, originally IBM's, variant of the REXX programming language to run on the Java virtual machine. It supports a classic REXX syntax, with no reserved keywords, along with considerable additions to support object-oriented programming in a manner compatible with Java's object model, yet can be used as both a compiled and an interpreted language, with an option of using only data types native to the JVM or the NetRexx runtime package. The latter offers the standard Rexx data type that combines string processing with unlimited precision decimal arithmetic.

Svelte is a free and open-source front-end component framework and language created by Rich Harris and maintained by the Svelte core team members. Svelte is not a monolithic JavaScript library imported by applications: instead, Svelte compiles HTML templates to specialized code that manipulates the DOM directly, which may reduce the size of transferred files and give better client performance. Application code is also processed by the compiler, inserting calls to automatically recompute data and re-render UI elements when the data they depend on is modified. This also avoids the overhead associated with runtime intermediate representations, such as virtual DOM, unlike traditional frameworks which carry out the bulk of their work at runtime, i.e. in the browser.

<span class="mw-page-title-main">V8 (JavaScript engine)</span> Open-source JavaScript and WebAssembly engine developed by Google

V8 is a free and open-source JavaScript and WebAssembly engine developed by the Chromium Project for Chromium and Google Chrome web browsers. The project's creator is Lars Bak. The first version of the V8 engine was released at the same time as the first version of Chrome: 2 September 2008. It has also been used on the server side, for example in Couchbase, Deno and Node.js.

<span class="mw-page-title-main">SonarQube</span> Open-source platform for continuous inspection of code quality

SonarQube is an open-source platform developed by SonarSource for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs and code smells on 29 programming languages. SonarQube offers reports on duplicated code, coding standards, unit tests, code coverage, code complexity, comments, bugs, and security recommendations.

<span class="mw-page-title-main">PyScripter</span>

PyScripter is a free and open-source Python integrated development environment (IDE) for Windows. It is built with Delphi's Object Pascal and Python.

JSHint is a static code analysis tool used in software development for checking if JavaScript source code complies with coding rules. JSHint was created in 2011 by Anton Kovalyov as a fork of the JSLint project. Anton and others felt JSLint was getting "too opinionated", and did not allow enough customization options. The JSHint maintainers publish both an online version, and a command-line version.

<span class="mw-page-title-main">React (software)</span> JavaScript library for building user interfaces

React is a free and open-source front-end JavaScript library for building user interfaces based on components. It is maintained by Meta and a community of individual developers and companies.

<span class="mw-page-title-main">Visual Studio Code</span> Source code editor developed by Microsoft

Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. Users can change the theme, keyboard shortcuts, preferences, and install extensions that add functionality.

This is a list of articles related to the JavaScript programming language.

<span class="mw-page-title-main">ESLint</span> JavaScript code analysis software

ESLint is a static code analysis tool for identifying problematic patterns found in JavaScript code. It was created by Nicholas C. Zakas in 2013. Rules in ESLint are configurable, and customized rules can be defined and loaded. ESLint covers both code quality and coding style issues. ESLint supports current standards of ECMAScript, and experimental syntax from drafts for future standards. Code using JSX or TypeScript can also be processed when a plugin or transpiler is used.

References

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

Further reading