UI5 / UI5/linter

Missing autofix for jQuery global usage

Open
#586 1 comment 0 reactions 1 assignee View on GitHub

@flovogt is already working on this.

Since Aug 11, 2026.

autofix
Dominant language
TypeScript
Stars
79
Forks
13
Avg merge
19h 34m
Merged PRs (30d)
9

Description

Missing autofix for methods related to jQuery.* (jQuery Global Replacement)

Deprecated APIs:

  • The usage of the globals jQuery / $ is deprecated. Therefore the module sap/ui/thirdparty/jquery should be used.
  • jQuery.isPlainObject Follow-Up of #529
  • jQuery.isArray Follow-Up of #590
  • jQuery.isArray Follow-Up of #590

Deprecated Usage

var myFancyControl = jQuery(".fancyContainer");

var myData = ["a", "b", "c"];
var indexOfEntity = jQuery.inArray("b", myData);
var isValueAnArray = jQuery.isArray(myData);

Recommended Usage

sap.ui.define([
   "sap/ui/thirdparty/jquery"
], (jQuery) => {
  "use strict";
  var myFancyControl = jQuery(".fancyContainer");

  var myData = ["a", "b", "c"];
  var indexOfEntity = (myData ? Array.prototype.indexOf.call(myData, "b") : -1);
  var isValueAnArray = Array.isArray(myData);
});

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.