From cb688b47e21ccdd3f490873a4bea7540827f7f92 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Wed, 28 Feb 2024 17:34:00 +0100 Subject: [PATCH] infra: reconfigure renovate (#965) --- .github/renovate.json5 | 62 ++++++++++++++++++++++++++++++++++++++++++ .prettierrc.js | 11 ++++++++ .vscode/settings.json | 8 ++++-- renovate.json | 13 --------- 4 files changed, 79 insertions(+), 15 deletions(-) create mode 100644 .github/renovate.json5 delete mode 100644 renovate.json diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 00000000..bccc1b8d --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,62 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base", + "schedule:earlyMondays", + "group:allNonMajor", + ":prHourlyLimitNone", + "helpers:pinGitHubActionDigests" + ], + "labels": ["c: dependencies"], + "lockFileMaintenance": { + "enabled": true + }, + "reviewersFromCodeOwners": true, + "rangeStrategy": "bump", + "packageRules": [ + { + "groupName": "devDependencies", + "matchDepTypes": ["devDependencies"], + "rangeStrategy": "bump" + }, + { + "groupName": "dependencies", + "matchDepTypes": ["dependencies"], + "rangeStrategy": "replace" + }, + { + "groupName": "peerDependencies", + "matchDepTypes": ["peerDependencies"], + "rangeStrategy": "widen" + }, + { + "groupName": "engines", + "matchDepTypes": ["engines"], + "rangeStrategy": "replace" + }, + { + "groupName": "typescript-eslint", + "matchPackagePrefixes": ["@typescript-eslint/"] + }, + { + "groupName": "vitest", + "matchPackageNames": ["@vitest/coverage-v8", "@vitest/ui", "vitest"] + }, + { + "groupName": "prettier", + "matchPackageNames": ["@types/prettier", "prettier"] + }, + { + "groupName": "typescript", + "matchPackageNames": ["typescript"] + }, + { + "groupName": "doc-dependencies", + "matchPackageNames": ["@algolia/client-search", "vitepress"] + } + ], + "vulnerabilityAlerts": { + "labels": ["c: security"], + "assignees": ["@Shinigami92"] + } +} diff --git a/.prettierrc.js b/.prettierrc.js index d187716d..158839d1 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -4,4 +4,15 @@ module.exports = { singleQuote: true, printWidth: 120, tabWidth: 2, + overrides: [ + { + files: '*.json5', + options: { + parser: 'json5', + quoteProps: 'preserve', + singleQuote: false, + trailingComma: 'none', + }, + }, + ], } diff --git a/.vscode/settings.json b/.vscode/settings.json index 6c3620ce..6b970515 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,8 @@ { - "deepcode.review.results.hideInformationIssues": false, - "typescript.tsdk": "node_modules/typescript/lib" + // Always use the `package.json`'s `typescript` + "typescript.tsdk": "node_modules/typescript/lib", + + "files.associations": { + "*.json5": "jsonc" + } } diff --git a/renovate.json b/renovate.json deleted file mode 100644 index c0df89dd..00000000 --- a/renovate.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": [ - "config:base", - ":automergeMinor", - ":automergeLinters", - "schedule:weekly", - "group:allNonMajor", - ":pinOnlyDevDependencies" - ], - "postUpgradeTasks": { - "commands": ["npm run lintfix"] - } -}