Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update documentation #333

Merged
merged 7 commits into from
Oct 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 36 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ npm install --save-dev @ui5/linter

## Usage

Run the `ui5lint` command in your project root folder
Run the `ui5lint [files...]` command in your project root folder

```sh
ui5lint
> ui5lint

UI5 linter report:

Expand All @@ -73,17 +73,45 @@ UI5 linter report:
Note: Use "ui5lint --details" to show more information about the findings
```

### Options
You can provide multiple glob patterns as arguments after the `ui5lint` command to filter and narrow down the linting results.
d3xter666 marked this conversation as resolved.
Show resolved Hide resolved

#### `--file-paths`
```sh
> ui5lint webapp/**/*
d3xter666 marked this conversation as resolved.
Show resolved Hide resolved

Specify which files to lint by providing a list of file paths.
UI5 linter report:

**Example:**
```sh
ui5lint --file-paths webapp/controller/App.controller.js webapp/view/App.view.xml
/webapp/Component.js
3:9 error Component is not configured for asynchronous loading.

/webapp/controller/App.controller.js
7:2 error Deprecated access of enum pseudo module 'sap/ui/core/BarColor'
26:22 error Access of global variable 'jQuery' (jQuery)
27:32 error Call to deprecated function 'control' (avatarDOM.control)
36:6 error Use of deprecated property 'tap' of class 'Button'
136:18 error Access of global variable 'sap' (sap.ui.getCore)
136:25 error Call to deprecated function 'getCore' (sap.ui.getCore)
136:35 error Call to deprecated function 'byId' of class 'Core'

/webapp/index.html
13:3 warning Outdated spelling of bootstrap parameter: 'data-sap-ui-resourceRoots'; should be written as 'data-sap-ui-resource-roots'
16:3 warning Outdated spelling of bootstrap parameter: 'data-sap-ui-onInit'; should be written as 'data-sap-ui-on-init'
17:3 warning Outdated spelling of bootstrap parameter: 'data-sap-ui-compatVersion'; should be written as 'data-sap-ui-compat-version'

/webapp/manifest.json
14:17 error Use of deprecated library 'sap.ui.commons'

/webapp/view/App.view.xml
7:8 error Import of deprecated module 'sap/f/Avatar'

13 problems (10 errors, 3 warnings)

Note: Use "ui5lint --details" to show more information about the findings
```



### Options

#### `--details`

Show more information about the findings and how to fix them.
Expand Down