Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
OliverGraeff
Product and Topic Expert
Product and Topic Expert

A linter is a static code analysis tool used to find programming bugs, stylistic errors and suspicious constructs. The usage of a linter has many advantages such as

  • introducing an agreed level of code quality resulting in fewer errors in production,
  • delivering readable and maintainable code,
  • using a consistent code style making code reviews more efficient,
  • validating code security, and
  • ensuring a solid knowledge about code quality for all developers.

The UI5 team introduces UI5 linter to help improve your UI5 code.

300048_PayRelatedProcess_R.png

A focus of the first version released now are capabilities to validate the compliance to Best Practices for UI5 Developers. Following these best practices for new as well as existing apps has always been … well, … best practice. Going forward, this will be even more relevant as these best practices will be the basis for bringing an app to UI5 2.x. Please refer to Introducing OpenUI5 2.x to understand the approach of removing everything not required to comply with the best practices.

Features

UI5 linter is a static code analysis tool for UI5 projects. It checks JavaScript, XML, JSON, and other files in your project and reports the findings. It lists problematic code, which is not following the UI5 best practices, including

  • usage of deprecated APIs / libraries, which are going to be removed
  • synchronous loading mechanism negatively affecting overall performance, and
  • usage of global variables.

Please note: While the initial version of UI5 linter already provides good value, it is not yet covering all aspects and not all best practices for UI5 2.x. The UI5 team plans more versions in the next weeks, which can reveal more findings.

How To

UI5 linter is installed via the npm package manager and can be used via the CLI. Find details on how to install and use it on https://github.com/SAP/ui5-linter.

299599_Checklist_R.png

Become a UI5 linter hero

  1. Use the new UI5 linter today to
    • improve the static code quality of your UI5 code,
    • validate its compliance to UI5 best practices, and
    • prepare your project for UI5 2.x.

  2. Watch out for upcoming versions of the UI5 linter.
9 Comments