I'm hoping people can add comments about best practices they have found for making their SFDX scratch orgs mimic their target orgs.
My specific question is: How should I configure my project-scratch-def.json to best replicate my hub org. Are there any differences I should make to target a sandbox? My goal is to have my scratch org match as closely as possible the hub so that tests that pass in scratch pass in production and tests that fail in scratch fail in production.
I assume the "orgName" and "edition" should match the Organization Name and Organization Edition found under Setup > Company Information from the target org.
I'm less clear what values should be provided for "orgPreferences" and "features".
Here's a page with all of the options you can specify in the scratch org definition file: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file.htm