KEMBAR78
Minor refactors in create-react-app by heyimalex · Pull Request #8178 · facebook/create-react-app · GitHub
Skip to content

Conversation

@heyimalex
Copy link
Contributor

Just some things I noticed going through the code last weekend. I tried to keep the commits pretty piecemeal.

- Inline errorLogFilePatterns; it's only ever used here.
- Alphabetize validFiles.
- Simplify log file removal code.
- Move unconditional console.log() call outside of the function. This keeps output roughly the same in the common case.
It's not obvious why this code exists, so I made the code a little more obvious and added a comment.
- Inline printValidationResults.
- Standardize the output on failure.

Manually verified the output looks nice!
@mrmckeb
Copy link
Contributor

mrmckeb commented Dec 15, 2019

Good pickup!

@heyimalex heyimalex added this to the 3.3.1 milestone Dec 16, 2019
@heyimalex heyimalex merged commit 30eaab4 into facebook:master Dec 16, 2019
@lock lock bot locked and limited conversation to collaborators Dec 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants