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

UI5 Linter does not detect deprecated API calls inside sap.ui.predefine #247

Open
flovogt opened this issue Aug 7, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@flovogt
Copy link
Member

flovogt commented Aug 7, 2024

Deprecated APIs inside sap.ui.predefine calls are not detected, I guess because sap.ui.predefine calls are not transpiled. Due to this, types inside the callback of sap.ui.predefine are not known to TypeScript.

Example:

sap.ui.predefine('mylib/library', ["sap/ui/core/Lib"], function(Library) {
	return Library.init({
		name: 'testlibs.scenario1.lib3',
		noLibraryCSS: true
	});
});

https://github.com/SAP/openui5/blob/7a9efdbc5ce7b03d48629a805078fc522e2b93fc/src/sap.ui.core/test/sap/ui/core/qunit/Lib.qunit.js#L82-L87
(apiVersion was missing, but this was not reported by the linter - In master, this has been fixed in the meantime)

Note: This issue is assumed to be specific to framework code only. sap.ui.predefine calls should not occur in application code.

Context

  • UI5 linter version: 0.2.2
  • Node.js Version: v20.11.1
  • npm Version: 10.2.4
  • OS/Platform: macOS 14.4.1
@flovogt flovogt added the enhancement New feature or request label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant