Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter doesn't take ui5 version into account? #50

Closed
rpbouman opened this issue Mar 25, 2024 · 5 comments
Closed

Linter doesn't take ui5 version into account? #50

rpbouman opened this issue Mar 25, 2024 · 5 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@rpbouman
Copy link

Expected Behavior

I expected the linter would pick up the ui5 version from the bootstrap script in my index.html

Current Behavior

I changed the ui5 version from 1.108.27 to 1.120.11 by changing the url in my bootstrap script tag in index.html:

    <script
      id="sap-ui-bootstrap"
      src="https://sapui5.hana.ondemand.com/1.120.11/resources/sap-ui-core.js"
      ....  
    > 

I ran the linter but the error report was identical. However, when running the ui5 app with the 1.120 version, there were numerous deprecation messages in the console log. I would love to catch those with the linter without having to run the app (and access every feature to see if the runtime generates deprecation messages)

Steps to Reproduce the Issue

  1. create app run linter
  2. update ui5 uri in bootstrap script
  3. run linter again

Context

UI5 linter package and version: 0.1.3
Node.js Version: v20.11.1
npm 9.6.4
OS/Platform: Microsoft Windows 10 Enterprise

@rpbouman rpbouman added the bug Something isn't working label Mar 25, 2024
@RandomByte
Copy link
Member

RandomByte commented Apr 2, 2024

At this point the UI5 version relevant to UI5 linter can't be configured. We plan to add this at a later time though.

For now, all deprecations are detected based on the UI5 API information for version 1.120: https://ui5.sap.com/1.120/

There are many cases that UI5 linter can't detect yet (see also #21). If you find that a deprecated API is not properly detected (and not already listed on our roadmap), we welcome you to create an issue on that 👍

@RandomByte RandomByte closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
@RandomByte RandomByte added duplicate This issue or pull request already exists enhancement New feature or request and removed bug Something isn't working labels Apr 2, 2024
@rpbouman
Copy link
Author

rpbouman commented Apr 2, 2024

Thanks @RandomByte! Please accept my apology for posting a duplicate issue, this was not my intention.

@RandomByte
Copy link
Member

No worries Roland, and thanks for checking out UI5 linter! I'm just trying to clear new issues as good as possible. I hope I didn't suggest that your feedback is not welcome. On the contrary, we appreciate it and we will certainly take it into our discussions. It's helping us to shape the future of this tool. So please keep it coming 🙂

@John-H-Smith
Copy link

John-H-Smith commented Oct 1, 2024

@RandomByte Just to add a note here: Linting only against version 1.120 is really bad. In practice, the latest UI5 version is mostly not used (in business context) as the onprem systems run older versions. I worked with many ui5 projects for customers, but only a few of them are running version 1.120. Thus, the linter is not useful for most business projects.

@flovogt
Copy link
Member

flovogt commented Oct 2, 2024

We plan to offer an configuration option for the UI5 version, SAP internally tracked in backlog item CPOUI5FOUNDATION-856.

But please keep in mind: The main goal of the linter is to ensure your application runs with UI5 2.X. If your application is using best practices and no APIs deprecated until UI5 1.120, the app will run successfully with UI5 2.X.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants