Dumb question. Where do we manage error messages?

Every time I write a JS function I get told off by PS for using var instead of let or const. I feel neither of these two are yet really safe in the real world as they only became supported in 2015 and they are only marginally better than var.

Is there an easy way to get PS to stop telling me I am bad every time I write a function?

 

ADDITIONAL RELATED QUESTION. My files always have a gazillion warning. Is there a way to say OK I have seen then to clear the list then I can spot if I really make any howlers.

 

TIA Steve

0

You can disable  'var' used instead of 'let' or 'const' in Settings | Editor | Inspections | JavaScript | ECMAScript 6 migration aids to avoid seeing this warning. Also, if you are targeting old browsers, etc. that don't support ES2015, you should probably choose the appropriate Javascript language version in Settings | Languages & Frameworks | JavaScript

1

Thanks a million. I did look but guess it was buried amongst the other JavaScript options.

All the best Steve

1

请先登录再写评论。