UNPKG

5.41 kBMarkdownView Raw
1# JSHint, A Static Code Analysis Tool for JavaScript
2
3\[ [Use it online](http://jshint.com/) •
4[Docs](http://jshint.com/docs/) • [FAQ](http://jshint.com/docs/faq) •
5[Install](http://jshint.com/install/) •
6[Contribute](http://jshint.com/contribute/) •
7[Blog](http://jshint.com/blog/) • [Twitter](https://twitter.com/jshint/) \]
8
9[![NPM version](https://img.shields.io/npm/v/jshint.svg?style=flat)](https://www.npmjs.com/package/jshint)
10[![Linux Build Status](https://img.shields.io/travis/jshint/jshint/master.svg?style=flat&label=Linux%20build)](https://travis-ci.org/jshint/jshint)
11[![Windows Build status](https://img.shields.io/appveyor/ci/jshint/jshint/master.svg?style=flat&label=Windows%20build)](https://ci.appveyor.com/project/jshint/jshint/branch/master)
12[![Dependency Status](https://img.shields.io/david/jshint/jshint.svg?style=flat)](https://david-dm.org/jshint/jshint)
13[![devDependency Status](https://img.shields.io/david/dev/jshint/jshint.svg?style=flat)](https://david-dm.org/jshint/jshint#info=devDependencies)
14[![Coverage Status](https://img.shields.io/coveralls/jshint/jshint.svg?style=flat)](https://coveralls.io/r/jshint/jshint?branch=master)
15
16JSHint is a community-driven tool that detects errors and potential problems in
17JavaScript code. Since JSHint is so flexible, you can easily adjust it in
18the environment you expect your code to execute. JSHint is open source and
19will always stay this way.
20
21## Our goal
22
23The project aims to help JavaScript developers write complex programs
24without worrying about typos and language gotchas.
25
26Any code base eventually becomes huge at some point, so simple mistakes — that
27would not show themselves when written — can become show stoppers and add
28extra hours of debugging. So, static code analysis tools come into play
29and help developers spot such problems. JSHint scans a program written in
30JavaScript and reports about commonly made mistakes and potential bugs. The
31potential problem could be a syntax error, a bug due to an implicit type
32conversion, a leaking variable, or something else entirely.
33
34Only 15% of all programs linted on [jshint.com](http://jshint.com) pass the
35JSHint checks. In all other cases, JSHint finds some red flags that could've
36been bugs or potential problems.
37
38Please note, that while static code analysis tools can spot many different kind
39of mistakes, it can't detect if your program is correct, fast or has memory
40leaks. You should always combine tools like JSHint with unit and functional
41tests as well as with code reviews.
42
43## Reporting a bug
44
45To report a bug simply create a
46[new GitHub Issue](https://github.com/jshint/jshint/issues/new) and describe
47your problem or suggestion. We welcome all kinds of feedback regarding
48JSHint including but not limited to:
49
50 * When JSHint doesn't work as expected
51 * When JSHint complains about valid JavaScript code that works in all browsers
52 * When you simply want a new option or feature
53
54Before reporting a bug, please look around to see if there are any open or closed tickets
55that discuss your issue, and remember the wisdom: pull request > bug report > tweet.
56
57## Who uses JSHint?
58
59Engineers from these companies and projects use JSHint:
60
61* [Mozilla](https://www.mozilla.org/)
62* [Wikipedia](https://wikipedia.org/)
63* [Facebook](https://facebook.com/)
64* [Twitter](https://twitter.com/)
65* [Bootstrap](http://getbootstrap.com/)
66* [Disqus](https://disqus.com/)
67* [Medium](https://medium.com/)
68* [Yahoo!](https://yahoo.com/)
69* [SmugMug](http://smugmug.com/)
70* [jQuery](http://jquery.com/)
71* [PDF.js](http://mozilla.github.io/pdf.js)
72* [Coursera](http://coursera.com/)
73* [Adobe Brackets](http://brackets.io/)
74* [Apache Cordova](http://cordova.io/)
75* [RedHat](http://redhat.com/)
76* [SoundCloud](http://soundcloud.com/)
77* [Nodejitsu](http://nodejitsu.com/)
78* [Yelp](https://yelp.com/)
79* [Voxer](http://voxer.com/)
80* [EnyoJS](http://enyojs.com/)
81* [QuickenLoans](http://quickenloans.com/)
82* [Cloud9](http://c9.io/)
83* [CodeClimate](https://codeclimate.com/)
84* [Zendesk](http://zendesk.com/)
85* [Apache CouchDB](http://couchdb.apache.org/)
86* [Google](https://www.google.com/)
87* [Codacy](https://www.codacy.com) [ref](https://support.codacy.com/hc/en-us/articles/207995005-Special-Thanks)
88* [Spotify](https://www.spotify.com)
89
90And many more!
91
92## License
93
94Most files are published using [the standard MIT Expat
95license](https://www.gnu.org/licenses/license-list.html#Expat). One file,
96however, is provided under a slightly modified version of that license. The
97so-called [JSON license](https://www.gnu.org/licenses/license-list.html#JSON)
98is a non-free license, and unfortunately, we can't change it due to historical
99reasons. This license is included as an in-line within the file it concerns.
100
101## The JSHint Team
102
103JSHint is currently maintained by [Rick Waldron](https://github.com/rwaldron/),
104[Caitlin Potter](https://github.com/caitp/), [Mike
105Pennisi](https://github.com/jugglinmike/), and [Luke
106Page](https://github.com/lukeapage). You can reach them via admin@jshint.org.
107
108## Previous Maintainers
109
110Originating from the JSLint project in 2010, JSHint has been maintained by a
111number of dedicated individuals. In chronological order, they are: Douglas
112Crockford, Anton Kovalyov, and Mike Sherov. We appreciate their long-term
113commitment!
114
115## Thank you!
116
117We really appreciate all kinds of feedback and contributions. Thanks for using and supporting JSHint!