JSHint

JSHint是一个帮助您检测JavaScript代码中的错误和潜在问题的工具。(JSHint is a tool that helps to detect errors and potential problems in your JavaScript code.)

Github stars Tracking Chart

JSHint是一个在JavaScript编写的程序中标记可疑用法的程序。 核心项目包括一个库本身以及作为Node模块分发的CLI程序。

JSHint是一个社区驱动的工具,用于检测JavaScript代码中的错误和潜在问题。由于JSHint非常灵活,您可以在期望执行代码的环境中轻松调整它。 JSHint是开源的,永远都是这样。

JSHint的目标
该项目旨在帮助JavaScript开发人员编写复杂的程序,而不用担心打字错误和语言错误。
任何代码基地在某种程度上最终都变得巨大,所以简单的错误 - 在写入时不会显示出来 - 可以成为显示屏,并增加额外的调试时间。所以,静态代码分析工具发挥作用,帮助开发人员发现这样的问题。 JSHint扫描用JavaScript编写的程序,并报告常见的错误和潜在的错误。潜在的问题可能是语法错误,由于隐式类型转换引起的错误,泄漏的变量或其他完全的错误。
只有15%的程序在jshint.com上通过JSHint检查。在所有其他情况下,JSHint会发现一些可能是错误或潜在问题的红旗。
请注意,虽然静态代码分析工具可以发现许多不同种类的错误,但它无法检测您的程序是否正确,快速或内存泄漏。您应该始终将JSHint等工具与单元和功能测试以及代码审查相结合。

Overview

Name With Ownerjshint/jshint
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 2)
Platform
License:MIT License
Release Count85
Last Release Name2.13.6 (Posted on 2022-11-11 14:07:19)
First Release Name2011-04-16 (Posted on 2011-04-16 10:05:33)
Created At2011-01-19 22:28:53
Pushed At2023-08-24 04:15:22
Last Commit At
Stargazers Count8.9k
Watchers Count292
Fork Count1.7k
Commits Count2.3k
Has Issues Enabled
Issues Count2412
Issue Open Count390
Pull Requests Count527
Pull Requests Open Count64
Pull Requests Close Count622
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

JSHint, A Static Code Analysis Tool for JavaScript

[ Use it online
DocsFAQ
Install
Contribute
BlogTwitter ]

NPM version
Linux Build Status
Windows Build status
Dependency Status
devDependency Status
Coverage Status

JSHint is a community-driven tool that detects errors and potential problems in
JavaScript code. Since JSHint is so flexible, you can easily adjust it in
the environment you expect your code to execute. JSHint is open source and
will always stay this way.

Our goal

The project aims to help JavaScript developers write complex programs
without worrying about typos and language gotchas.

Any code base eventually becomes huge at some point, so simple mistakes — that
would not show themselves when written — can become show stoppers and add
extra hours of debugging. So, static code analysis tools come into play
and help developers spot such problems. JSHint scans a program written in
JavaScript and reports about commonly made mistakes and potential bugs. The
potential problem could be a syntax error, a bug due to an implicit type
conversion, a leaking variable, or something else entirely.

Only 15% of all programs linted on jshint.com pass the
JSHint checks. In all other cases, JSHint finds some red flags that could've
been bugs or potential problems.

Please note, that while static code analysis tools can spot many different kind
of mistakes, it can't detect if your program is correct, fast or has memory
leaks. You should always combine tools like JSHint with unit and functional
tests as well as with code reviews.

Reporting a bug

To report a bug simply create a
new GitHub Issue and describe
your problem or suggestion. We welcome all kinds of feedback regarding
JSHint including but not limited to:

  • When JSHint doesn't work as expected
  • When JSHint complains about valid JavaScript code that works in all browsers
  • When you simply want a new option or feature

Before reporting a bug, please look around to see if there are any open or closed tickets
that discuss your issue, and remember the wisdom: pull request > bug report > tweet.

Who uses JSHint?

Engineers from these companies and projects use JSHint:

And many more!

License

Most files are published using the standard MIT Expat
license
. One file,
however, is provided under a slightly modified version of that license. The
so-called JSON license
is a non-free license, and unfortunately, we can't change it due to historical
reasons. This license is included as an in-line within the file it concerns.

The JSHint Team

JSHint is currently maintained by Rick Waldron,
Caitlin Potter, Mike
Pennisi
, and Luke
Page
. You can reach them via admin@jshint.org.

Previous Maintainers

Originating from the JSLint project in 2010, JSHint has been maintained by a
number of dedicated individuals. In chronological order, they are: Douglas
Crockford, Anton Kovalyov, and Mike Sherov. We appreciate their long-term
commitment!

Thank you!

We really appreciate all kinds of feedback and contributions. Thanks for using and supporting JSHint!

To the top