create-react-app
create-react-app copied to clipboard
Add Prettier config to app
Rationale
This monorepo has a Prettier config that affects formatting of all files, including the official templates. However, because this config isn't included in the templates, running Prettier (as recommended in the docs) will change the formatting of the app, which can be confusing or inconvenient.
Changes
Modified the init script to copy the monorepo's Prettier config to package.json (for any template). In the future we may want to make this extensible if third party templates need to set their own Prettier configs.
Testing
Created an example app with yarn create-react-app my-app, confirming that the Prettier config was created in package.json and running Prettier does not reformat the files (as the formatting is already correct).
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
This is still an issue.
There haven't been any conflicts. Is there anything I need to do to get this to a mergeable or reviewable state?
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
This pull request is still working and awaiting review.
I would recommend reverting to Prettier's defaults, we would be comfortable with this? Now trailingComma is es5 by default, I feel like singleQuote is inconsistent with JSX syntax, and arrowParens are useful to keep so types/spreads/etc can easily be added to arguments.