Thursday, June 13, 2019

Enable ES6 dialect in WebIDE (eslint)

SAP WebIDE in SAPUI5 project uses ESLint for code checking javascript code. ESLint uses rules for definition what is error or what is correct code. 

By default in WebIDE, configuration does not contain rules for ES6 dialect of javascript.

Good news is, that you can very easily add support for ES6.


  1. Right click on UI5 project folder in WebIDE
  2. Choose Project settings
  3. Select JavaScript under Code Checking
  4. In the Validator Configuration editor add new rule to env: {} part.
  5. Put there "es6":true

"env": { "browser": true, "node": true, "es6": true, "amd": true, "mocha": true, "jquery": true}
After that, Save and Close and error checking should be updated.

No comments:

Post a Comment