Webstorm doesn't recognise Object.defineProperty

I'm using Webstorm 9.0.1 with javascript language version ECMAScript 5.1 selected in the settings.
Whenever I use Object.defineProperty or Object.create, the syntax highlighter shows that Webstorm has not recognised the method. If I mouse over the function I get the tooltip 'Unresolved function or method defineProperty'. I'm sure these functions used to be recognised but I'm not sure what I have changed. It may have started happening when I upgraded to 9.0.1 from version 7 I think.
Can anybody tell me how I can get the sytax highlighting to correctly identify these as valid methods of Object?

4 comments
Comment actions Permalink

Please make sure you have 'HTML5/EcmaScript 5' library enabled in Settings/Languages & Frameworks/javaScript/Libraries

0
Comment actions Permalink

Oh, you are right - none of the boxes in that panel were ticked! I wonder how that happened? Is there a way I can ensure that ECMAScript 5 is ticked by default when I create a new project?

0
Comment actions Permalink

'HTML' and 'HTML/Ecmascript 5' are always enabled for new projects...

0
Comment actions Permalink

That's what I would have expected. But I definitely did not choose to disable them for this project, I didn't even know that panel existed. So I'm a bit confused as to how they got disabled now.
But as long as they are enabled by default for any new projects I make then all is well.
Thanks for your help.

0

Please sign in to leave a comment.