Skip to content

Commit cdc82a4

Browse files
committed
Add Renovate to automate dev dependencies upgrades
1 parent fe295ed commit cdc82a4

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ insert_final_newline = true
1010
[*.md]
1111
trim_trailing_whitespace = false
1212

13-
[*.{yaml,yml,json,md,toml}]
13+
[*.{yaml,yml,json,json5,md,toml}]
1414
indent_size = 2

.githooks/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ FULLY_STAGED=$(comm -23 <(echo "$STAGED") <(echo "$PATCH_STAGED"))
1313
JS_STAGED=$(grep -E '.(js|jsx)$' <<< "$STAGED" || true)
1414
CSS_STAGED=$(grep -E '.(css|scss)$' <<< "$STAGED" || true)
1515
SNAPSHOT_STAGED=$(grep -E '.snap$' <<< "$STAGED" || true)
16-
PRETTIER_STAGED=$(grep -E '.(md|css|scss|js|json|yaml|yml|html)$' <<< "$STAGED" || true)
17-
PRETTIER_FULLY_STAGED=$(grep -E '.(md|css|scss|js|json|yaml|yml|html)$' <<< "$FULLY_STAGED" || true)
16+
PRETTIER_STAGED=$(grep -E '.(md|css|scss|js|json|json5|yaml|yml|html)$' <<< "$STAGED" || true)
17+
PRETTIER_FULLY_STAGED=$(grep -E '.(md|css|scss|js|json|json5|yaml|yml|html)$' <<< "$FULLY_STAGED" || true)
1818

1919
# Uncomment, and add more variables to the list, for debugging help.
2020
# tr ' ' '\n' <<< "STAGED $STAGED PATCH_STAGED $PATCH_STAGED FULLY_STAGED $FULLY_STAGED JS_STAGED $JS_STAGED

renovate.json5

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
extends: ['config:base'],
3+
// https://renovatebot.com/docs/configuration-options/#commitbodytable
4+
commitBodyTable: true,
5+
// https://renovatebot.com/docs/configuration-options/#ignoredeps
6+
ignoreDeps: [
7+
// Ignore all package dependencies, we only want these updated in batches as part of new releases.
8+
'stylelint',
9+
'stylelint-a11y',
10+
'stylelint-config-prettier',
11+
'stylelint-config-standard',
12+
'stylelint-declaration-strict-value',
13+
'stylelint-order',
14+
'stylelint-scss',
15+
],
16+
// https://renovatebot.com/docs/configuration-options/#labels
17+
labels: ['enhancement'],
18+
// https://renovatebot.com/docs/configuration-options/#prcreation
19+
prCreation: 'not-pending',
20+
// Use shorter commit messages to account for long dependency names.
21+
// https://docs.renovatebot.com/configuration-options/#commitmessagetopic
22+
commitMessageTopic: '{{depName}}',
23+
// https://renovatebot.com/docs/configuration-options/#prbodycolumns
24+
prBodyColumns: ['Package', 'Update', 'Type', 'Change'],
25+
// https://renovatebot.com/docs/configuration-options/#rebasestaleprs
26+
rebaseStalePrs: true,
27+
// Silently merge updates without PRs
28+
automergeType: 'branch',
29+
// Limit the number of consecutive PRs
30+
prHourlyLimit: 2,
31+
node: {
32+
major: {
33+
enabled: true,
34+
},
35+
// https://renovatebot.com/docs/node/#configuring-support-policy
36+
supportPolicy: ['current'],
37+
},
38+
packageRules: [
39+
{ packageNames: ['prettier'], groupName: 'prettier', automerge: true },
40+
{ packageNames: ['jest'], groupName: 'jest', automerge: true },
41+
{ packageNames: ['eslint'], groupName: 'eslint', automerge: true },
42+
{
43+
packageNames: ['stylelint-find-new-rules'],
44+
groupName: 'stylelint-find-new-rules',
45+
automerge: true,
46+
},
47+
],
48+
}

0 commit comments

Comments
 (0)