Early Access Program

“use strict” from ECMAScript 5 Is Supported in WebStorm / PhpStorm!

Recently JavaScript specification was incrementally advanced with: a) common coding pitfalls prevention mode (aka “strict mode“) and b) nice (yet de-facto already used) existing library additions. With several browsers around the corner completely supporting new-but-backward-compatible standard we are HAPPY to announce that WebStorm 2.0 (and PhpStorm 2.0 too) will help YOU to use these new productive stuff! The good news is that when your code uses “use strict” (example on the left), the editor will mark as ERRORS all that accesses of undefined global variables, duplicated parameters / property names, using with statements, using delete operator for unqualified variables, octal integer constants and more. As to standard library additions, all that new Object/Array members should have been suggested for latest EAP version users. What is new is that editor knows about fields defined with methods like Object.defineProperty, e.g. as on example screenshot below. We are waiting for EAP version feedback. Develop your JavaScript with more pleasure!

Comments below can no longer be edited.

14 Responses to “use strict” from ECMAScript 5 Is Supported in WebStorm / PhpStorm!

  1. Avatar

    Dylan Greene says:

    January 13, 2011

    The second screenshot is from npm. Could this be an early hint of Node support?

    Node.js support request:


  2. Avatar

    nikic says:

    January 14, 2011

    Is this already available in an EAP? At least I don’t get those things marked as errors in 102.114.

  3. Avatar

    nicity says:

    January 15, 2011

    It should be available in the latest EAP, to check please paste
    following code to separate js file:
    function foo() {
    “use strict”;
    a = 1;

  4. Avatar

    nikic says:

    January 15, 2011

    Yep, that works. Probably my old code simply wasn’t reindexed or whatever.

    Thanks for that πŸ™‚ JavaScript support is awesom in PHPStorm πŸ™‚

  5. Avatar

    nicity says:

    January 15, 2011

    Please file bugs in YouTrack if it will not work in particular contexts

  6. Avatar

    nicity says:

    January 17, 2011

    to Dilan: yes, v8 engine has implemented EcmaScript5 standard library and latter is used in NodeJS and related packages

  7. Avatar

    Bryan Green says:

    January 19, 2011

    The current beta seems to be hanging on search on very large javascript files. I have a js minimized file and searching gets hung BIG TIME on this file. I can send this your way if you want. This may have been present in the last release or two – unsure. Do you need me to create a ticket?

  8. Avatar

    Bryan Green says:

    January 19, 2011

    Regarding search – – Eventually, phpstorm just runs out of memory (XMX as 970MB and XX:MaxPermSize at 500MB)

  9. Avatar

    Simon says:

    January 20, 2011

    Keep up you fantastic work, phpStorm/webStorm rocks.

  10. Avatar

    nicity says:

    January 20, 2011

    2Bryan Green please report bugs to YouTrack providing additional information specified in http://devnet.jetbrains.net/docs/DOC-192

  11. Avatar

    David Rees says:

    January 31, 2011

    @Bryan Green, this issue you were seeing may have been fixed in the last EAP (WS103.8), see http://youtrack.jetbrains.net/issue/WI-4679.

  12. Avatar

    David Rees says:

    January 31, 2011

    One problem with the ECMA5 support is all the ECMA5 Object variants crowd out the other variants in code completion suggestions. See the following feature requests for fixing this:

    ability to indicate JS version or at least turnoff ECMAScript5.js suggestions

    Ability to order JS code completion suggestions by inheritance order rather than alphabetical order

    add option to filter system or top-level variants in JS code completion

  13. Avatar

    nicity says:

    February 2, 2011

    2David latest EAP (103.43) places Object below all user typed ones

  14. Avatar

    mark foley says:

    February 9, 2012

    Hi – I just registered webstorm 3, and searched the net for ‘option explicit for javascript’. Came across this and it’s the best news I’ve heard so far for making JS easier to work with!