Description
Rush example *.json files are hard to read and setup
Summary
I am setting up a monorepo with rush, (using rush init
) following the official docs. I have added a package to my repo and I am going through the rush.json
and version-policies.json
. These files contain some mistakes including duplicated properties which cause errors when trying to use rush update
.
For example, https://rushjs.io/pages/configs/version-policies_json/ has 2 objects. At first they seem to be different but after looking closer both start with the same (Required) property. But if I run rush update
with both of these objects, the command fails. If I run it again with just 1 object in the array, the command runs successfully.
These .json files are very hard to read and navigate. I'm not one to disparage code comments but this is a bit much!
For example, 'Required' properties can be buried. I think the link to the schema solves a lot of this. I like the idea of having this documented file in the docs, but it's a lot to look at when starting a new monorepo.
I see the option to skip the .json files and use the rush-lib API, however the docs don't really say (or I couldn't find) where that file should go or what it should be named or anything!
Repro steps
Expected result:
When I initiate a new monorepo with rush init
, the .json files contain sane defaults and are easy to read and customize
Actual result:
.json files are full of comments making them difficult to navigate and actually use. Docs are somewhat unclear about using the rush-lib api instead of rush.json.
Details
Happy to help clean these things up when I have time.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
Question | Answer |
---|---|
@microsoft/rush globally installed version? |
5.62.4 |
rushVersion from rush.json? |
5.62.4 |
useWorkspaces from rush.json? |
na |
Operating system? | Mac |
Would you consider contributing a PR? | Yes |
Node.js version (node -v )? |
14.18.3 |
Metadata
Metadata
Assignees
Labels
Type
Projects
Status