GithubHelp home page GithubHelp logo

jshint.github.io's Introduction

JSHint, A Static Code Analysis Tool for JavaScript

[ Use it onlineDocsFAQInstallContributeBlogTwitter ]

NPM version Linux Build Status Windows Build 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 publicly available 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

JSHint is licensed under the MIT Expat license.

Prior to version 2.12.0 (release in August 2020), JSHint was partially licensed under the non-free JSON license. The 2020 Relicensing document details the process maintainers followed to change the license.

The JSHint Team

JSHint is currently maintained by Rick Waldron, Caitlin Potter, Mike Pennisi, and Luke Page. You can reach them via [email protected].

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!

jshint.github.io's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jshint.github.io's Issues

Publish documentation for old versions

Currently the docs reflect the latest release of JSHint. It would be great if the website could also expose information on prior releases because this recently-suggested approach (though value) is far from ideal:

You can browse to the version of which you are looking for documentation (v2.8.0) and read the comments in src/options.js

Because we are generating documentation from the source code, the ideal solution (as I see it) will require a fair amount of work. Pseudocode:

for each tag of the source code
  look up a version-specific source code parsing function
  apply that function to the code
  expand the documentation template with the parsed variables
update documentation pages to list all available versions

use available screen space

I have 1920 pixels of screen width, but about a third of that is not used while I have lines of code wrapped

Favicon?

Can we have a favicon for JsHint.com? Here are some ideas (note: these are much larger than the normal size would be:
image
image
Favicons are not only cool, but they look great in your address bar, especially when there are a lot of tabs:
image
They also dictate what the icon displayed in your bookmarks bar is when you bookmark JsHint.com.
Please add in favicons!

Support HTTPS

I would like to see jshint.com support HTTPS. Maybe use a service like CloudFlare?

split output in default/important

with 1-click you can move any output item from default to important grouping, and vice versa.
Would be good for concentrating on a certain parts to debug/improve

Option to disable re-linting after each key press

When dealing with large files (>~1000 lines) typing is very laggy because it is re-linted every keypress. It would be nice to have the option to show a button to lint instead of linting automatically.

Black Lives Matter solidarity statement

Hi JSHint team, I've been helping to add Black Lives Matter solidarity statements to some project's websites (like Test262 Report and P5.js) and would love to do the same for JSHint. Perhaps something similar to what emberjs.com has implemented in its website.

I'll be happy to submit a PR with these changes if my suggestion sounds ok to you.

Display JSHint version on index page

There is often some lag between new releases of the library and updates to the website. The website should clearly indicate which version of JSHint is in use to limit confusion immediately following new releases.

Some feature requests for the website

Moved from jshint/jshint#2244 (comment)

Can we add autocomplete for "Jump to docs"?
Can we add "go back to top" button after each option in the table?
Can we add a changelog page or migration guide? I can't find any deprecated option list on the page. It would be great for reference.

Thanks a lot!

Explain how to add multiple paths to --exclude

The docs should be updated to mention how to specify multiple paths in exclude. Currently it only says:

Allows you to specify directories which you DON'T want to be linted.

leaving the user to guess how to specify multiple directories.

I'm willing to submit a PR, but should it be against the master or the dev branch?

Document `prereq` option

This option is only available from .jshintrc files, so it belongs in the "Special Options" sections of the CLI page.

Broken/redirecting link on about page

The link to Pandoo TEK one the about page seems to act strangely, redirecting a few times and takes you to a suspect site.

If you need a replacement URL we are starting to use JSHint and would be happy to be listed.

/*global*/ or /*globals*/?

The "Inline configuration" section on the docs page suggests there are two primary inline directives: /*jshint*/ and /*global*/. However, the page proceeds to document /*globals*/ rather than /*global*/. While JSHint supports both, /*global*/ clearly seems preferred, given that it's what is used in JSHint's own JS files. (It's also the only supported option by JSHint.)

Should the docs be corrected? Expanded to note the alternative form?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.