I am currently writing lightning components and to do so I use Ecmascript2015 standard (Object.assign, const, let, ...).

Everything works perfectly but the https://www.npmjs.com/package/salesforce-lightning-cli is used to lint my code with the built-in rules and it gives errors when using const or let.

Will ES6 be fully supported in the future ? So I can leave those eslint issues unresolved. Or is it better to stay with es5 block-scope ?

  • ES5 with use strict would be what's wise to use for now. – crmprogdev Sep 26 '16 at 13:20

It's safe to use ES6 constructs as long as you do not require Lightning to do any transpilation for you to support non ES6 compliant browsers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.