Question for Webstorm users: For the JavaScript l...
# suitescript
s
Question for Webstorm users: For the JavaScript language version, I can either select ES 5.1, which then complains about the use of the
const
keyword for variables, or I can select ES 6, which then complains about using the
var
keyword for mutable variables, telling me to use
let
instead. How have you guys suppressed this noise, or worked around it? It's a minor thing, but I dislike having to mentally ignore the noise. I want the warnings and alerts to be meaningful.
j
This has been bugging me for months, and your ask gave me the push to figure it out. Go to Code >> Inspect Code. In the bottom portion right lick the warning to suppress and select the edit settings. Then you can uncheck the let/var warning. Thanks for the motivation since this is now visually better for me too 😜
s
Awesome, thank you! I am still learning Webstorm and its settings. Mostly it's a huge improvement over Eclipse.
s
I recommend switching to TypeScript so you can program in modern JS and just target ES5 for deployment.
s
There has been ongoing debate about adopting TypeScript at our company, but amongst the several dozen JavaScript developers (and the many other developers who also know JavaScript), very few people had TypeScript experience. As a result, it was decided that keeping code in JavaScript was preferred, in order to leverage everyone's collective expertise and experience with JS. Code written in TS or some other variant might not be easy for another developer to maintain. At this point, I doubt TS will ever take off here. We are moving towards ES2018 and beyond, which can also be transpiled to ES5.
s
10-4, everyone's situation is unique