When reporting the use of a deprecated method, the linter should name the correct type that provides the method (Naming the subclass on which the method is called instead of naming the type that defines the method would be acceptable, too).
Current Behavior
In the case of method call chains, the linter might name a totally different type, which is confusing for developers.
Steps to Reproduce the Issue
Lint the following module
sap.ui.define(["sap/m/Button"], (Button) => {
const ctrl = new Button();
ctrl.$().control(document.body); // jQuery.fn.control is deprecated
});
The linter reports the following
"Call to deprecated function 'control' of class 'Button'"
but Button neither defines nor inherits method control. control is a method of jQuery.
Context
UI5 linter version: 0.2.2
Node.js Version: v20.11.1
npm Version: 10.2.4
OS/Platform: macOS 14.4.1
Browser (if relevant): n/a
Other information regarding your environment (optional): n/a
Expected Behavior
When reporting the use of a deprecated method, the linter should name the correct type that provides the method (Naming the subclass on which the method is called instead of naming the type that defines the method would be acceptable, too).
Current Behavior
In the case of method call chains, the linter might name a totally different type, which is confusing for developers.
Steps to Reproduce the Issue
Lint the following module
The linter reports the following
but
Button
neither defines nor inherits methodcontrol
.control
is a method of jQuery.Context