SAP / ui5-tooling

An open and modular toolchain to develop state of the art applications based on the UI5 framework
https://sap.github.io/ui5-tooling
Apache License 2.0
466 stars 71 forks source link

Provide UI5 Best Practices linter support #212

Closed HoffmannThomas closed 4 years ago

HoffmannThomas commented 4 years ago

Expected Behavior

Proper UI5 linting

Current Behavior

No linting

Steps to reproduce the issue

  1. Use SDK pipeline and configure ES6+ support (https://github.com/SAP/cloud-s4-sdk-pipeline-lib/blob/master/vars/checkUi5BestPractices.groovy#L55-L64 + https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/configuration.md#lint)
  2. Review lint result
  3. Attempt to get the same result locally

Affected components (if known)

nils-kasseckert commented 4 years ago

To execute the UI5 linting from the cloud SDK locally you can use the UI5 Lint Script. I have opened a pull request so that you can set the ES language version. See here

Perhaps it would be good to integrate it into UI5 tooling

RandomByte commented 4 years ago

As stated here and also discussed via mail, the @sap/di.code-validation.js module will not be open sourced in the foreseeable future. Therefore I don't see how a good integration into the UI5 Tooling could be achieved.

Regarding linting in general, I would expect there to be an open source ESLint plugin, offering UI5 specific rules. This could then be used directly with ESLint and independently of the UI5 Tooling. I currently don't see a reason for implementing code linting capabilities into the UI5 Tooling.

Therefore closing this issue in favor of https://github.com/SAP/openui5/issues/2482