Using UI5 linter with UI5 CLI v5 Projects #1110
Pinned
flovogt
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Currently, UI5 linter depends on UI5 CLI v4 packages. As a result, developers who are evaluating the next major version of UI5 CLI cannot run UI5 linter when their project is configured with specVersion: "5.0" in ui5.yaml.
While the long-term goal is to provide a UI5 linter version that is compatible with UI5 CLI v5, a simple workaround allows you to continue using UI5 linter with UI5 CLI v5-based projects.
Guide
1. Create a dedicated configuration file
Create a new file named
ui5-lint.yamlnext to your existingui5.yamlfile2. Projects using UI5 CLI v5 without the new component project type
If your project uses UI5 CLI v5 but does not use the new component project type, add the following content to
ui5-lint.yaml:3. Projects using the new component project type
If your project uses the new component project type, add the following content instead:
4. Update the project name
Replace the placeholder
<your_app_name>in themetadata.nameproperty with the project name defined in your project'sui5.yaml.5. Adjust your npm script
If you run UI5 linter using a script defined in the
package.json, update the script to reference the new configuration file:6. Adjust global UI5 linter executions
If you run UI5 Linter through a global installation, use the following command:
Summary
If your project has already moved to UI5 CLI v5, UI5 linter can still be used by pointing it to a dedicated
ui5-lint.yamlfile based on specVersion: "4.0". While this requires a small amount of additional configuration, it allows you to continue using UI5 linter until native UI5 CLI v5 support becomes available.All reactions