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.os.* #532

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

Missing autofix for methods related to jQuery.os.* #532

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.os.*

Methods related to jQuery.os.* are deprecated. Therefore an autofix should be offered by UI5 linter.

Deprecated APIs:

  • jQuery.os.os
  • jQuery.os.fVersion
  • jQuery.os.version
  • jQuery.os.Android
  • jQuery.os.bb
  • jQuery.os.iOS
  • jQuery.os.winphone
  • jQuery.os.win
  • jQuery.os.linux
  • jQuery.os.mac

Deprecated Usage

var osName = jQuery.os.os;
var osVersion = jQuery.os.fVersion;
var osVersionString = jQuery.os.version;
var isAndroid = jQuery.os.Android;
var isBlueBerry = jQuery.os.bb;
var isIOS = jQuery.os.iOS;
var isWinPhone = jQuery.os.winphone;
var isWin = jQuery.os.win;
var isLinux = jQuery.os.linux;
var isMac = jQuery.os.mac;

Recommended Usage

sap.ui.define([
  "sap/ui/Device"
], (Device) => {
  var osName = Device.os.name;
  var osVersion = Device.os.version;
  var osVersionString = Device.os.versionStr;
  var isAndroid = Device.os.name === "Android";
  var isBlueBerry = Device.os.name === "bb";
  var isIOS = Device.os.name === "iOS";
  var isWinPhone = Device.os.name === "winphone";
  var isWin = Device.os.name === "win";
  var isLinux = Device.os.name === "linux";
  var isMac = Device.os.name === "mac";
});
@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