In a bundle file (no matter whether it's a Component-preload.js or a library-preload.js file) calls to the bundle-only APIs sap.ui.predefine or sap.ui.require.preload are reported as use of a disallowed global.
While this might be limited to framework code, it might be fixable in a robust way. UI5 tooling adds comments to bundles that would allow to identify them
//@ui5-bundle sap/f/library-preload.js
/*!
* OpenUI5
* (c) Copyright 2009-2024 SAP SE ...
@codeworrior added those comments to the manually created preloads in sap.ui.core, just in case we want to use them as markers.
As the two APIs in question are not documented as public APIs (only restricted, AFAIK), they either might have to be added to the overlay or have to be listed in the linter's source (similar to the other allowed globals).
Note: This issue is assumed to be specific to framework code only. It's not likely that application code or reuse libs create (non-empty) bundles as part of the sources.
In a bundle file (no matter whether it's a
Component-preload.js
or alibrary-preload.js
file) calls to the bundle-only APIssap.ui.predefine
orsap.ui.require.preload
are reported as use of a disallowed global.Example: https://github.com/SAP/openui5/blob/master/src/sap.ui.core/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib1/library-preload.js#L2
While this might be limited to framework code, it might be fixable in a robust way. UI5 tooling adds comments to bundles that would allow to identify them
@codeworrior added those comments to the manually created preloads in
sap.ui.core
, just in case we want to use them as markers.As the two APIs in question are not documented as public APIs (only restricted, AFAIK), they either might have to be added to the overlay or have to be listed in the linter's source (similar to the other allowed globals).
Note: This issue is assumed to be specific to framework code only. It's not likely that application code or reuse libs create (non-empty) bundles as part of the sources.
Context