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 |
|
16 | JSHint is a community-driven tool that detects errors and potential problems in
|
17 | JavaScript code. Since JSHint is so flexible, you can easily adjust it in
|
18 | the environment you expect your code to execute. JSHint is open source and
|
19 | will always stay this way.
|
20 |
|
21 | ## Our goal
|
22 |
|
23 | The project aims to help JavaScript developers write complex programs
|
24 | without worrying about typos and language gotchas.
|
25 |
|
26 | Any code base eventually becomes huge at some point, so simple mistakes — that
|
27 | would not show themselves when written — can become show stoppers and add
|
28 | extra hours of debugging. So, static code analysis tools come into play
|
29 | and help developers spot such problems. JSHint scans a program written in
|
30 | JavaScript and reports about commonly made mistakes and potential bugs. The
|
31 | potential problem could be a syntax error, a bug due to an implicit type
|
32 | conversion, a leaking variable, or something else entirely.
|
33 |
|
34 | Only 15% of all programs linted on [jshint.com](http://jshint.com) pass the
|
35 | JSHint checks. In all other cases, JSHint finds some red flags that could've
|
36 | been bugs or potential problems.
|
37 |
|
38 | Please note, that while static code analysis tools can spot many different kind
|
39 | of mistakes, it can't detect if your program is correct, fast or has memory
|
40 | leaks. You should always combine tools like JSHint with unit and functional
|
41 | tests as well as with code reviews.
|
42 |
|
43 | ## Reporting a bug
|
44 |
|
45 | To report a bug simply create a
|
46 | [new GitHub Issue](https://github.com/jshint/jshint/issues/new) and describe
|
47 | your problem or suggestion. We welcome all kinds of feedback regarding
|
48 | JSHint 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 |
|
54 | Before reporting a bug, please look around to see if there are any open or closed tickets
|
55 | that discuss your issue, and remember the wisdom: pull request > bug report > tweet.
|
56 |
|
57 | ## Who uses JSHint?
|
58 |
|
59 | Engineers 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 |
|
90 | And many more!
|
91 |
|
92 | ## License
|
93 |
|
94 | Most files are published using [the standard MIT Expat
|
95 | license](https://www.gnu.org/licenses/license-list.html#Expat). One file,
|
96 | however, is provided under a slightly modified version of that license. The
|
97 | so-called [JSON license](https://www.gnu.org/licenses/license-list.html#JSON)
|
98 | is a non-free license, and unfortunately, we can't change it due to historical
|
99 | reasons. This license is included as an in-line within the file it concerns.
|
100 |
|
101 | ## The JSHint Team
|
102 |
|
103 | JSHint is currently maintained by [Rick Waldron](https://github.com/rwaldron/),
|
104 | [Caitlin Potter](https://github.com/caitp/), [Mike
|
105 | Pennisi](https://github.com/jugglinmike/), and [Luke
|
106 | Page](https://github.com/lukeapage). You can reach them via admin@jshint.org.
|
107 |
|
108 | ## Previous Maintainers
|
109 |
|
110 | Originating from the JSLint project in 2010, JSHint has been maintained by a
|
111 | number of dedicated individuals. In chronological order, they are: Douglas
|
112 | Crockford, Anton Kovalyov, and Mike Sherov. We appreciate their long-term
|
113 | commitment!
|
114 |
|
115 | ## Thank you!
|
116 |
|
117 | We really appreciate all kinds of feedback and contributions. Thanks for using and supporting JSHint!
|