Features PhpStorm WebStorm

How to lint your JavaScript with JSLint in real time

Do you have a habit running JSLint for your JavaScript code? If you do not have it because the running is tedious, then IDE can help you with it while you edit the code. Here is how.
Open Settings, type JSLint, enable an inspection, configure the options. Hit apply.

Here you go, errors from JSLint appears in your editor!

Develop with pleasure!

Comments below can no longer be edited.

16 Responses to How to lint your JavaScript with JSLint in real time

  1. Avatar

    James Van Dyke says:

    December 1, 2011

    Is this for 3.0 only?

    • Avatar

      Maxim Mossienko says:

      December 1, 2011


  2. Avatar

    dilbert says:

    December 1, 2011

    Do you know if it will it be in Idea ‘Ultimate’ 11 ?

  3. Avatar

    Mark Gellings says:

    December 1, 2011

    Perhaps the best way though is to automatically run it through your build server. 🙂

    • Avatar

      Maxim Mossienko says:

      December 1, 2011

      Build server is last defense line, when it runs as you code you can fix problems in no time.

  4. Avatar

    Andriy Dyeyev says:

    December 2, 2011

    Very useful feature.
    Waited for it. Using it already)

  5. Avatar

    Marius Butuc says:

    December 7, 2011

    Saw that RubyMine 3.2.4 doesn’t have this feature (yet).

    Will this be part of RubyMine 4.0? And if so, what’s the ETA for v4.0?

    • Avatar

      Maxim Mossienko says:

      December 8, 2011

      It should be part of RubyMine 4, ETA for RubyMine 4 is Q1 of 2012

  6. Avatar

    André Abt says:

    December 14, 2011

    Thanks for adding jslint and jshint validation. Not sure if all the comment annotation settings work though: “nomen: false” as example, dangling ‘_’ still trigger errors..

  7. Avatar

    Elwyn Malethan says:

    December 14, 2011

    I have written a plugin for IDEA Community Edition (up to version 10.x) that will inspect JavaScript source files using JSLint. Combined with a JSLint Maven plugin that runs at build time, I find it very useful as a sanity check on our code.


  8. Avatar

    Martin Cleaver says:

    March 4, 2012

    Is there anything to apply the advice to “combine this with previous ‘var’ statement”?

    Also, it might as well refactor the code to physically hoist all vars to the top of the function scope, as that’s how JS will interpret it.


  9. Avatar

    Oliver Pearmain says:

    May 2, 2012

    Is there anyway to get JSLint to inspect the javascript within tags in .htm files?

  10. Avatar

    Steve Mosley says:

    June 8, 2012

    Is there anyway to configure globals to be expected across the project?

    We are running JSHint during our build and that has a standard JSHint config file that includes a bunch of standard globals we use (require.js and the like.) So we don’t have /*global blah*/ in our files.

    • Avatar

      Sergey Simonchik says:

      June 8, 2012

      Yes, there is. It’s possible to specify all you global variables in “Predefined (, separated)” text field. This option is available in WebStorm 4.0.2.

Discover more