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

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

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

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

0

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

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

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

It doesn't.

0

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

0

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

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

0

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

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

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.