UI5 / UI5/linter

Renderer apiVersion seems not to be detected if set separately

Open
#607 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Expected Behavior

Detect that renderer uses apiVersion 2.

Current Behavior

Linter reports "13:5: Use of deprecated renderer detected. Define explicitly the {apiVersion: 2} parameter in the renderer object"

Steps to Reproduce the Issue

See https://github.com/SAP/openui5/blob/daf3639253d2b6158fb4cde4a1d310171f5e9eec/src/sap.ui.unified/src/sap/ui/unified/FileUploaderRenderer.js#L13

Snippet:

sap.ui.define(['sap/ui/unified/library', "sap/ui/thirdparty/jquery", "sap/ui/unified/FileUploaderHelper"], function(library, jQuery, FileUploaderHelper) {
...
  var FileUploaderRenderer = {};
  FileUploaderRenderer.apiVersion = 2;
...
  FileUploaderRenderer.render = function(oRm, oFileUploader) {
...
  };
  return FileUploaderRenderer;
});

Context

  • UI5 linter version: 1.12.0

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.

Research direction

Start with the referenced src/sap.ui.unified/src/sap/ui/unified/FileUploaderRenderer.js file and its separate FileUploaderRenderer.apiVersion = 2 assignment. Trace how the linter detects renderer apiVersion declarations, then verify that this form is recognized without the deprecated-renderer warning. The referenced UI5 linter version is 1.12.0.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.