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

Missing autofix for methods related to jQuery.sap.* (Array Utils) #528

Open
2 tasks
flovogt opened this issue Feb 11, 2025 · 1 comment
Open
2 tasks

Missing autofix for methods related to jQuery.sap.* (Array Utils) #528

flovogt opened this issue Feb 11, 2025 · 1 comment
Labels
autofix An issue related to the autofix capabilities enhancement New feature or request

Comments

@flovogt
Copy link
Member

flovogt commented Feb 11, 2025

Missing autofix for methods related to jQuery.sap.* (Array Utils)

Methods related to jQuery.sap.* (Array Utils) are deprecated. Therefore an autofix should be offered by UI5 linter.

Deprecated APIs:

  • jQuery.sap.arraySymbolDiff
  • jQuery.sap.unique

Deprecated Usage

var aData1 = ["orange", "apple", "banana"];
var aData2 = ["orange", "banana"];
var diff = jQuery.sap.arraySymbolDiff(aData1, aData2);

var aData3 = ["orange", "orange", "banana"];
var sortedCleanedArray = jQuery.sap.unique(aData3);

Recommended Usage

sap.ui.define([
  "sap/base/util/array/diff",
  "sap/base/util/array/uniqueSort"
], (diff, uniqueSort) => {
  var aData1 = ["orange", "apple", "banana"];
  var aData2 = ["orange", "banana"];
  var diff = diff(aData1, aData2);

  var aData3 = ["orange", "orange", "banana"];
  var sortedCleanedArray = uniqueSort(aData3);
});
@flovogt flovogt added autofix An issue related to the autofix capabilities enhancement New feature or request labels Feb 11, 2025
@flovogt
Copy link
Member Author

flovogt commented Feb 11, 2025

Will be implemented in CPOUI5FOUNDATION-990.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autofix An issue related to the autofix capabilities enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant