From 1a9997e32acccddfe7899880eed3bbf8081fc688 Mon Sep 17 00:00:00 2001 From: Yavor Ivanov Date: Mon, 7 Oct 2024 11:25:24 +0300 Subject: [PATCH 1/2] docs: Provide documentation for configuration files --- README.md | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9be8eed5..bf64b42a 100644 --- a/README.md +++ b/README.md @@ -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: + ```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 From f7b0d908062b43ecdbb0d4404336245b7bbaa284 Mon Sep 17 00:00:00 2001 From: Yavor Ivanov Date: Mon, 7 Oct 2024 15:05:43 +0300 Subject: [PATCH 2/2] docs: Update README.md Co-authored-by: Florian Vogt --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf64b42a..21351b4e 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ 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: + **Example:** ```js ignores: [ "webapp/test/**", // Ignore all files in the test folder