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: Provide documentation for configuration "files" #348

Merged
merged 2 commits into from
Oct 8, 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
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,28 @@ module.exports = {

- **ignores**: This option allows you to define glob patterns to ignore specific files or directories during linting. Patterns are relative to the root of the project. You can also un-ignore specific files by using the `!` prefix. The order of the patterns matters; later patterns override earlier ones.

Example:
```js
ignores: [
"webapp/test/**", // Ignore all files in the test folder
"!webapp/test/integration/**", // Un-ignore files in a specific subdirectory
];
```
Example:
d3xter666 marked this conversation as resolved.
Show resolved Hide resolved
```js
ignores: [
"webapp/test/**", // Ignore all files in the test folder
"!webapp/test/integration/**", // Un-ignore files in a specific subdirectory
];
```

In this way, you can control which files the UI5 linter should process and which it should ignore.

- **files**: This option allows you to specify glob patterns to target particular files or directories for linting. However, it does not enable you to include files that are typically excluded from the process (e.g., files outside the `webapp` directory in application projects). Only POSIX path separators (`/`) are supported, irrespective of the platform you're using.

> **Note:** This option corresponds to the CLI command `ui5lint [files...]`. If CLI's `[files...]` are provided, the configuration gets ignored.

**Example:**

In this way, you can control which files the UI5 linter should process and which it should ignore.
```js
files: [
"webapp/index.html",
"webapp/**/*", // Lint all files and subdirectories within "webapp/"
];
```

## Support, Feedback, Contributing

Expand Down