Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
rules
✓ import { rules } from 'eslint-plugin-ui5'
✗ const rules = require('eslint-plugin-ui5').rules
ESM import supported; CommonJS require also works
configs
✓ import { configs } from 'eslint-plugin-ui5'
Exports shared configs (e.g., recommended)
Plugin usage in .eslintrc
✓ plugins: ['ui5']
✗ plugins: ['eslint-plugin-ui5']
The eslint-plugin- prefix can be omitted
Installs the plugin, configures ESLint with UI5 rules, and shows a rule violation example.
// Install dependencies
// npm install eslint eslint-plugin-ui5 --save-dev
// .eslintrc.json
{
"plugins": ["ui5"],
"rules": {
"ui5/no-global-id": "error",
"ui5/no-global-name": "error",
"ui5/no-for-in": "warn",
"ui5/no-boolean-literal-compare": "error",
"ui5/hungarian-notation": "warn"
}
}
// Example file: MyControl.js
sap.ui.define([
"sap/ui/core/Control"
], function (Control) {
return Control.extend("my.Control", {
renderer: {
render: function (oRM, oControl) {
// This will trigger no-global-id
var oCore = sap.ui.getCore();
var oById = oCore.byId("myId"); // Error if rule enabled
}
}
});
});
Errors
Common errors & fixes
Error: Failed to load plugin 'ui5' declared in '.eslintrc': Cannot find module 'eslint-plugin-ui5'
Plugin not installed in the project.
fixRun 'npm install eslint-plugin-ui5 --save-dev'.
ESLint: TypeError: Cannot read property 'no-global-id' of undefined
Rule name misspelled or plugin not loaded correctly.
fixEnsure plugin is listed in 'plugins' array and rule name is correct (e.g., 'ui5/no-global-id').
ReferenceError: sap is not defined
Code expects SAP UI5 globals without declaring them.
fixAdd 'globals' in .eslintrc: { "globals": { "sap": "readonly" } }. Audit
Dependencies
eslintrequiredPeer dependency required to load the plugin