Skip to content

Commit

Permalink
docs(usage): clarify that packageRules must have a selector (#31512)
Browse files Browse the repository at this point in the history
Co-authored-by: Rhys Arkins <[email protected]>
  • Loading branch information
jftanner and rarkins authored Sep 22, 2024
1 parent 07169cd commit 81108b2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -2414,14 +2414,13 @@ The order of rules matters, because later rules may override configuration optio

The matching process for a package rule:

- Each package rule can include `match...` matchers to identify dependencies and `exclude...` matchers to filter them out.
- If no match/exclude matchers are defined, everything matches.
- If an aspect is both `match`ed and `exclude`d, the exclusion wins.
- Multiple values within a single matcher will be evaluated independently (they're OR-ed together).
- Combining multiple matchers will restrict the resulting matches (they're AND-ed together):
`matchCurrentVersion`, `matchCurrentValue`, `matchNewValue`, `matchConfidence`, `matchCurrentAge`,
`matchManagers`, `matchDatasources`, `matchCategories`, `matchDepTypes`, `matchUpdateTypes`,
`matchRepositories`, `matchBaseBranches`, `matchFileNames`
- Each package rule must include at least one `match...` matcher.
- If multiple matchers are included in one package rule, all of them must match.
- Each matcher must contain at least one pattern. Some matchers allow both positive and negative patterns.
- If a matcher includes any positive patterns, it must match at least one of them.
- A matcher returns `false` if it matches _any_ negative pattern, even if a positive match also occurred.

For more details on positive and negative pattern syntax see Renovate's [string pattern matching documentation](./string-pattern-matching.md).

Here is an example if you want to group together all packages starting with `eslint` into a single branch/PR:

Expand Down

0 comments on commit 81108b2

Please sign in to comment.