PhpStorm 3.0 and JsLint

In inpection setting I saw JSLint validation, but when I am trying to enable it, it doesn't working. As I can understand, it should hightlight JSLint errors?

16 comments
Comment actions Permalink

Yep, PhpStorm runs JSLint (if the inspection is enabled) once we have no fatal problems in file. We will have a blog post about it shortly.

0
Comment actions Permalink

So if internal validator doesn't see any fatal errors in file, JsLink check is running? In my case there was no fatal errors, but JsLink check wasn't running.
Is there a way to run JsLint check in any case?

0
Comment actions Permalink

Please provide exact snippet that does not trigger JSLint validation checks.

0
Comment actions Permalink

Well, here's one. We use Prototype extensively. With Assuem PrototypeJS is DISABLED, this should throw a warning of $ is undefined, correct?

$('MainUI_' + $sTabType + 'Table').show();

It doesn't.

0
Comment actions Permalink

Or Tolerate != and == is disabled and this should throw a warning, correct?

if(typeof($vArg3) == 'undefined'){

It doesn't.

0
Comment actions Permalink

I agree with Bogdan. I don't think it's working at all.

0
Comment actions Permalink

For example:


var f;


f = function () {
    var first = 1;
    var second = 2;


    return first + second;
};


alert(f());



Running jshint via command line:


> jshint test.js

src/test.js: line 5, col 9, Too many var statements.
src/test.js: line 10, col 1, 'alert' is not defined.


2 errors



But PHPStorm says: "No suspicious code found".

JSLink checkbox is checked in Inspections and "Use JSHint instead of JSLink" is checked too.
PhpStorm build 111.19
OS: ArchLinux

0
Comment actions Permalink

PhpStorm 3.0 produces error about "Too many var statements" under Windows.
What is your JDK?

0
Comment actions Permalink

Sun's (Oracle) JDK 1.7.0

0
Comment actions Permalink

PhpStorm 3.0 does not undergo much testing on JDK 1.7, please check if the feature works with JDK 1.6 (we use library from JDK to run JSLint / JSHint)

0
Comment actions Permalink

what is your JDK version?

0
Comment actions Permalink

Ah, I am on 1.7.0_01

0
Comment actions Permalink

It doesn't matter to me what version I run. Should I downgrade to JDK 1.6? Is that tricky or can I just uninstall and reinstall?

0
Comment actions Permalink

Works with JDK 1.6

0
Comment actions Permalink

We will fix this bug in 3.0.1, in the meaning time if you really need this functionality you can install JDK 1.6 and run PhpStorm with it

0

Please sign in to leave a comment.