Fix Js Globals

作者 UI52b8c4a944e39無授權條款38 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

Fix JavaScript `no-globals` errors that UI5 linter reports but cannot auto-fix. Use this skill when linter outputs: - `no-globals` rule with message "Access of global variable '...' (...)" in JS files Cases handled (linter CANNOT auto-fix): - Assignments to global namespaces: `sap.myNamespace = {...}` - Global namespace assignment/read inside sap.ui.define - Delete expressions: `delete sap.something` - sap.ui.core.Core direct access (class vs singleton) - jQuery/$ globals: add `sap/ui/thirdparty/jquery` — do NOT replace jQuery API calls - jQuery.sap.* utilities: replace with dedicated modules - Conditional/probing access: `if (sap.ui.something)` - Custom namespace definitions that aren't UI5 modules - sap.ui.controller() factory → Controller.extend (NOT Fiori Elements extensions) - jQuery.sap.declare/require: legacy modules without sap.ui.define Trigger when: "fix no-globals", "global variable error", "sap.ui.getCore", "jQuery.sap" Converts global namespace access to proper sap.ui.define module imports.

僅公開檔案列表。將技能安裝到工作區後即可檢視檔案內容。

路徑大小類型
references/core-api-replacements.md16.5 KBtext/markdown
references/example-fix-session.md3.6 KBtext/markdown
SKILL.md18.6 KBtext/markdown

來源與署名

來源:UI5/plugins-coding-agents位於plugins/ui5-modernization/skills/fix-js-globals提交2b8c4a9

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架