Skip to content

Conversation

@namrata111f
Copy link
Contributor

Adding new ignore object in config file which users can use to add file paths/glob patterns to skip running rules for all the engines.

Testing:
Case-1) Tested with the ignore patterns:

ignores:
  files:
    - "**/*.js"
    - "**/*.jsx"
ignores:
  files:
    - "**/utils.js"

Violations reported skipped the files covered in these patterns.
Case-2) Tested with no ignores object in the config files. The output contained all the expected violations.

@@ -1,5 +1,6 @@
import fs from "node:fs";
import path from "node:path";
import {Minimatch} from "minimatch";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore patterns likely won’t match on Windows due to path separator mismatch. minimatch expects /-separated paths, but matchesIgnorePattern feeds it path.sep (backslashes on Windows). This will make ignores.files silently ineffective on Windows unless users write \-escaped patterns. Normalize to POSIX separators before matching (e.g., pathToMatch.replaceAll(path.sep, "/")).

were you able to test it for windows ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good catch. But shouldn't windows user be giving the file path as '\' as well in the ignore section if that is how the paths comes up for them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have added POSIX normalization for now.

@namrata111f namrata111f changed the title NEW @W-21101982@ Adding ignore object in config file NEW @W-21101982@ Adding ignores object in config file Feb 10, 2026
@namrata111f namrata111f merged commit 4c5390e into dev Feb 10, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants