When a global symbol is used in code, either each usage should be reported, or none. Global APIs that are part of the platform (ES2023, browser) should never be reported. Also, non-UI5 globals, whose usage is legitimated via ESLint config maybe should not be reported (to be discussed).
Current Behavior
When linting the OpenUI5 sources, platform globals are reported unexpectedly:
src/sap/ui/core/Component.js
224:18: Access of global variable 'Symbol' (Symbol)
src/sap/ui/core/date/UI5Date.js
139:20: Access of global variable 'Symbol' (Symbol.toStringTag)
In OpenUI5's own test code, QUnit is most of the time used as a global (which is accepted in UI5 code). But those usages are sometimes reported (seems, only when QUnit is accessed via indexed member access QUnit[...something]):
All other usages are not reported. Either those few usages should also not be reported (e.g. when an eslint comment /* global QUnit */ or ESLint config exists) or all usages should be reported consistently (not preferred).
Steps to Reproduce the Issue
Lint sap.ui.core from OpenUI5 or, if you have access to internal builds, look at the nightly UI5 2.0 transformation build and check the linting result file ui5lint-openui5-_openui5_sap.ui.core.json.
Expected Behavior
When a global symbol is used in code, either each usage should be reported, or none. Global APIs that are part of the platform (ES2023, browser) should never be reported. Also, non-UI5 globals, whose usage is legitimated via ESLint config maybe should not be reported (to be discussed).
Current Behavior
When linting the OpenUI5 sources, platform globals are reported unexpectedly:
In OpenUI5's own test code,
QUnit
is most of the time used as a global (which is accepted in UI5 code). But those usages are sometimes reported (seems, only whenQUnit
is accessed via indexed member accessQUnit[...something]
):All other usages are not reported. Either those few usages should also not be reported (e.g. when an eslint comment
/* global QUnit */
or ESLint config exists) or all usages should be reported consistently (not preferred).Steps to Reproduce the Issue
sap.ui.core
from OpenUI5 or, if you have access to internal builds, look at the nightly UI5 2.0 transformation build and check the linting result fileui5lint-openui5-_openui5_sap.ui.core.json
.Context
0.3.4
20.11.1
10.2.4
Log Output / Stack Trace
See findings above.