Skip to content

Commit cd30f74

Browse files
committed
refactor: configure prettier to format json5
Format json5 files
1 parent fdf5843 commit cd30f74

File tree

2 files changed

+67
-77
lines changed

2 files changed

+67
-77
lines changed

ng-dev/format/formatters/prettier.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class Prettier extends Formatter {
2424
override defaultFileMatcher = [
2525
'**/*.{js,cjs,mjs}',
2626
'**/*.{ts,cts,mts}',
27-
'**/*.json',
27+
'**/*.{json,json5}',
2828
'**/*.{yml,yaml}',
2929
];
3030

renovate-presets/default.json5

Lines changed: 66 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,43 @@
11
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["group:monorepos"],
4-
"dependencyDashboard": true,
5-
"rangeStrategy": "replace",
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
extends: ['group:monorepos'],
4+
dependencyDashboard: true,
5+
rangeStrategy: 'replace',
66

77
// Schedule Renovate to run during off-peak hours
8-
"schedule": [
9-
"after 10:00pm every weekday",
10-
"before 5:00am every weekday",
11-
"every weekend"
12-
],
13-
"prConcurrentLimit": 8,
14-
"prHourlyLimit": 4,
15-
"timezone": "America/Tijuana",
8+
schedule: ['after 10:00pm every weekday', 'before 5:00am every weekday', 'every weekend'],
9+
prConcurrentLimit: 8,
10+
prHourlyLimit: 4,
11+
timezone: 'America/Tijuana',
1612

1713
// Commit and PR customization
18-
"commitBody": "See associated pull request for more information.",
19-
"semanticCommits": "enabled",
20-
"semanticCommitScope": "",
21-
"semanticCommitType": "build",
22-
"labels": ["area: build & ci", "action: review"],
23-
24-
"lockFileMaintenance": {
25-
"enabled": true
14+
commitBody: 'See associated pull request for more information.',
15+
semanticCommits: 'enabled',
16+
semanticCommitScope: '',
17+
semanticCommitType: 'build',
18+
labels: ['area: build & ci', 'action: review'],
19+
20+
lockFileMaintenance: {
21+
enabled: true,
2622
},
2723

2824
// Ignored dependencies in all repositories
29-
"ignoreDeps": [
30-
"build_bazel_rules_nodejs",
31-
"rules_pkg",
32-
"yarn" // Yarn is copied locally in all repositories where needed.
25+
ignoreDeps: [
26+
'build_bazel_rules_nodejs',
27+
'rules_pkg',
28+
'yarn', // Yarn is copied locally in all repositories where needed.
3329
],
3430

35-
"packageRules": [
31+
packageRules: [
3632
// ============================================================================
3733
// GENERAL GROUPING & UPDATE BEHAVIOR
3834
// ============================================================================
3935

4036
// Group all non-major updates (minor and patch) together
4137
{
42-
"groupName": "all non-major dependencies",
43-
"matchDepNames": [
44-
"*",
45-
"!node",
46-
"!pnpm",
47-
"!npm",
48-
"!yarn"
49-
],
50-
"matchUpdateTypes": ["digest", "patch", "minor"]
38+
groupName: 'all non-major dependencies',
39+
matchDepNames: ['*', '!node', '!pnpm', '!npm', '!yarn'],
40+
matchUpdateTypes: ['digest', 'patch', 'minor'],
5141
},
5242

5343
// ============================================================================
@@ -56,8 +46,8 @@
5646

5747
// Group Bazel updates
5848
{
59-
"groupName": "bazel dependencies",
60-
"matchManagers": ["bazel"]
49+
groupName: 'bazel dependencies',
50+
matchManagers: ['bazel'],
6151
},
6252

6353
// ============================================================================
@@ -66,41 +56,41 @@
6656

6757
// Group updates related to Angular ecosystem across repositories
6858
{
69-
"groupName": "cross-repo angular dependencies",
70-
"followTag": "next",
71-
"separateMajorMinor": false,
72-
"schedule": ["at any time"],
73-
"matchDepNames": [
74-
"@angular-devkit/**",
75-
"@angular/**",
76-
"@schematics/**",
77-
"angular/**",
78-
"ng-packagr"
79-
]
59+
groupName: 'cross-repo angular dependencies',
60+
followTag: 'next',
61+
separateMajorMinor: false,
62+
schedule: ['at any time'],
63+
matchDepNames: [
64+
'@angular-devkit/**',
65+
'@angular/**',
66+
'@schematics/**',
67+
'angular/**',
68+
'ng-packagr',
69+
],
8070
},
8171

8272
// Disable 'next' tag tracking on non-main branches
8373
{
84-
"matchBaseBranches": ["!main"],
85-
"followTag": null
74+
matchBaseBranches: ['!main'],
75+
followTag: null,
8676
},
8777

8878
// Keep minor and patch updates separate for TypeScript
8979
{
90-
"matchDepNames": ["typescript"],
91-
"separateMinorPatch": true
80+
matchDepNames: ['typescript'],
81+
separateMinorPatch: true,
9282
},
9383

9484
// Group TypeScript-related packages
9585
{
96-
"groupName": "typescript dependencies",
97-
"matchDepNames": ["typescript", "tslib"]
86+
groupName: 'typescript dependencies',
87+
matchDepNames: ['typescript', 'tslib'],
9888
},
9989

10090
// Limit how many times these packages get updated (They deploy each merged PR)
10191
{
102-
"matchDepNames": ["renovate", "quicktype-core"],
103-
"schedule": ["on sunday and wednesday"]
92+
matchDepNames: ['renovate', 'quicktype-core'],
93+
schedule: ['on sunday and wednesday'],
10494
},
10595

10696
// ============================================================================
@@ -109,9 +99,9 @@
10999

110100
// Group dependencies in the scorecard GitHub Actions workflow
111101
{
112-
"groupName": "scorecard action dependencies",
113-
"matchFileNames": [".github/workflows/scorecard.yml"],
114-
"matchDepNames": ["*"]
102+
groupName: 'scorecard action dependencies',
103+
matchFileNames: ['.github/workflows/scorecard.yml'],
104+
matchDepNames: ['*'],
115105
},
116106

117107
// ============================================================================
@@ -120,31 +110,31 @@
120110

121111
// Disable updates for placeholder or 0.0.0-style versions
122112
{
123-
"enabled": false,
124-
"matchCurrentVersion": "/^[~^]?0\\.0\\.0-/"
113+
enabled: false,
114+
matchCurrentVersion: '/^[~^]?0\\.0\\.0-/',
125115
},
126116

127117
// Disable major updates for specified dependencies
128118
{
129-
"enabled": false,
130-
"matchDepNames": [
131-
"@types/node",
132-
"bazel",
133-
"node",
134-
"npm",
135-
"pnpm",
136-
"rxjs",
137-
"tslib",
138-
"yarn"
119+
enabled: false,
120+
matchDepNames: [
121+
'@types/node',
122+
'node',
123+
'bazel', // bazelisk bazel verison
124+
'npm',
125+
'pnpm',
126+
'rxjs',
127+
'tslib',
128+
'yarn',
139129
],
140-
"matchUpdateTypes": ["major"]
130+
matchUpdateTypes: ['major'],
141131
},
142132

143133
// Disable TypeScript major and minor updates
144134
{
145-
"enabled": false,
146-
"matchDepNames": ["typescript"],
147-
"matchUpdateTypes": ["major", "minor"]
148-
}
149-
]
135+
enabled: false,
136+
matchDepNames: ['typescript'],
137+
matchUpdateTypes: ['major', 'minor'],
138+
},
139+
],
150140
}

0 commit comments

Comments
 (0)