diff --git a/src/linter/ui5Types/fix/collections/jqueryFixes.ts b/src/linter/ui5Types/fix/collections/jqueryFixes.ts index 57f5b845f..e6fcbf460 100644 --- a/src/linter/ui5Types/fix/collections/jqueryFixes.ts +++ b/src/linter/ui5Types/fix/collections/jqueryFixes.ts @@ -77,11 +77,21 @@ t.declareModule("jQuery", [ scope: FixScope.FirstChild, })), ]), + t.namespace("resources", [ + t.namespace("isBundle", callExpressionGeneratorFix({ // https://github.com/SAP/ui5-linter/issues/657 + moduleName: "sap/base/i18n/ResourceBundle", + generator(_ctx, [moduleIdentifier], arg1) { + return `${arg1.trim()} instanceof ${moduleIdentifier}`; + }, + })), + ], // jQuery.sap.resources => ResourceBundle.create - t.namespace("resources", accessExpressionFix({ // https://github.com/SAP/ui5-linter/issues/521 + callExpressionFix({ // https://github.com/SAP/ui5-linter/issues/521 + scope: FixScope.FirstChild, moduleName: "sap/base/i18n/ResourceBundle", propertyAccess: "create", - })), + }) + ), t.namespace("encodeCSS", accessExpressionFix({ // https://github.com/SAP/ui5-linter/issues/524 moduleName: "sap/base/security/encodeCSS", })), @@ -714,6 +724,47 @@ t.declareModule("jQuery", [ return res; }, })), + t.namespace("delayedCall", callExpressionGeneratorFix<{isFnString: boolean}>({ + validateArguments: (ctx, _, _timeout, _objCtx, fnName) => { + ctx.isFnString = !!fnName && ts.isStringLiteralLike(fnName); + return true; + }, + generator: (ctx, _, timeout, objCtx, fnName, params) => { + let fnRepresentation; + if (ctx.isFnString) { + fnRepresentation = `${objCtx.trim()}[${fnName.trim()}].bind(${objCtx.trim()})`; + } else { + fnRepresentation = `${fnName.trim()}.bind(${objCtx.trim()})`; + } + + return `setTimeout(${fnRepresentation}, ${timeout}${params ? ", ..." + params.trim() : ""})`; + }, + })), + t.namespace("clearDelayedCall", callExpressionFix({ + globalName: "clearTimeout", + })), + t.namespace("intervalCall", callExpressionGeneratorFix<{isFnString: boolean}>({ + globalName: "setInterval", + validateArguments: (ctx, _, _timeout, _objCtx, fnName) => { + ctx.isFnString = !!fnName && ts.isStringLiteralLike(fnName); + return true; + }, + generator: (ctx, _, timeout, objCtx, fnName, params) => { + let fnRepresentation; + if (ctx.isFnString) { + fnRepresentation = `${objCtx.trim()}[${fnName.trim()}].bind(${objCtx.trim()})`; + } else { + fnRepresentation = `${fnName.trim()}.bind(${objCtx.trim()})`; + } + + return `setInterval(${fnRepresentation}, ${timeout}${params ? ", ..." + params.trim() : ""})`; + }, + })), + t.namespace("clearIntervalCall", callExpressionGeneratorFix({ + generator: (_ctx, _, cbId) => { + return `clearInterval(${cbId})`; + }, + })), ]), // jQuery.sap // jQuery t.namespace("inArray", callExpressionGeneratorFix({ diff --git a/test/fixtures/autofix/jQueryNativeReplacements.js b/test/fixtures/autofix/jQueryNativeReplacements.js index 274d09314..13de3f81b 100644 --- a/test/fixtures/autofix/jQueryNativeReplacements.js +++ b/test/fixtures/autofix/jQueryNativeReplacements.js @@ -48,10 +48,29 @@ sap.ui.define(["sap/ui/thirdparty/jquery"], async function (jQuery) { var delayedCallId = jQuery.sap.delayedCall(1000, myObject, "myFunction"); var delayedCallId2 = jQuery.sap.delayedCall(1000, myObject, myObject.myFunction, ["myParam1"]); var delayedCallId3 = jQuery.sap.delayedCall(1000, window, Array.isArray, ["myParam1"]); + var delayedCallId4 = jQuery.sap.delayedCall(1000, this, function () { + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content + }, ["myParam1", "myParam2"]); + // OPA tests use this to wait for something to be ready + jQuery.sap.delayedCall(1000, this, function () { + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content + + jQuery.sap.delayedCall(1000, this, function () { + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content + + jQuery.sap.delayedCall(1000, this, function () { + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content + }); + }); + }); + jQuery.sap.clearDelayedCall(delayedCallId); var intervalCallId = jQuery.sap.intervalCall(1000, myObject, "myFunction"); var intervalCallId2 = jQuery.sap.intervalCall(1000, myObject, myObject.myFunction, ["myParam1"]); var intervalCallId3 = jQuery.sap.intervalCall(1000, window, Array.isArray, ["myParam1"]); + var intervalCallId4 = jQuery.sap.intervalCall(1000, this, function () { + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content + }, ["myParam1", "myParam2"]); jQuery.sap.clearIntervalCall(intervalCallId); const document = globalThis.document; diff --git a/test/fixtures/autofix/jQueryNoModule.js b/test/fixtures/autofix/jQueryNoModule.js index c4fe0a97c..0784991d7 100644 --- a/test/fixtures/autofix/jQueryNoModule.js +++ b/test/fixtures/autofix/jQueryNoModule.js @@ -9,6 +9,9 @@ const bundle = jQuery.sap.resources({ url: "resources/i18n.properties" }); +// https://github.com/SAP/ui5-linter/issues/521 +var isBundle = jQuery.sap.resources.isBundle(myBundle); + // https://github.com/SAP/ui5-linter/issues/522 const logObject = jQuery.sap.log; const myLogger = jQuery.sap.log.getLogger(); diff --git a/test/fixtures/autofix/jQuerySap.js b/test/fixtures/autofix/jQuerySap.js index e952f0ea7..e8d7443e5 100644 --- a/test/fixtures/autofix/jQuerySap.js +++ b/test/fixtures/autofix/jQuerySap.js @@ -11,8 +11,12 @@ sap.ui.define(["sap/base/strings/NormalizePolyfill"], async function (NormalizeP const bundle = jQuery.sap.resources({ url: "resources/i18n.properties" }); + + // https://github.com/SAP/ui5-linter/issues/521 + var myBundle = innerScopeResourceBundle.create({url : "i18n/messagebundle.properties"}); + var isBundle = jQuery.sap.resources.isBundle(myBundle); }); - + // https://github.com/SAP/ui5-linter/issues/522 const logObject = jQuery.sap.log; const myLogger = jQuery.sap.log.getLogger(); diff --git a/test/fixtures/e2e/runtime/test/qunit/jQuery.sap.resources.qunit.js b/test/fixtures/e2e/runtime/test/qunit/jQuery.sap.resources.qunit.js new file mode 100644 index 000000000..4e97e9ee8 --- /dev/null +++ b/test/fixtures/e2e/runtime/test/qunit/jQuery.sap.resources.qunit.js @@ -0,0 +1,14 @@ +/*global QUnit */ +sap.ui.define(["sap/base/i18n/ResourceBundle"], (ResourceBundle) => { + "use strict"; + + QUnit.module("jQuery.sap.resources"); + + QUnit.test("jQuery.sap.resources.isBundle", function (assert) { + // https://github.com/SAP/ui5-linter/issues/521 + var myBundle = ResourceBundle.create({url : "i18n/messagebundle.properties"}); + var isBundle = jQuery.sap.resources.isBundle(myBundle); + + assert.ok(isBundle, "ResourceBundle is recognized as a bundle"); + }); +}); diff --git a/test/fixtures/e2e/runtime/test/qunit/testsuite.qunit.js b/test/fixtures/e2e/runtime/test/qunit/testsuite.qunit.js index 8112817b5..a7bd5c7b5 100644 --- a/test/fixtures/e2e/runtime/test/qunit/testsuite.qunit.js +++ b/test/fixtures/e2e/runtime/test/qunit/testsuite.qunit.js @@ -22,6 +22,7 @@ sap.ui.define(() => { "jQuery.sap.setObject": {}, "jQuery.sap.startsWith": {}, "jQuery.sap.pad": {}, + "jQuery.sap.resources": {}, } }; diff --git a/test/lib/autofix/snapshots/autofix.fixtures.ts.md b/test/lib/autofix/snapshots/autofix.fixtures.ts.md index 2ce95c1ae..0678713a0 100644 --- a/test/lib/autofix/snapshots/autofix.fixtures.ts.md +++ b/test/lib/autofix/snapshots/autofix.fixtures.ts.md @@ -2749,14 +2749,324 @@ Generated by [AVA](https://avajs.dev). ␊ var myObject = {};␊ myObject.myFunction = function(param1, param2) {};␊ - var delayedCallId = jQuery.sap.delayedCall(1000, myObject, "myFunction");␊ - var delayedCallId2 = jQuery.sap.delayedCall(1000, myObject, myObject.myFunction, ["myParam1"]);␊ - var delayedCallId3 = jQuery.sap.delayedCall(1000, window, Array.isArray, ["myParam1"]);␊ - jQuery.sap.clearDelayedCall(delayedCallId);␊ - var intervalCallId = jQuery.sap.intervalCall(1000, myObject, "myFunction");␊ - var intervalCallId2 = jQuery.sap.intervalCall(1000, myObject, myObject.myFunction, ["myParam1"]);␊ - var intervalCallId3 = jQuery.sap.intervalCall(1000, window, Array.isArray, ["myParam1"]);␊ - jQuery.sap.clearIntervalCall(intervalCallId);␊ + var delayedCallId = setTimeout(myObject["myFunction"].bind(myObject), 1000);␊ + var delayedCallId2 = setTimeout(myObject.myFunction.bind(myObject), 1000, ...["myParam1"]);␊ + var delayedCallId3 = setTimeout(Array.isArray.bind(window), 1000, ...["myParam1"]);␊ + var delayedCallId4 = setTimeout(function () {␊ + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content␊ + }.bind(this), 1000, ...["myParam1", "myParam2"]);␊ + // OPA tests use this to wait for something to be ready␊ + setTimeout(function () {␊ + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content␊ + ␊ + jQuery.sap.delayedCall(1000, this, function () {␊ + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content␊ + ␊ + jQuery.sap.delayedCall(1000, this, function () {␊ + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content␊ + });␊ + });␊ + }.bind(this), 1000);␊ + ␊ + clearTimeout(delayedCallId);␊ + var intervalCallId = setInterval(myObject["myFunction"].bind(myObject), 1000);␊ + var intervalCallId2 = setInterval(myObject.myFunction.bind(myObject), 1000, ...["myParam1"]);␊ + var intervalCallId3 = setInterval(Array.isArray.bind(window), 1000, ...["myParam1"]);␊ + var intervalCallId4 = setInterval(function () {␊ + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content␊ + }.bind(this), 1000, ...["myParam1", "myParam2"]);␊ + clearInterval(intervalCallId);␊ + ␊ + const document = globalThis.document;␊ + var element = globalThis.document.getElementById("popup");␊ + var element2 = globalThis.document.getElementById("popup");␊ + var element3 = null;␊ + const divList = document.getElementsByTagName("div");␊ + var isEqNode = !!divList[0]?.isEqualNode(divList[0]);␊ + ␊ + var person = {firstname: "Peter", lastname: "Miller" };␊ + var newObj = Object.create(person);␊ + var newObj2 = Object.create(null);␊ + var newObj3 = Object.create(null);␊ + var newObj4 = Object.create({});␊ + var getPerson = ((value) => () => value)(person);␊ + ␊ + var myData = ["a", "b", "c"];␊ + var indexOfEntity = jQuery.inArray("b", myData);␊ + var isValueAnArray = jQuery.isArray(myData);␊ + });␊ + ` + +> AutofixResult iteration #1: /jQueryNativeReplacements.js + + `sap.ui.define(["sap/ui/thirdparty/jquery"], async function (jQuery) {␊ + // https://github.com/SAP/ui5-linter/issues/590␊ + ␊ + var isStandAlone = navigator.standalone;␊ + var retinaDisplay = jQuery.support.retina;␊ + var emptyString = "";␊ + var startsWithH = "Hello".startsWith("H");␊ + var startsWithH2 = jQuery.sap.startsWith();␊ + var startsWithEmptyString = jQuery.sap.startsWith("Hello", emptyString); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startsWithEmptyString2 = jQuery.sap.startsWith("Hello", ""); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startsWithEmptyString3 = jQuery.sap.startsWith("Hello", ''); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startsWithEmptyString4 = jQuery.sap.startsWith("Hello", \`\`); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startText = "Hello";␊ + var startsWithLetter = "h";␊ + null.startsWith("H"); // Throws an exception, but is that way in the legacy code␊ + var startsWithH3 = (startText || "").startsWith("H");␊ + var startsWithH3 = jQuery.sap.startsWith(startText, startsWithLetter);␊ + var $1 = "$123"; // Usage of special characters for RegExp replacement should not cause issues␊ + var sName = ($1 || "").startsWith('$') ? $1 : encodeURIComponent($1);␊ + var startsWithHOrh = "Hello".toUpperCase().startsWith("h".toUpperCase());␊ + var startsWithHOrh2 = jQuery.sap.startsWithIgnoreCase(startText, startsWithLetter);␊ + var startsWithHOrh3 = jQuery.sap.startsWithIgnoreCase(startText, startsWithLetter);␊ + var startsWithHOrh4 = jQuery.sap.startsWithIgnoreCase(startText, 10);␊ + var startsWithHOrh4 = jQuery.sap.startsWithIgnoreCase(startText, null);␊ + var endsWithY = "Hello Y".endsWith("Y");␊ + var endsWithY2 = jQuery.sap.endsWith("Hello Y", startsWithLetter);␊ + var endsWithY3 = jQuery.sap.endsWith(startText, startsWithLetter);␊ + var endsWithY4 = jQuery.sap.endsWith("abcde", 10);␊ + var endsWithY5 = jQuery.sap.endsWith("abcde", null);␊ + var endsWithEmptyString = jQuery.sap.endsWith("Hello", emptyString); // Should not be replaced as the old API returns false for empty string but built-in String#endsWith returns true␊ + var endsWithEmptyString2 = jQuery.sap.endsWith("Hello", ""); // Should not be replaced as the old API returns false for empty string but built-in String#endsWith returns true␊ + var endsWithYOry = "Hello Y".toUpperCase().endsWith("y".toUpperCase());␊ + var endsWithYOry2 = (startText || "").toUpperCase().endsWith("y".toUpperCase());␊ + var endsWithYOry3 = jQuery.sap.endsWithIgnoreCase(startText, startsWithLetter);␊ + var padLeft = "a".padStart(4, "0");␊ + var padLeft2 = jQuery.sap.padLeft("a", "0000", 4);␊ + var padLeft3 = (startsWithLetter || "").padStart(4, "0");␊ + var padLeft4 = jQuery.sap.padLeft(startsWithLetter, startsWithLetter, 4);␊ + var padLeft5 = jQuery.sap.padLeft(startsWithLetter, startText, 8); // Should not be replaced as "startText" is more than one char and the old API behaves differently␊ + var padRight = "a".padEnd(4, "0");␊ + var padRight2 = jQuery.sap.padRight("a", "0000", 4);␊ + var padRight3 = (startsWithLetter || "").padEnd(4, "0");␊ + var padRight4 = jQuery.sap.padRight(startsWithLetter, startsWithLetter, 4);␊ + var padRight5 = jQuery.sap.padRight(startsWithLetter, startText, 8); // Should not be replaced as "startText" is more than one char and the old API behaves differently␊ + ␊ + var myObject = {};␊ + myObject.myFunction = function(param1, param2) {};␊ + var delayedCallId = setTimeout(myObject["myFunction"].bind(myObject), 1000);␊ + var delayedCallId2 = setTimeout(myObject.myFunction.bind(myObject), 1000, ...["myParam1"]);␊ + var delayedCallId3 = setTimeout(Array.isArray.bind(window), 1000, ...["myParam1"]);␊ + var delayedCallId4 = setTimeout(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + }.bind(this), 1000, ...["myParam1", "myParam2"]);␊ + // OPA tests use this to wait for something to be ready␊ + setTimeout(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + ␊ + setTimeout(function () {␊ + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content␊ + ␊ + jQuery.sap.delayedCall(1000, this, function () {␊ + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content␊ + });␊ + }.bind(this), 1000);␊ + }.bind(this), 1000);␊ + ␊ + clearTimeout(delayedCallId);␊ + var intervalCallId = setInterval(myObject["myFunction"].bind(myObject), 1000);␊ + var intervalCallId2 = setInterval(myObject.myFunction.bind(myObject), 1000, ...["myParam1"]);␊ + var intervalCallId3 = setInterval(Array.isArray.bind(window), 1000, ...["myParam1"]);␊ + var intervalCallId4 = setInterval(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + }.bind(this), 1000, ...["myParam1", "myParam2"]);␊ + clearInterval(intervalCallId);␊ + ␊ + const document = globalThis.document;␊ + var element = globalThis.document.getElementById("popup");␊ + var element2 = globalThis.document.getElementById("popup");␊ + var element3 = null;␊ + const divList = document.getElementsByTagName("div");␊ + var isEqNode = !!divList[0]?.isEqualNode(divList[0]);␊ + ␊ + var person = {firstname: "Peter", lastname: "Miller" };␊ + var newObj = Object.create(person);␊ + var newObj2 = Object.create(null);␊ + var newObj3 = Object.create(null);␊ + var newObj4 = Object.create({});␊ + var getPerson = ((value) => () => value)(person);␊ + ␊ + var myData = ["a", "b", "c"];␊ + var indexOfEntity = jQuery.inArray("b", myData);␊ + var isValueAnArray = jQuery.isArray(myData);␊ + });␊ + ` + +> AutofixResult iteration #2: /jQueryNativeReplacements.js + + `sap.ui.define(["sap/ui/thirdparty/jquery"], async function (jQuery) {␊ + // https://github.com/SAP/ui5-linter/issues/590␊ + ␊ + var isStandAlone = navigator.standalone;␊ + var retinaDisplay = jQuery.support.retina;␊ + var emptyString = "";␊ + var startsWithH = "Hello".startsWith("H");␊ + var startsWithH2 = jQuery.sap.startsWith();␊ + var startsWithEmptyString = jQuery.sap.startsWith("Hello", emptyString); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startsWithEmptyString2 = jQuery.sap.startsWith("Hello", ""); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startsWithEmptyString3 = jQuery.sap.startsWith("Hello", ''); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startsWithEmptyString4 = jQuery.sap.startsWith("Hello", \`\`); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startText = "Hello";␊ + var startsWithLetter = "h";␊ + null.startsWith("H"); // Throws an exception, but is that way in the legacy code␊ + var startsWithH3 = (startText || "").startsWith("H");␊ + var startsWithH3 = jQuery.sap.startsWith(startText, startsWithLetter);␊ + var $1 = "$123"; // Usage of special characters for RegExp replacement should not cause issues␊ + var sName = ($1 || "").startsWith('$') ? $1 : encodeURIComponent($1);␊ + var startsWithHOrh = "Hello".toUpperCase().startsWith("h".toUpperCase());␊ + var startsWithHOrh2 = jQuery.sap.startsWithIgnoreCase(startText, startsWithLetter);␊ + var startsWithHOrh3 = jQuery.sap.startsWithIgnoreCase(startText, startsWithLetter);␊ + var startsWithHOrh4 = jQuery.sap.startsWithIgnoreCase(startText, 10);␊ + var startsWithHOrh4 = jQuery.sap.startsWithIgnoreCase(startText, null);␊ + var endsWithY = "Hello Y".endsWith("Y");␊ + var endsWithY2 = jQuery.sap.endsWith("Hello Y", startsWithLetter);␊ + var endsWithY3 = jQuery.sap.endsWith(startText, startsWithLetter);␊ + var endsWithY4 = jQuery.sap.endsWith("abcde", 10);␊ + var endsWithY5 = jQuery.sap.endsWith("abcde", null);␊ + var endsWithEmptyString = jQuery.sap.endsWith("Hello", emptyString); // Should not be replaced as the old API returns false for empty string but built-in String#endsWith returns true␊ + var endsWithEmptyString2 = jQuery.sap.endsWith("Hello", ""); // Should not be replaced as the old API returns false for empty string but built-in String#endsWith returns true␊ + var endsWithYOry = "Hello Y".toUpperCase().endsWith("y".toUpperCase());␊ + var endsWithYOry2 = (startText || "").toUpperCase().endsWith("y".toUpperCase());␊ + var endsWithYOry3 = jQuery.sap.endsWithIgnoreCase(startText, startsWithLetter);␊ + var padLeft = "a".padStart(4, "0");␊ + var padLeft2 = jQuery.sap.padLeft("a", "0000", 4);␊ + var padLeft3 = (startsWithLetter || "").padStart(4, "0");␊ + var padLeft4 = jQuery.sap.padLeft(startsWithLetter, startsWithLetter, 4);␊ + var padLeft5 = jQuery.sap.padLeft(startsWithLetter, startText, 8); // Should not be replaced as "startText" is more than one char and the old API behaves differently␊ + var padRight = "a".padEnd(4, "0");␊ + var padRight2 = jQuery.sap.padRight("a", "0000", 4);␊ + var padRight3 = (startsWithLetter || "").padEnd(4, "0");␊ + var padRight4 = jQuery.sap.padRight(startsWithLetter, startsWithLetter, 4);␊ + var padRight5 = jQuery.sap.padRight(startsWithLetter, startText, 8); // Should not be replaced as "startText" is more than one char and the old API behaves differently␊ + ␊ + var myObject = {};␊ + myObject.myFunction = function(param1, param2) {};␊ + var delayedCallId = setTimeout(myObject["myFunction"].bind(myObject), 1000);␊ + var delayedCallId2 = setTimeout(myObject.myFunction.bind(myObject), 1000, ...["myParam1"]);␊ + var delayedCallId3 = setTimeout(Array.isArray.bind(window), 1000, ...["myParam1"]);␊ + var delayedCallId4 = setTimeout(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + }.bind(this), 1000, ...["myParam1", "myParam2"]);␊ + // OPA tests use this to wait for something to be ready␊ + setTimeout(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + ␊ + setTimeout(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + ␊ + setTimeout(function () {␊ + var padRight = jQuery.sap.padRight("a", "0", 4); // Also migrate internal content␊ + }.bind(this), 1000);␊ + }.bind(this), 1000);␊ + }.bind(this), 1000);␊ + ␊ + clearTimeout(delayedCallId);␊ + var intervalCallId = setInterval(myObject["myFunction"].bind(myObject), 1000);␊ + var intervalCallId2 = setInterval(myObject.myFunction.bind(myObject), 1000, ...["myParam1"]);␊ + var intervalCallId3 = setInterval(Array.isArray.bind(window), 1000, ...["myParam1"]);␊ + var intervalCallId4 = setInterval(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + }.bind(this), 1000, ...["myParam1", "myParam2"]);␊ + clearInterval(intervalCallId);␊ + ␊ + const document = globalThis.document;␊ + var element = globalThis.document.getElementById("popup");␊ + var element2 = globalThis.document.getElementById("popup");␊ + var element3 = null;␊ + const divList = document.getElementsByTagName("div");␊ + var isEqNode = !!divList[0]?.isEqualNode(divList[0]);␊ + ␊ + var person = {firstname: "Peter", lastname: "Miller" };␊ + var newObj = Object.create(person);␊ + var newObj2 = Object.create(null);␊ + var newObj3 = Object.create(null);␊ + var newObj4 = Object.create({});␊ + var getPerson = ((value) => () => value)(person);␊ + ␊ + var myData = ["a", "b", "c"];␊ + var indexOfEntity = jQuery.inArray("b", myData);␊ + var isValueAnArray = jQuery.isArray(myData);␊ + });␊ + ` + +> AutofixResult iteration #3: /jQueryNativeReplacements.js + + `sap.ui.define(["sap/ui/thirdparty/jquery"], async function (jQuery) {␊ + // https://github.com/SAP/ui5-linter/issues/590␊ + ␊ + var isStandAlone = navigator.standalone;␊ + var retinaDisplay = jQuery.support.retina;␊ + var emptyString = "";␊ + var startsWithH = "Hello".startsWith("H");␊ + var startsWithH2 = jQuery.sap.startsWith();␊ + var startsWithEmptyString = jQuery.sap.startsWith("Hello", emptyString); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startsWithEmptyString2 = jQuery.sap.startsWith("Hello", ""); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startsWithEmptyString3 = jQuery.sap.startsWith("Hello", ''); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startsWithEmptyString4 = jQuery.sap.startsWith("Hello", \`\`); // Should not be replaced as the old API returns false for empty string but built-in String#startsWith returns true␊ + var startText = "Hello";␊ + var startsWithLetter = "h";␊ + null.startsWith("H"); // Throws an exception, but is that way in the legacy code␊ + var startsWithH3 = (startText || "").startsWith("H");␊ + var startsWithH3 = jQuery.sap.startsWith(startText, startsWithLetter);␊ + var $1 = "$123"; // Usage of special characters for RegExp replacement should not cause issues␊ + var sName = ($1 || "").startsWith('$') ? $1 : encodeURIComponent($1);␊ + var startsWithHOrh = "Hello".toUpperCase().startsWith("h".toUpperCase());␊ + var startsWithHOrh2 = jQuery.sap.startsWithIgnoreCase(startText, startsWithLetter);␊ + var startsWithHOrh3 = jQuery.sap.startsWithIgnoreCase(startText, startsWithLetter);␊ + var startsWithHOrh4 = jQuery.sap.startsWithIgnoreCase(startText, 10);␊ + var startsWithHOrh4 = jQuery.sap.startsWithIgnoreCase(startText, null);␊ + var endsWithY = "Hello Y".endsWith("Y");␊ + var endsWithY2 = jQuery.sap.endsWith("Hello Y", startsWithLetter);␊ + var endsWithY3 = jQuery.sap.endsWith(startText, startsWithLetter);␊ + var endsWithY4 = jQuery.sap.endsWith("abcde", 10);␊ + var endsWithY5 = jQuery.sap.endsWith("abcde", null);␊ + var endsWithEmptyString = jQuery.sap.endsWith("Hello", emptyString); // Should not be replaced as the old API returns false for empty string but built-in String#endsWith returns true␊ + var endsWithEmptyString2 = jQuery.sap.endsWith("Hello", ""); // Should not be replaced as the old API returns false for empty string but built-in String#endsWith returns true␊ + var endsWithYOry = "Hello Y".toUpperCase().endsWith("y".toUpperCase());␊ + var endsWithYOry2 = (startText || "").toUpperCase().endsWith("y".toUpperCase());␊ + var endsWithYOry3 = jQuery.sap.endsWithIgnoreCase(startText, startsWithLetter);␊ + var padLeft = "a".padStart(4, "0");␊ + var padLeft2 = jQuery.sap.padLeft("a", "0000", 4);␊ + var padLeft3 = (startsWithLetter || "").padStart(4, "0");␊ + var padLeft4 = jQuery.sap.padLeft(startsWithLetter, startsWithLetter, 4);␊ + var padLeft5 = jQuery.sap.padLeft(startsWithLetter, startText, 8); // Should not be replaced as "startText" is more than one char and the old API behaves differently␊ + var padRight = "a".padEnd(4, "0");␊ + var padRight2 = jQuery.sap.padRight("a", "0000", 4);␊ + var padRight3 = (startsWithLetter || "").padEnd(4, "0");␊ + var padRight4 = jQuery.sap.padRight(startsWithLetter, startsWithLetter, 4);␊ + var padRight5 = jQuery.sap.padRight(startsWithLetter, startText, 8); // Should not be replaced as "startText" is more than one char and the old API behaves differently␊ + ␊ + var myObject = {};␊ + myObject.myFunction = function(param1, param2) {};␊ + var delayedCallId = setTimeout(myObject["myFunction"].bind(myObject), 1000);␊ + var delayedCallId2 = setTimeout(myObject.myFunction.bind(myObject), 1000, ...["myParam1"]);␊ + var delayedCallId3 = setTimeout(Array.isArray.bind(window), 1000, ...["myParam1"]);␊ + var delayedCallId4 = setTimeout(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + }.bind(this), 1000, ...["myParam1", "myParam2"]);␊ + // OPA tests use this to wait for something to be ready␊ + setTimeout(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + ␊ + setTimeout(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + ␊ + setTimeout(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + }.bind(this), 1000);␊ + }.bind(this), 1000);␊ + }.bind(this), 1000);␊ + ␊ + clearTimeout(delayedCallId);␊ + var intervalCallId = setInterval(myObject["myFunction"].bind(myObject), 1000);␊ + var intervalCallId2 = setInterval(myObject.myFunction.bind(myObject), 1000, ...["myParam1"]);␊ + var intervalCallId3 = setInterval(Array.isArray.bind(window), 1000, ...["myParam1"]);␊ + var intervalCallId4 = setInterval(function () {␊ + var padRight = "a".padEnd(4, "0"); // Also migrate internal content␊ + }.bind(this), 1000, ...["myParam1", "myParam2"]);␊ + clearInterval(intervalCallId);␊ ␊ const document = globalThis.document;␊ var element = globalThis.document.getElementById("popup");␊ @@ -2927,56 +3237,8 @@ Generated by [AVA](https://avajs.dev). line: 44, message: 'Unable to analyze this method call because the type of identifier "padRight" in "jQuery.sap.padRight(startsWithLetter, startText, 8)" could not be determined', }, - { - category: 1, - column: 22, - line: 48, - message: 'Unable to analyze this method call because the type of identifier "delayedCall" in "jQuery.sap.delayedCall(1000, myObject, "myFunction")" could not be determined', - }, - { - category: 1, - column: 23, - line: 49, - message: 'Unable to analyze this method call because the type of identifier "delayedCall" in "jQuery.sap.delayedCall(1000, myObject, myObject.myFunction, ["myParam1"])" could not be determined', - }, - { - category: 1, - column: 23, - line: 50, - message: 'Unable to analyze this method call because the type of identifier "delayedCall" in "jQuery.sap.delayedCall(1000, window, Array.isArray, ["myParam1"])" could not be determined', - }, - { - category: 1, - column: 2, - line: 51, - message: 'Unable to analyze this method call because the type of identifier "clearDelayedCall" in "jQuery.sap.clearDelayedCall(delayedCallId)" could not be determined', - }, - { - category: 1, - column: 23, - line: 52, - message: 'Unable to analyze this method call because the type of identifier "intervalCall" in "jQuery.sap.intervalCall(1000, myObject, "myFunction")" could not be determined', - }, - { - category: 1, - column: 24, - line: 53, - message: 'Unable to analyze this method call because the type of identifier "intervalCall" in "jQuery.sap.intervalCall(1000, myObject, myObject.myFunction, ["myParam1"])" could not be determined', - }, - { - category: 1, - column: 24, - line: 54, - message: 'Unable to analyze this method call because the type of identifier "intervalCall" in "jQuery.sap.intervalCall(1000, window, Array.isArray, ["myParam1"])" could not be determined', - }, - { - category: 1, - column: 2, - line: 55, - message: 'Unable to analyze this method call because the type of identifier "clearIntervalCall" in "jQuery.sap.clearIntervalCall(intervalCallId)" could not be determined', - }, ], - errorCount: 31, + errorCount: 23, fatalErrorCount: 0, filePath: 'jQueryNativeReplacements.js', messages: [ @@ -3164,70 +3426,6 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, - { - column: 22, - line: 48, - message: 'Use of deprecated API \'jQuery.sap.delayedCall\'', - messageDetails: 'Deprecated test message', - ruleId: 'no-deprecated-api', - severity: 2, - }, - { - column: 23, - line: 49, - message: 'Use of deprecated API \'jQuery.sap.delayedCall\'', - messageDetails: 'Deprecated test message', - ruleId: 'no-deprecated-api', - severity: 2, - }, - { - column: 23, - line: 50, - message: 'Use of deprecated API \'jQuery.sap.delayedCall\'', - messageDetails: 'Deprecated test message', - ruleId: 'no-deprecated-api', - severity: 2, - }, - { - column: 2, - line: 51, - message: 'Use of deprecated API \'jQuery.sap.clearDelayedCall\'', - messageDetails: 'Deprecated test message', - ruleId: 'no-deprecated-api', - severity: 2, - }, - { - column: 23, - line: 52, - message: 'Use of deprecated API \'jQuery.sap.intervalCall\'', - messageDetails: 'Deprecated test message', - ruleId: 'no-deprecated-api', - severity: 2, - }, - { - column: 24, - line: 53, - message: 'Use of deprecated API \'jQuery.sap.intervalCall\'', - messageDetails: 'Deprecated test message', - ruleId: 'no-deprecated-api', - severity: 2, - }, - { - column: 24, - line: 54, - message: 'Use of deprecated API \'jQuery.sap.intervalCall\'', - messageDetails: 'Deprecated test message', - ruleId: 'no-deprecated-api', - severity: 2, - }, - { - column: 2, - line: 55, - message: 'Use of deprecated API \'jQuery.sap.clearIntervalCall\'', - messageDetails: 'Deprecated test message', - ruleId: 'no-deprecated-api', - severity: 2, - }, ], warningCount: 0, }, @@ -3254,214 +3452,220 @@ Generated by [AVA](https://avajs.dev). url: "resources/i18n.properties"␊ })" could not be determined`, }, + { + category: 1, + column: 16, + line: 13, + message: 'Unable to analyze this method call because the type of identifier "isBundle" in "jQuery.sap.resources.isBundle(myBundle)" could not be determined', + }, { category: 1, column: 18, - line: 14, + line: 17, message: 'Unable to analyze this method call because the type of identifier "getLogger" in "jQuery.sap.log.getLogger()" could not be determined', }, { category: 1, column: 15, - line: 15, + line: 18, message: 'Unable to analyze this method call because the type of identifier "getLog" in "jQuery.sap.log.getLog()" could not be determined', }, { category: 1, column: 16, - line: 16, + line: 19, message: 'Unable to analyze this method call because the type of identifier "getLogEntries" in "jQuery.sap.log.getLogEntries()" could not be determined', }, { category: 1, column: 1, - line: 22, + line: 25, message: 'Unable to analyze this method call because the type of identifier "addLogListener" in "jQuery.sap.log.addLogListener(oLogListener)" could not be determined', }, { category: 1, column: 1, - line: 23, + line: 26, message: 'Unable to analyze this method call because the type of identifier "removeLogListener" in "jQuery.sap.log.removeLogListener(oLogListener)" could not be determined', }, { category: 1, column: 15, - line: 25, + line: 28, message: 'Unable to analyze this method call because the type of identifier "getLevel" in "jQuery.sap.log.getLevel()" could not be determined', }, { category: 1, column: 20, - line: 27, + line: 30, message: 'Unable to analyze this method call because the type of identifier "isLoggable" in "jQuery.sap.log.isLoggable(logLevel.DEBUG)" could not be determined', }, { category: 1, column: 1, - line: 29, + line: 32, message: 'Unable to analyze this method call because the type of identifier "logSupportInfo" in "jQuery.sap.log.logSupportInfo(true)" could not be determined', }, { category: 1, column: 1, - line: 30, + line: 33, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug("This is a debug log message")" could not be determined', }, { category: 1, column: 1, - line: 31, + line: 34, message: 'Unable to analyze this method call because the type of identifier "error" in "jQuery.sap.log.error("This is a error log message")" could not be determined', }, { category: 1, column: 1, - line: 32, + line: 35, message: 'Unable to analyze this method call because the type of identifier "fatal" in "jQuery.sap.log.fatal("This is a fatal log message")" could not be determined', }, { category: 1, column: 1, - line: 33, + line: 36, message: 'Unable to analyze this method call because the type of identifier "info" in "jQuery.sap.log.info("This is a info log message")" could not be determined', }, { category: 1, column: 1, - line: 34, + line: 37, message: 'Unable to analyze this method call because the type of identifier "trace" in "jQuery.sap.log.trace("This is a trace log message")" could not be determined', }, { category: 1, column: 1, - line: 35, + line: 38, message: 'Unable to analyze this method call because the type of identifier "warning" in "jQuery.sap.log.warning("This is a warning log message")" could not be determined', }, { category: 1, column: 15, - line: 38, + line: 41, message: 'Unable to analyze this method call because the type of identifier "encodeCSS" in "jQuery.sap.encodeCSS("+")" could not be determined', }, { category: 1, column: 14, - line: 39, + line: 42, message: 'Unable to analyze this method call because the type of identifier "encodeJS" in "jQuery.sap.encodeJS("\\"")" could not be determined', }, { category: 1, column: 15, - line: 40, + line: 43, message: 'Unable to analyze this method call because the type of identifier "encodeURL" in "jQuery.sap.encodeURL("a/b?c=d&e")" could not be determined', }, { category: 1, column: 25, - line: 41, + line: 44, message: 'Unable to analyze this method call because the type of identifier "encodeURLParameters" in "jQuery.sap.encodeURLParameters({ a: true, b: "d e" })" could not be determined', }, { category: 1, column: 16, - line: 42, + line: 45, message: 'Unable to analyze this method call because the type of identifier "encodeHTML" in "jQuery.sap.encodeHTML("

My Text

")" could not be determined', }, { category: 1, column: 15, - line: 43, + line: 46, message: 'Unable to analyze this method call because the type of identifier "encodeXML" in "jQuery.sap.encodeXML("")" could not be determined', }, { category: 1, column: 1, - line: 46, + line: 49, message: 'Unable to analyze this method call because the type of identifier "addUrlWhitelist" in "jQuery.sap.addUrlWhitelist("https", "example.com", 1337, "path")" could not be determined', }, { category: 1, column: 1, - line: 47, + line: 50, message: 'Unable to analyze this method call because the type of identifier "clearUrlWhitelist" in "jQuery.sap.clearUrlWhitelist()" could not be determined', }, { category: 1, column: 16, - line: 48, + line: 51, message: 'Unable to analyze this method call because the type of identifier "getUrlWhitelist" in "jQuery.sap.getUrlWhitelist()" could not be determined', }, { category: 1, column: 1, - line: 49, + line: 52, message: 'Unable to analyze this method call because the type of identifier "validateUrl" in "jQuery.sap.validateUrl("https://example.com")" could not be determined', }, { category: 1, column: 1, - line: 50, + line: 53, message: 'Unable to analyze this method call because the type of identifier "removeUrlWhitelist" in "jQuery.sap.removeUrlWhitelist(0)" could not be determined', }, { category: 1, column: 21, - line: 53, + line: 56, message: 'Unable to analyze this method call because the type of identifier "camelCase" in "jQuery.sap.camelCase(" First Name Last ")" could not be determined', }, { category: 1, column: 21, - line: 54, + line: 57, message: 'Unable to analyze this method call because the type of identifier "charToUpperCase" in "jQuery.sap.charToUpperCase("myValue", 0)" could not be determined', }, { category: 1, column: 23, - line: 55, + line: 58, message: 'Unable to analyze this method call because the type of identifier "escapeRegExp" in "jQuery.sap.escapeRegExp("ab.c")" could not be determined', }, { category: 1, column: 35, - line: 56, + line: 59, message: 'Unable to analyze this method call because the type of identifier "formatMessage" in "jQuery.sap.formatMessage("Say \'{0}\'", ["Hello"])" could not be determined', }, { category: 1, column: 16, - line: 57, + line: 60, message: 'Unable to analyze this method call because the type of identifier "hashCode" in "jQuery.sap.hashCode("test")" could not be determined', }, { category: 1, column: 22, - line: 58, + line: 61, message: 'Unable to analyze this method call because the type of identifier "hyphen" in "jQuery.sap.hyphen("fooBar")" could not be determined', }, { category: 1, column: 12, - line: 63, + line: 66, message: 'Unable to analyze this method call because the type of identifier "arraySymbolDiff" in "jQuery.sap.arraySymbolDiff(aData1, aData2)" could not be determined', }, { category: 1, column: 26, - line: 65, + line: 68, message: 'Unable to analyze this method call because the type of identifier "unique" in "jQuery.sap.unique(aData3)" could not be determined', }, { category: 1, column: 27, - line: 68, + line: 71, message: 'Unable to analyze this method call because the type of identifier "equal" in "jQuery.sap.equal({ a: 1, b: 2 }, { a: 1, b: 2 })" could not be determined', }, { category: 1, column: 1, - line: 69, + line: 72, message: `Unable to analyze this method call because the type of identifier "each" in "jQuery.sap.each({ name: "me", age: 32 }, function (sKey, oValue) {␊ console.log("key: " + sKey + ", value: " + oValue);␊ })" could not be determined`, @@ -3469,7 +3673,7 @@ Generated by [AVA](https://avajs.dev). { category: 1, column: 1, - line: 72, + line: 75, message: `Unable to analyze this method call because the type of identifier "forIn" in "jQuery.sap.forIn({ name: "you", age: 42 }, function (sKey, oValue) {␊ console.log("key: " + sKey + ", value: " + oValue);␊ })" could not be determined`, @@ -3477,65 +3681,65 @@ Generated by [AVA](https://avajs.dev). { category: 1, column: 16, - line: 76, + line: 79, message: 'Unable to analyze this method call because the type of identifier "parseJS" in "jQuery.sap.parseJS("{name: \'me\'}")" could not be determined', }, { category: 1, column: 13, - line: 77, + line: 80, message: 'Unable to analyze this method call because the type of identifier "extend" in "jQuery.sap.extend(true, {}, { name: "me" })" could not be determined', }, { category: 1, column: 24, - line: 78, + line: 81, message: 'Unable to analyze this method call because the type of identifier "now" in "jQuery.sap.now()" could not be determined', }, { category: 1, column: 13, - line: 79, + line: 82, message: 'Unable to analyze this method call because the type of identifier "properties" in "jQuery.sap.properties({ url: sap.ui.require.toUrl(sap.ui.require.toUrl("testdata/test.properties")) })" could not be determined', }, { category: 1, column: 13, - line: 80, + line: 83, message: 'Unable to analyze this method call because the type of identifier "uid" in "jQuery.sap.uid()" could not be determined', }, { category: 1, column: 9, - line: 81, + line: 84, message: 'Unable to analyze this method call because the type of identifier "Version" in "jQuery.sap.Version("3.6.2")" could not be determined', }, { category: 1, column: 12, - line: 83, + line: 86, message: 'Unable to analyze this method call because the type of identifier "syncStyleClass" in "jQuery.sap.syncStyleClass("sapUiSizeCompact", this.getView(), myDialog)" could not be determined', }, { category: 1, column: 58, - line: 83, + line: 86, message: 'Unable to analyze this method call because the type of identifier "getView" in "this.getView()" could not be determined', }, { category: 1, column: 1, - line: 84, + line: 87, message: 'Unable to analyze this method call because the type of identifier "setObject" in "jQuery.sap.setObject("name.lastname", "Miller", { name: { firstname: "me" } })" could not be determined', }, { category: 1, column: 19, - line: 85, + line: 88, message: 'Unable to analyze this method call because the type of identifier "getObject" in "jQuery.sap.getObject("name.firstname", 0, { name: { firstname: "me" } })" could not be determined', }, ], - errorCount: 54, + errorCount: 55, fatalErrorCount: 0, filePath: 'jQueryNoModule.js', messages: [ @@ -3556,8 +3760,16 @@ Generated by [AVA](https://avajs.dev). severity: 2, }, { - column: 19, + column: 16, line: 13, + message: 'Use of deprecated API \'jQuery.sap.resources.isBundle\'', + messageDetails: 'Deprecated test message', + ruleId: 'no-deprecated-api', + severity: 2, + }, + { + column: 19, + line: 16, message: 'Use of deprecated API \'jQuery.sap.log\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3565,7 +3777,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 18, - line: 14, + line: 17, message: 'Use of deprecated API \'jQuery.sap.log.getLogger\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3573,7 +3785,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 15, + line: 18, message: 'Use of deprecated API \'jQuery.sap.log.getLog\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3581,7 +3793,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 16, - line: 16, + line: 19, message: 'Use of deprecated API \'jQuery.sap.log.getLogEntries\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3589,7 +3801,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 22, + line: 25, message: 'Use of deprecated API \'jQuery.sap.log.addLogListener\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3597,7 +3809,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 23, + line: 26, message: 'Use of deprecated API \'jQuery.sap.log.removeLogListener\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3605,7 +3817,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 25, + line: 28, message: 'Use of deprecated API \'jQuery.sap.log.getLevel\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3613,7 +3825,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 18, - line: 26, + line: 29, message: 'Use of deprecated API \'jQuery.sap.log.Level\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3621,7 +3833,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 20, - line: 27, + line: 30, message: 'Use of deprecated API \'jQuery.sap.log.isLoggable\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3629,7 +3841,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 29, + line: 32, message: 'Use of deprecated API \'jQuery.sap.log.logSupportInfo\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3637,7 +3849,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 30, + line: 33, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3645,7 +3857,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 31, + line: 34, message: 'Use of deprecated API \'jQuery.sap.log.error\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3653,7 +3865,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 32, + line: 35, message: 'Use of deprecated API \'jQuery.sap.log.fatal\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3661,7 +3873,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 33, + line: 36, message: 'Use of deprecated API \'jQuery.sap.log.info\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3669,7 +3881,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 34, + line: 37, message: 'Use of deprecated API \'jQuery.sap.log.trace\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3677,7 +3889,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 35, + line: 38, message: 'Use of deprecated API \'jQuery.sap.log.warning\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3685,7 +3897,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 38, + line: 41, message: 'Use of deprecated API \'jQuery.sap.encodeCSS\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3693,7 +3905,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 14, - line: 39, + line: 42, message: 'Use of deprecated API \'jQuery.sap.encodeJS\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3701,7 +3913,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 40, + line: 43, message: 'Use of deprecated API \'jQuery.sap.encodeURL\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3709,7 +3921,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 25, - line: 41, + line: 44, message: 'Use of deprecated API \'jQuery.sap.encodeURLParameters\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3717,7 +3929,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 16, - line: 42, + line: 45, message: 'Use of deprecated API \'jQuery.sap.encodeHTML\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3725,7 +3937,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 43, + line: 46, message: 'Use of deprecated API \'jQuery.sap.encodeXML\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3733,7 +3945,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 46, + line: 49, message: 'Use of deprecated API \'jQuery.sap.addUrlWhitelist\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3741,7 +3953,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 47, + line: 50, message: 'Use of deprecated API \'jQuery.sap.clearUrlWhitelist\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3749,7 +3961,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 16, - line: 48, + line: 51, message: 'Use of deprecated API \'jQuery.sap.getUrlWhitelist\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3757,7 +3969,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 49, + line: 52, message: 'Use of deprecated API \'jQuery.sap.validateUrl\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3765,7 +3977,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 50, + line: 53, message: 'Use of deprecated API \'jQuery.sap.removeUrlWhitelist\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3773,7 +3985,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - line: 53, + line: 56, message: 'Use of deprecated API \'jQuery.sap.camelCase\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3781,7 +3993,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - line: 54, + line: 57, message: 'Use of deprecated API \'jQuery.sap.charToUpperCase\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3789,7 +4001,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 23, - line: 55, + line: 58, message: 'Use of deprecated API \'jQuery.sap.escapeRegExp\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3797,7 +4009,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 35, - line: 56, + line: 59, message: 'Use of deprecated API \'jQuery.sap.formatMessage\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3805,7 +4017,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 16, - line: 57, + line: 60, message: 'Use of deprecated API \'jQuery.sap.hashCode\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3813,7 +4025,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 22, - line: 58, + line: 61, message: 'Use of deprecated API \'jQuery.sap.hyphen\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3821,7 +4033,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 12, - line: 63, + line: 66, message: 'Use of deprecated API \'jQuery.sap.arraySymbolDiff\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3829,7 +4041,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 26, - line: 65, + line: 68, message: 'Use of deprecated API \'jQuery.sap.unique\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3837,7 +4049,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 27, - line: 68, + line: 71, message: 'Use of deprecated API \'jQuery.sap.equal\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3845,7 +4057,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 69, + line: 72, message: 'Use of deprecated API \'jQuery.sap.each\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3853,7 +4065,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 72, + line: 75, message: 'Use of deprecated API \'jQuery.sap.forIn\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3861,7 +4073,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 27, - line: 75, + line: 78, message: 'Access of global variable \'jQuery\' (jQuery.isPlainObject)', messageDetails: 'Do not use global variables to access UI5 modules or APIs. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)', ruleId: 'no-globals', @@ -3869,7 +4081,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 16, - line: 76, + line: 79, message: 'Use of deprecated API \'jQuery.sap.parseJS\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3877,7 +4089,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 13, - line: 77, + line: 80, message: 'Use of deprecated API \'jQuery.sap.extend\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3885,7 +4097,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 24, - line: 78, + line: 81, message: 'Use of deprecated API \'jQuery.sap.now\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3893,7 +4105,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 13, - line: 79, + line: 82, message: 'Use of deprecated API \'jQuery.sap.properties\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3901,7 +4113,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 13, - line: 80, + line: 83, message: 'Use of deprecated API \'jQuery.sap.uid\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3909,7 +4121,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 9, - line: 81, + line: 84, message: 'Use of deprecated API \'jQuery.sap.Version\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3917,7 +4129,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 14, - line: 82, + line: 85, message: 'Use of deprecated API \'jQuery.sap.Version\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3925,7 +4137,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 12, - line: 83, + line: 86, message: 'Use of deprecated API \'jQuery.sap.syncStyleClass\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3933,7 +4145,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - line: 84, + line: 87, message: 'Use of deprecated API \'jQuery.sap.setObject\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3941,7 +4153,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 19, - line: 85, + line: 88, message: 'Use of deprecated API \'jQuery.sap.getObject\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -3949,7 +4161,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 22, - line: 88, + line: 91, message: 'Access of global variable \'jQuery\' (jQuery)', messageDetails: 'Do not use global variables to access UI5 modules or APIs. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)', ruleId: 'no-globals', @@ -3957,7 +4169,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 22, - line: 91, + line: 94, message: 'Access of global variable \'jQuery\' (jQuery)', messageDetails: 'Do not use global variables to access UI5 modules or APIs. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)', ruleId: 'no-globals', @@ -3965,7 +4177,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 48, - line: 91, + line: 94, message: 'Call to deprecated function \'control\' of module \'JQuery\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4003,8 +4215,12 @@ Generated by [AVA](https://avajs.dev). const bundle = innerScopeResourceBundle.create({␊ url: "resources/i18n.properties"␊ });␊ + ␊ + // https://github.com/SAP/ui5-linter/issues/521␊ + var myBundle = innerScopeResourceBundle.create({url : "i18n/messagebundle.properties"});␊ + var isBundle = myBundle instanceof innerScopeResourceBundle;␊ });␊ - ␊ + ␊ // https://github.com/SAP/ui5-linter/issues/522␊ const logObject = jQuery.sap.log;␊ const myLogger = Log.getLogger();␊ @@ -4284,181 +4500,181 @@ Generated by [AVA](https://avajs.dev). { category: 1, column: 2, - line: 43, + line: 47, message: 'Unable to analyze this method call because the type of identifier "logSupportInfo" in "Log.logSupportInfo(true)" could not be determined', }, { category: 1, column: 2, - line: 58, + line: 62, message: 'Unable to analyze this method call because the type of identifier "info" in "jQuery.sap.log.debug().info()" could not be determined', }, { category: 1, column: 2, - line: 58, + line: 62, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug()" could not be determined', }, { category: 1, column: 42, - line: 59, + line: 63, message: 'Unable to analyze this method call because the type of identifier in "logger(msg)" could not be determined', }, { category: 1, column: 56, - line: 59, + line: 63, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug(msg)" could not be determined', }, { category: 1, column: 17, - line: 60, + line: 64, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug("msg 1")" could not be determined', }, { category: 1, column: 18, - line: 61, + line: 65, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug("msg 1")" could not be determined', }, { category: 1, column: 21, - line: 62, + line: 66, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug("msg 1")" could not be determined', }, { category: 1, column: 18, - line: 63, + line: 67, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug()" could not be determined', }, { category: 1, column: 10, - line: 65, + line: 69, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug()" could not be determined', }, { category: 1, column: 2, - line: 67, + line: 71, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug()" could not be determined', }, { category: 1, column: 28, - line: 67, + line: 71, message: 'Unable to analyze this method call because the type of identifier "info" in "jQuery.sap.log.info()" could not be determined', }, { category: 1, column: 2, - line: 68, + line: 72, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug()" could not be determined', }, { category: 1, column: 2, - line: 69, + line: 73, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug()" could not be determined', }, { category: 1, column: 26, - line: 69, + line: 73, message: 'Unable to analyze this method call because the type of identifier "info" in "jQuery.sap.log.info()" could not be determined', }, { category: 1, column: 16, - line: 74, + line: 78, message: 'Unable to analyze this method call because the type of identifier "warning" in "jQuery.sap.log.warning("This is a warning log message")" could not be determined', }, { category: 1, column: 12, - line: 75, + line: 79, message: 'Unable to analyze this method call because the type of identifier "warning" in "jQuery.sap.log.warning("This is a warning log message")" could not be determined', }, { category: 1, column: 71, - line: 75, + line: 79, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug("This is a debug log message")" could not be determined', }, { category: 1, column: 12, - line: 76, + line: 80, message: 'Unable to analyze this method call because the type of identifier "warning" in "jQuery.sap.log.warning("This is a warning log message")" could not be determined', }, { category: 1, column: 71, - line: 76, + line: 80, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug("This is a debug log message")" could not be determined', }, { category: 1, column: 6, - line: 77, + line: 81, message: 'Unable to analyze this method call because the type of identifier "warning" in "jQuery.sap.log.warning("This is a warning log message")" could not be determined', }, { category: 1, column: 3, - line: 78, + line: 82, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug("This is a debug log message")" could not be determined', }, { category: 1, column: 6, - line: 81, + line: 85, message: 'Unable to analyze this method call because the type of identifier "warning" in "jQuery.sap.log.warning("This is a warning log message")" could not be determined', }, { category: 1, column: 3, - line: 82, + line: 86, message: 'Unable to analyze this method call because the type of identifier "debug" in "jQuery.sap.log.debug("This is a debug log message")" could not be determined', }, { category: 1, column: 10, - line: 86, + line: 90, message: 'Unable to analyze this method call because the type of identifier "error" in "jQuery.sap.log.error("FOO")" could not be determined', }, { category: 1, column: 2, - line: 88, + line: 92, message: 'Unable to analyze this method call because the type of identifier in "doSomething(() => ({ log: jQuery.sap.log.error("FOO") }))" could not be determined', }, { category: 1, column: 27, - line: 88, + line: 92, message: 'Unable to analyze this method call because the type of identifier "error" in "jQuery.sap.log.error("FOO")" could not be determined', }, { category: 1, column: 2, - line: 89, + line: 93, message: 'Unable to analyze this method call because the type of identifier in "doSomething(() => jQuery.sap.log.error("FOO"))" could not be determined', }, { category: 1, column: 20, - line: 89, + line: 93, message: 'Unable to analyze this method call because the type of identifier "error" in "jQuery.sap.log.error("FOO")" could not be determined', }, { category: 1, column: 2, - line: 90, + line: 94, message: `Unable to analyze this method call because the type of identifier in "doSomethingElse(() => {␊ Log.warning("FOO");␊ return jQuery.sap.log.error("FOO");␊ @@ -4467,13 +4683,13 @@ Generated by [AVA](https://avajs.dev). { category: 1, column: 10, - line: 92, + line: 96, message: 'Unable to analyze this method call because the type of identifier "error" in "jQuery.sap.log.error("FOO")" could not be determined', }, { category: 1, column: 2, - line: 94, + line: 98, message: `Unable to analyze this method call because the type of identifier in "doSomethingElseToo(() => {␊ Log.error("FOO");␊ return 42;␊ @@ -4482,319 +4698,319 @@ Generated by [AVA](https://avajs.dev). { category: 1, column: 2, - line: 112, + line: 116, message: 'Unable to analyze this method call because the type of identifier "removeUrlWhitelist" in "jQuery.sap.removeUrlWhitelist(0)" could not be determined', }, { category: 1, column: 23, - line: 118, + line: 122, message: 'Unable to analyze this method call because the type of identifier "charToUpperCase" in "jQuery.sap.charToUpperCase("myValue", 5)" could not be determined', }, { category: 1, column: 23, - line: 126, + line: 130, message: 'Unable to analyze this method call because the type of identifier "charToUpperCase" in "jQuery.sap.charToUpperCase(xy, 3)" could not be determined', }, { category: 1, column: 23, - line: 127, + line: 131, message: 'Unable to analyze this method call because the type of identifier "charToUpperCase" in "jQuery.sap.charToUpperCase(someFunc(), 99)" could not be determined', }, { category: 1, column: 50, - line: 127, + line: 131, message: 'Unable to analyze this method call because the type of identifier in "someFunc()" could not be determined', }, { category: 1, column: 2, - line: 128, + line: 132, message: 'Unable to analyze this method call because the type of identifier "charToUpperCase" in "jQuery.sap.charToUpperCase()" could not be determined', }, { category: 1, column: 17, - line: 131, + line: 135, message: 'Unable to analyze this method call because the type of identifier in "hash("test")" could not be determined', }, { category: 1, column: 29, - line: 150, + line: 154, message: 'Unable to analyze this method call because the type of identifier "isPlainObject" in "window.jQuery.isPlainObject({})" could not be determined', }, { category: 1, column: 17, - line: 151, + line: 155, message: 'Unable to analyze this method call because the type of identifier "parseJS" in "JSTokenizer.parseJS("{name: \'me\'}")" could not be determined', }, { category: 1, column: 15, - line: 153, + line: 157, message: 'Unable to analyze this method call because the type of identifier "extend" in "jQuery.sap.extend({}, myObject)" could not be determined', }, { category: 1, column: 15, - line: 154, + line: 158, message: 'Unable to analyze this method call because the type of identifier "extend" in "jQuery.sap.extend([1, 2, 3], [6, 7, 8, 9])" could not be determined', }, { category: 1, column: 15, - line: 155, + line: 159, message: 'Unable to analyze this method call because the type of identifier "extend" in "jQuery.sap.extend([1, undefined], [6, 7, 8, 9])" could not be determined', }, { category: 1, column: 15, - line: 156, + line: 160, message: 'Unable to analyze this method call because the type of identifier "extend" in "jQuery.sap.extend(null, [1, null])" could not be determined', }, { category: 1, column: 15, - line: 157, + line: 161, message: 'Unable to analyze this method call because the type of identifier "extend" in "jQuery.sap.extend(null, [1, null])" could not be determined', }, { category: 1, column: 15, - line: 158, + line: 162, message: 'Unable to analyze this method call because the type of identifier "extend" in "jQuery.sap.extend(undefined, [undefined])" could not be determined', }, { category: 1, column: 15, - line: 159, + line: 163, message: 'Unable to analyze this method call because the type of identifier "extend" in "jQuery.sap.extend(var1, var2)" could not be determined', }, { category: 1, column: 15, - line: 160, + line: 164, message: 'Unable to analyze this method call because the type of identifier "extend" in "jQuery.sap.extend(12, [undefined])" could not be determined', }, { category: 1, column: 48, - line: 166, + line: 170, message: 'Unable to analyze this method call because the type of identifier "getView" in "this.getView()" could not be determined', }, { category: 1, column: 20, - line: 174, + line: 178, message: 'Unable to analyze this method call because the type of identifier "getObject" in "jQuery.sap.getObject("name.firstname", 0, { name: { firstname: "me" } })" could not be determined', }, { category: 1, column: 21, - line: 175, + line: 179, message: 'Unable to analyze this method call because the type of identifier "getObject" in "jQuery.sap.getObject("", 0, { name: { firstname: "me" } })" could not be determined', }, { category: 1, column: 21, - line: 176, + line: 180, message: 'Unable to analyze this method call because the type of identifier "getObject" in "jQuery.sap.getObject(undefined, 0, { name: { firstname: "me" } })" could not be determined', }, { category: 1, column: 21, - line: 177, + line: 181, message: 'Unable to analyze this method call because the type of identifier "getObject" in "jQuery.sap.getObject(null, 0, { name: { firstname: "me" } })" could not be determined', }, { category: 1, column: 2, - line: 187, + line: 191, message: 'Unable to analyze this method call because the type of identifier "includeStylesheet" in "jQuery.sap.includeStylesheet("myapp/fancy/style.css", "fancyStyleSheet")" could not be determined', }, { category: 1, column: 18, - line: 188, + line: 192, message: 'Unable to analyze this method call because the type of identifier "replaceDOM" in "jQuery.sap.replaceDOM(document.getElementById("controlA"), document.getElementById("controlB"))" could not be determined', }, { category: 1, column: 12, - line: 189, + line: 193, message: 'Unable to analyze this method call because the type of identifier "fromPx" in "Rem.fromPx("16px")" could not be determined', }, { category: 1, column: 11, - line: 190, + line: 194, message: 'Unable to analyze this method call because the type of identifier "toPx" in "Rem.toPx("1rem")" could not be determined', }, { category: 1, column: 2, - line: 199, + line: 203, message: 'Unable to analyze this method call because the type of identifier "equal" in "assert.equal(ControlEvents.events.length, aBrowserEvents.length, "Number of basic browser events correct")" could not be determined', }, { category: 1, column: 3, - line: 201, + line: 205, message: 'Unable to analyze this method call because the type of identifier "ok" in "assert.ok(ControlEvents.events.indexOf(aBrowserEvents[i]) >= 0, "Event " + aBrowserEvents[i] + " contained in jQuery.sap.ControlEvents")" could not be determined', }, { category: 1, column: 13, - line: 201, + line: 205, message: 'Unable to analyze this method call because the type of identifier "indexOf" in "ControlEvents.events.indexOf(aBrowserEvents[i])" could not be determined', }, { category: 1, column: 2, - line: 203, + line: 207, message: 'Unable to analyze this method call because the type of identifier "handleF6GroupNavigation" in "F6Navigation.handleF6GroupNavigation(new jQuery.Event("keydown", {}))" could not be determined', }, { category: 1, column: 28, - line: 205, + line: 209, message: 'Unable to analyze this method call because the type of identifier "isMouseEventDelayed" in "jQuery.sap.isMouseEventDelayed()" could not be determined', }, { category: 1, column: 21, - line: 206, + line: 210, message: 'Unable to analyze this method call because the type of identifier "isSpecialKey" in "jQuery.sap.isSpecialKey(new jQuery.Event("keydown", {}))" could not be determined', }, { category: 1, column: 2, - line: 210, + line: 214, message: 'Unable to analyze this method call because the type of identifier "disableTouchToMouseHandling" in "TouchToMouseMapping.disableTouchToMouseHandling()" could not be determined', }, { category: 1, column: 71, - line: 218, + line: 222, message: 'Unable to analyze this method call because the type of identifier "indexOf" in "o.categories.indexOf("categoryX")" could not be determined', }, { category: 1, column: 8, - line: 235, + line: 239, message: 'Unable to analyze this method call because the type of identifier "setActive" in "FESR.setActive(true)" could not be determined', }, { category: 1, column: 21, - line: 236, + line: 240, message: 'Unable to analyze this method call because the type of identifier "getActive" in "FESR.getActive()" could not be determined', }, { category: 1, column: 2, - line: 238, + line: 242, message: 'Unable to analyze this method call because the type of identifier "addBusyDuration" in "Interaction.addBusyDuration(33)" could not be determined', }, { category: 1, column: 2, - line: 241, + line: 245, message: 'Unable to analyze this method call because the type of identifier "notifyStepStart" in "Interaction.notifyStepStart("startup", "startup", true)" could not be determined', }, { category: 1, column: 2, - line: 242, + line: 246, message: 'Unable to analyze this method call because the type of identifier "notifyStepEnd" in "Interaction.notifyStepEnd(true)" could not be determined', }, { category: 1, column: 2, - line: 243, + line: 247, message: 'Unable to analyze this method call because the type of identifier "notifyEventStart" in "Interaction.notifyEventStart(myClickEvent)" could not be determined', }, { category: 1, column: 2, - line: 244, + line: 248, message: 'Unable to analyze this method call because the type of identifier "notifyScrollEvent" in "Interaction.notifyScrollEvent(myScrollEvent)" could not be determined', }, { category: 1, column: 2, - line: 245, + line: 249, message: 'Unable to analyze this method call because the type of identifier "notifyEventEnd" in "Interaction.notifyEventEnd()" could not be determined', }, { category: 1, column: 2, - line: 246, + line: 250, message: 'Unable to analyze this method call because the type of identifier "setStepComponent" in "Interaction.setStepComponent("component-fancy")" could not be determined', }, { category: 1, column: 2, - line: 247, + line: 251, message: 'Unable to analyze this method call because the type of identifier "start" in "Interaction.start("click", myButton)" could not be determined', }, { category: 1, column: 2, - line: 248, + line: 252, message: 'Unable to analyze this method call because the type of identifier "end" in "Interaction.end(true)" could not be determined', }, { category: 1, column: 2, - line: 249, + line: 253, message: 'Unable to analyze this method call because the type of identifier "clear" in "Interaction.clear()" could not be determined', }, { category: 1, column: 28, - line: 252, + line: 256, message: 'Unable to analyze this method call because the type of identifier "getPending" in "Interaction.getPending()" could not be determined', }, { category: 1, column: 22, - line: 254, + line: 258, message: 'Unable to analyze this method call because the type of identifier "getCurrentTransactionId" in "Passport.getCurrentTransactionId()" could not be determined', }, { category: 1, column: 15, - line: 255, + line: 259, message: 'Unable to analyze this method call because the type of identifier "getRootId" in "Passport.getRootId()" could not be determined', }, { category: 1, column: 2, - line: 256, + line: 260, message: 'Unable to analyze this method call because the type of identifier "setActive" in "Passport.setActive(true)" could not be determined', }, { category: 1, column: 19, - line: 257, + line: 261, message: 'Unable to analyze this method call because the type of identifier "traceFlags" in "Passport.traceFlags("medium")" could not be determined', }, { category: 1, column: 34, - line: 265, + line: 269, message: 'Unable to analyze this method call because the type of identifier "isActive" in "jQuery.sap.act.isActive()" could not be determined', }, { category: 1, column: 2, - line: 293, + line: 297, message: 'Unable to analyze this method call because the type of identifier "isStringNFC" in "jQuery.sap.isStringNFC(unknownVar)" could not be determined', }, ], @@ -4804,7 +5020,7 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 20, - line: 27, + line: 31, message: 'Use of deprecated API \'jQuery.sap.log\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4812,7 +5028,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - line: 58, + line: 62, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4820,7 +5036,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 56, - line: 59, + line: 63, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4828,7 +5044,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 17, - line: 60, + line: 64, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4836,7 +5052,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 18, - line: 61, + line: 65, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4844,7 +5060,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - line: 62, + line: 66, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4852,7 +5068,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 18, - line: 63, + line: 67, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4860,7 +5076,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 10, - line: 65, + line: 69, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4868,7 +5084,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - line: 67, + line: 71, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4876,7 +5092,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 28, - line: 67, + line: 71, message: 'Use of deprecated API \'jQuery.sap.log.info\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4884,7 +5100,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - line: 68, + line: 72, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4892,7 +5108,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - line: 69, + line: 73, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4900,7 +5116,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 26, - line: 69, + line: 73, message: 'Use of deprecated API \'jQuery.sap.log.info\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4908,7 +5124,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 16, - line: 74, + line: 78, message: 'Use of deprecated API \'jQuery.sap.log.warning\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4916,7 +5132,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 12, - line: 75, + line: 79, message: 'Use of deprecated API \'jQuery.sap.log.warning\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4924,7 +5140,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 71, - line: 75, + line: 79, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4932,7 +5148,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 12, - line: 76, + line: 80, message: 'Use of deprecated API \'jQuery.sap.log.warning\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4940,7 +5156,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 71, - line: 76, + line: 80, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4948,7 +5164,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 6, - line: 77, + line: 81, message: 'Use of deprecated API \'jQuery.sap.log.warning\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4956,7 +5172,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - line: 78, + line: 82, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4964,7 +5180,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 6, - line: 81, + line: 85, message: 'Use of deprecated API \'jQuery.sap.log.warning\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4972,7 +5188,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - line: 82, + line: 86, message: 'Use of deprecated API \'jQuery.sap.log.debug\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4980,7 +5196,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 10, - line: 86, + line: 90, message: 'Use of deprecated API \'jQuery.sap.log.error\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4988,7 +5204,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 27, - line: 88, + line: 92, message: 'Use of deprecated API \'jQuery.sap.log.error\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -4996,7 +5212,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 20, - line: 89, + line: 93, message: 'Use of deprecated API \'jQuery.sap.log.error\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5004,7 +5220,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 10, - line: 92, + line: 96, message: 'Use of deprecated API \'jQuery.sap.log.error\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5012,7 +5228,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - line: 112, + line: 116, message: 'Use of deprecated API \'jQuery.sap.removeUrlWhitelist\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5020,7 +5236,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 23, - line: 118, + line: 122, message: 'Use of deprecated API \'jQuery.sap.charToUpperCase\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5028,7 +5244,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 23, - line: 126, + line: 130, message: 'Use of deprecated API \'jQuery.sap.charToUpperCase\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5036,7 +5252,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 23, - line: 127, + line: 131, message: 'Use of deprecated API \'jQuery.sap.charToUpperCase\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5044,7 +5260,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - line: 128, + line: 132, message: 'Use of deprecated API \'jQuery.sap.charToUpperCase\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5052,7 +5268,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 28, - line: 149, + line: 153, message: 'Access of global variable \'jQuery\' (jQuery.isPlainObject)', messageDetails: 'Do not use global variables to access UI5 modules or APIs. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)', ruleId: 'no-globals', @@ -5060,7 +5276,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 153, + line: 157, message: 'Use of deprecated API \'jQuery.sap.extend\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5068,7 +5284,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 154, + line: 158, message: 'Use of deprecated API \'jQuery.sap.extend\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5076,7 +5292,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 155, + line: 159, message: 'Use of deprecated API \'jQuery.sap.extend\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5084,7 +5300,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 156, + line: 160, message: 'Use of deprecated API \'jQuery.sap.extend\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5092,7 +5308,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 157, + line: 161, message: 'Use of deprecated API \'jQuery.sap.extend\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5100,7 +5316,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 158, + line: 162, message: 'Use of deprecated API \'jQuery.sap.extend\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5108,7 +5324,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 159, + line: 163, message: 'Use of deprecated API \'jQuery.sap.extend\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5116,7 +5332,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - line: 160, + line: 164, message: 'Use of deprecated API \'jQuery.sap.extend\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5124,7 +5340,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 20, - line: 174, + line: 178, message: 'Use of deprecated API \'jQuery.sap.getObject\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5132,7 +5348,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - line: 175, + line: 179, message: 'Use of deprecated API \'jQuery.sap.getObject\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5140,7 +5356,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - line: 176, + line: 180, message: 'Use of deprecated API \'jQuery.sap.getObject\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5148,7 +5364,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - line: 177, + line: 181, message: 'Use of deprecated API \'jQuery.sap.getObject\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5156,7 +5372,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - line: 187, + line: 191, message: 'Use of deprecated API \'jQuery.sap.includeStylesheet\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5164,7 +5380,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 18, - line: 188, + line: 192, message: 'Use of deprecated API \'jQuery.sap.replaceDOM\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5172,7 +5388,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 53, - line: 193, + line: 197, message: 'Access of global variable \'jQuery\' (jQuery.Event)', messageDetails: 'Do not use global variables to access UI5 modules or APIs. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)', ruleId: 'no-globals', @@ -5180,7 +5396,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 43, - line: 203, + line: 207, message: 'Access of global variable \'jQuery\' (jQuery.Event)', messageDetails: 'Do not use global variables to access UI5 modules or APIs. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)', ruleId: 'no-globals', @@ -5188,7 +5404,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 28, - line: 205, + line: 209, message: 'Use of deprecated API \'jQuery.sap.isMouseEventDelayed\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5196,7 +5412,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - line: 206, + line: 210, message: 'Use of deprecated API \'jQuery.sap.isSpecialKey\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5204,7 +5420,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 49, - line: 206, + line: 210, message: 'Access of global variable \'jQuery\' (jQuery.Event)', messageDetails: 'Do not use global variables to access UI5 modules or APIs. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)', ruleId: 'no-globals', @@ -5212,7 +5428,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 34, - line: 265, + line: 269, message: 'Use of deprecated API \'jQuery.sap.act.isActive\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', @@ -5220,7 +5436,7 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - line: 293, + line: 297, message: 'Use of deprecated API \'jQuery.sap.isStringNFC\'', messageDetails: 'Deprecated test message', ruleId: 'no-deprecated-api', diff --git a/test/lib/autofix/snapshots/autofix.fixtures.ts.snap b/test/lib/autofix/snapshots/autofix.fixtures.ts.snap index f7c5de553..c91f6379f 100644 Binary files a/test/lib/autofix/snapshots/autofix.fixtures.ts.snap and b/test/lib/autofix/snapshots/autofix.fixtures.ts.snap differ