JS Validation Differences vs. Aptana

So today, I was informed that several of my variable functions were missing ; at the end.  I don't use Aptana, I use Webstorm but our lead uses Aptana (feel sorry for him...jk).

Anyway, point is, if Aptana is set to use "Mozilla JavaScript Validator" and "JSLint JavaScript Validator", and my Webstorm is set to use JSLint with the fact that I guess by default or the core of Webstorm uses Mozilla Validation as well? (see http://www.jetbrains.com/webstorm/features/), then why isn't WebStorm pickin up the same warning about my missing ;?

Example of what Aptana caught that WS did not:

                    myTestTextBox = new CurrencyTextBox({
                                type: "text",
                            },
                            dojo.byId("txtTest"));
                            myTestTextBox .startup();
                }   <----- Aptana showing a warning that I'm missing a ";" here, while WS says it's all fine and dandy, no warnings

WTF?  This is pretty frustrating to say the least when I am not finding the same type of warnings when it appears I have enabled the same couple of validations that Aptana has enabled.  Am I missing something here fundamental about WS or what the heck?

10 comments

I'm not sure about JSLint, but there is an inspection that catches missing ; . Turn that on and you should no longer have this specific problem. As for other potential differences, perhaps someone more knowledgeable can help you more.
The inspection can be found here:
File | Settings | Project Settings | Inspections | JavaScript | Code style issues | Unterminated statement
(or simply search for Unterminated statement in the Settings window)

0

Hello!

WebStorm doesn't use Mozilla javascript validator for JavaScript checking (I'm not even sure what it is - may be, just a set of internal Aptana inspections?)
WebStorm has a set of its own JavaScript inspections, as it's mentioned above, including 'Unterminated statement' inspection. And it supports some standard code quality checkers - JSLint, JSHint and Closure Linter
Do you mean that JSLint shows different errors for the same code in Aptana and WebStorm? Are you sure that JSLint settings are the same in both tools?
Can you provide the self-containg code snippet that is accepted by JSLint in WebStorm and causes violations in Aptana? You can also check JSLint online validator (http://www.jslint.com/) to verify the result

Best regards,
Lena

0

WebStorm doesn't use Mozilla javascript validator for JavaScript checking

Then why does the documentation say otherwise?

http://www.jetbrains.com/webstorm/features/

JavaScript Debugger Based on Mozilla

With JetBrains WebStorm you can debug JavaScript code utilizing the complete range of features:

  • Breakpoints in HTML and JavaScript
  • Customizable breakpoint properties: suspend mode, conditions, pass count and more
  • Frames, variables and watches views in JavaScript debugger UI
  • Runtime evaluation of JavaScript expressions
0

thanks Tibos,

it just seems odd to me that WS would not act the same and you wouldn't expect to have to enable a single validation just to check for ;  even though Aptana is a different Application, still, you're enabling the same stuff in WS, it should act the same if uniformly turning on those elements are common throughout any App.  It seems odd to me that if I have the same stuff enabled, why would I be looking for an abstraction of a rule outside of those such as JsLint, Mozilla Debug, etc.

And a missing ; is FUNDAMENTAL and to me you wouldn't even question having to select a one-off case like this in the propeties of WS period.

0

Maybe it's just me ... but I do not see what relation "JavaScript Debugger Based on Mozilla" has to your "Mozilla javascript validator"

0

ok then someone tell me what "based on Mozilla" means!?  Sure Mozilla is FF, but the debugger can be used with Chrome so what's the deal with that statement in the feature set.  What does this really mean!?

0

File | Settings | Project Settings | Inspections | JavaScript | Code style issues | Unterminated statement

this was already turned on and it still did not warn me.

now what?

0

May be, it just means that you can debug javascript in FireFox?
Seems that the docs were simply not updated in time to mention Chrome support

0

The 'Unterminated statement' inspection works correctly for me. Please, provide a self-containing
code snippet that shows up your problem (as I have asked you above). The one mentioned in your post is invalid (unbalansed {}), so I'm not sure what you actual construction looks like


Best regards,
Lena

0

seems odd if that's how they stated it if that's the case.

0

Please sign in to leave a comment.