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

Using Directives in XML, YAML, HTML and other files #419

Open
marianfoo opened this issue Nov 19, 2024 · 2 comments
Open

Using Directives in XML, YAML, HTML and other files #419

marianfoo opened this issue Nov 19, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@marianfoo
Copy link
Contributor

I'm not exactly sure whether it's a bug or a missing feature, but I can't switch off the rule in an XML view.

Expected Behavior

Using Directives in XML View turns off Error

Current Behavior

Comment in XML View does not effect in UI5 linter

Steps to Reproduce the Issue

  1. Use deprecated property in XML View like visibleRowCountMode in sap.ui.Table
  2. Add <!-- ui5lint-disable -->as comment in XML View
  3. Error still appears in lint report

Context

  • UI5 linter version: 1.3.1
  • Node.js version: 20

Log Output / Stack Trace

xmlns:t="sap.ui.table"
<!-- ui5lint-disable -->
  <t:Table
      id="targetTable"
      selectionMode="None"
      visibleRowCountMode="Auto"
      rows="{/rows}"
  >
/Users/marianzeis/DEV/ui5app/webapp/view/Main.view.xml
  158:38 error Use of deprecated property 'visibleRowCountMode' of class 'Table'. Details: (since 1.119) - use the `rowMode` aggregation instead.  no-deprecated-api
@marianfoo marianfoo added the bug Something isn't working label Nov 19, 2024
@RandomByte
Copy link
Member

From https://github.com/SAP/ui5-linter?tab=readme-ov-file#scope

Directives are currently supported in JavaScript and TypeScript files only; they are not supported in XML, YAML, HTML, or any other type of file.

We are tracking adding support for other file types in CPOUI5FOUNDATION-959. Relabeling as enhancement

@RandomByte RandomByte added enhancement New feature or request and removed bug Something isn't working labels Nov 19, 2024
@marianfoo
Copy link
Contributor Author

Ah, I'm sorry, I had missed that

@marianfoo marianfoo changed the title Directives not working in XML View Using Directives in XML View Nov 19, 2024
@marianfoo marianfoo changed the title Using Directives in XML View Using Directives in XML, YAML, HTML and other files Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants