- Presets may be as small as a list of package names, or as large as a full config
- Presets may be as small as a list of package names, or as large as a full config
- Shared config files can contain many presets
- Shared config files can contain many presets
Presets can be defined using either npm packages, or with GitHub/GitLab repositories.
Bitbucket-hosted presets are yet to be implemented.
## Preset config URIs
## Preset config URIs
In human-understandable form, the rules are:
In human-understandable form, the rules are:
- A full preset URI consists of package name, preset name, and preset parameters, such as `package:preset(param)`
- A full preset URI consists of package name, preset name, and preset parameters, such as `package:preset(param)`
- If a package scope is specified and no package, then the package name is assumed to be `renovate-config`, e.g. `@rarkins:webapp` is expanded to `@rarkins/renovate-config:webapp`
- If a package scope is specified and no package exists, then the package name is assumed to be `renovate-config`, e.g. `@rarkins:webapp` is expanded to `@rarkins/renovate-config:webapp`
- If a non-scoped package is specified then it is assumed to have prefix `renovate-config-`. e.g. `rarkins:webapp` is expanded to `renovate-config-rarkins:webapp`
- If a non-scoped package is specified then it is assumed to have the prefix `renovate-config-`. e.g. `rarkins:webapp` is expanded to `renovate-config-rarkins:webapp`
- If a package name is specified and no preset name, then `default` is assumed, e.g. `@rarkins` expands in full to `@rarkins/renovate-config:default` and `rarkins` expands in full to `renovate-config-rarkins:default`
- If a package name is specified and has no preset name, then `default` is assumed, e.g. `@rarkins` expands in full to `@rarkins/renovate-config:default` and `rarkins` expands in full to `renovate-config-rarkins:default`
- There is a special "default" namespace where no package name is necessary. e.g. `:webapp` (not the leading `:`) expands to `renovate-config-default:webapp`
- There is a special "default" namespace where no package name is necessary. e.g. `:webapp` (not the leading `:`) expands to `renovate-config-default:webapp`
## Supported config syntax
## Supported config syntax
### Scoped
### Scoped
```
| name | example use | preset | npm package resolves as | parameters |
| scoped with preset name and param | `@somescope:webapp(eslint)` | `webapp` | `@somescope/renovate-config` | `eslint` |
| scoped with package name and preset name | `@somescope/somepackagename:webapp` | `webapp` | `@somescope/somepackagename` | |
```
| scoped with package name and preset name and param | `@somescope/somepackagename:webapp(eslint)` | `webapp` | `@somescope/somepackagename` | `eslint` |
@somescope/somepackagename
```
### Non-scoped
This will resolve to use the preset `default` in the npm package `@somescope/somepackagename`.
If you use a non-scoped config, you must use a preset name!
### Scoped with preset name
| name | example use | preset | npm package resolves as | parameters |
| non-scoped short with preset name | `somepackagename:default` | `default` | `renovate-config-somepackagename` | |
@somescope:webapp
| non-scoped short with preset name and param | `somepackagename:default(eslint)` | `default` | `renovate-config-somepackagename` | `eslint` |
```
| non-scoped full with preset name | `renovate-config-somepackagename:default` | `default` | `renovate-config-somepackagename` | |
| non-scoped full with preset name and param | `renovate-config-somepackagename:default(eslint)` | `default` | `renovate-config-somepackagename` | `eslint` |
This will resolve to use the preset `webapp` in the npm package `@somescope/renovate-config`.
### Git based
### Scoped with params
In general, GitHub or GitLab-based preset hosting is easier than npm because you avoid the "publish" step - simply commit preset code to the default branch and it will be picked up by Renovate the next time it runs.
```
An additional benefit of using source code hosting is that the same token/authentication can be reused by Renovate in case you want to make your config private.
@somescope(eslint, stylelint)
```
| name | example use | preset | resolves as | filename |