JSLint is a
static code analysis
In computer science, static program analysis (or static analysis) is the analysis of computer programs performed without executing them, in contrast with dynamic program analysis, which is performed on programs during their execution.
The term ...
tool used in
software development
Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications, frameworks, or other software components. Software development inv ...
for checking if
JavaScript
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 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
source code
In computing, source code, or simply code, is any collection of code, with or without comment (computer programming), comments, written using a human-readable programming language, usually as plain text. The source code of a Computer program, p ...
complies with
coding rules. It is provided primarily as a browser-based
web application
A web application (or web app) is application software that is accessed using a web browser. Web applications are delivered on the World Wide Web to users with an active network connection.
History
In earlier computing models like client-serve ...
accessible through the domain jslint.com, but there are also command-line adaptations. It was created in 2002 by
Douglas Crockford.
License
Since 2021, JSLint uses the
FSF /
OSI approved
Unlicense
The Unlicense is a public domain equivalent license for software which provides a public domain waiver with a fall-back public-domain-like license, similar to the CC Zero for cultural works. It includes language used in earlier software projects ...
license.
Before that, the JSLint license was a derivative of the
MIT License
The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license co ...
.
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. It had also prevented JSLint-related software from being hosted on
Google Code
Google Developers (previously Google Code) , application programming interfaces (APIs), and technical resources. The site contains documentation on using Google developer tools and APIs—including discussion groups and blogs for developers usi ...
and from being included in the
Debian
Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of De ...
free software
Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, ...
package repositories. 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.
Influence
JSLint is considered by some to be the first JavaScript syntax checker.
It has since inspired various other tools.
In 2011, Anton Kovalyov created a fork, called
JSHint. The main motivation behind the creation of JSHint was to provide a "less opinionated" and "more configurable" way for developers to analyse code.
In 2013, Nicholas C. Zakas created
ESLint.
Both JSLint and JSHint lacked the ability to create additional rules for
code quality
In the context of software engineering, software quality refers to two related but distinct notions:
* Software functional quality reflects how well it complies with or conforms to a given design, based on functional requirements or specificatio ...
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. ESLint also supports linting the latest versions of JavaScript, aka ECMAScript 2015 and above.
In 2014, Marat Dulin created JSCS. In 2016, the JSCS Team joined the ESLint project and has since discontinued maintenance of the JSCS tool.
In 2015, a comparison published by
SitePoint, recommended ESLint above JSLint, JSHint and JSCS. In 2016, CodeKit also praised ESLint for "finding more issues", being "far more configurable", and being "the industry standard" for JavaScript syntax checkers.
In 2016,
Palantir Technologies
Palantir Technologies is a public American software company that specializes in big data analytics. Headquartered in Denver, Colorado, it was founded by Peter Thiel, Nathan Gettings, Joe Lonsdale, Stephen Cohen, and Alex Karp in 2003. The com ...
created TSLint, which is the
TypeScript
TypeScript is a free and open source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript and adds optional static typing to the language. It is designed for the development of large appl ...
equivalent for ESLint. It was deprecated in favor of ESLint with a TypeScript integration in 2019.
See also
*
List of tools for static code analysis, JavaScript
References
Further reading
*
* Appendix C of
* Section 'Performing JavaScript Syntax Checking with JSLint', Pages 143-145 of
External links
*
{{Software engineering
JavaScript programming tools
Static program analysis tools