0.1.0 • Published 5 years ago

eslint-plugin-ui5 v0.1.0

Weekly downloads
582
License
ISC
Repository
-
Last release
5 years ago

eslint-plugin-ui5

ESLint rules for UI5 development

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-ui5:

$ npm install eslint-plugin-ui5 --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-ui5 globally.

Usage

Add ui5 to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "ui5"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "ui5/rule-name": 2
    }
}

Supported Rules

  • ⭐ - recommended rules
  • ✒️ - fixable rules

Possible Errors

Rule IDDescription
ui5/no-global-idPrevents accessing controls using sap.ui.getCore().byId()

Best Practices

Rule IDDescription
ui5/no-global-namePrevents accessing modules in a synchronous way using their global name.
ui5/no-for-inPrevents using for...in loops.
ui5/no-boolean-literal-comparePrevents using boolean literals in a comparison

Stylistic Issues

Rule IDDescription
ui5/hungarian-notationEnforces hungarian notation when declaring variables.
0.1.0

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago