Run prettier over the codebase to reduce CI problems.#10037
Run prettier over the codebase to reduce CI problems.#10037aickin wants to merge 1 commit intofacebook:masterfrom
Conversation
|
Appropriately, this rejected by CI because of prettier... <sigh>. On the bright side, I think I've actually figured out what's going on here! I believe the problem is that the prettier version in I'll close this PR and open a simpler PR that just pins the version of prettier to 1.2.2, which is the version the current code expects. |
Throughout my work on #10024, I found that I would get intermittent prettier errors from CI, and some of them seemed arbitrary. Changes that didn't fix any prettier issues would make CI prettier stop complaining, and changes that didn't add any bad formatting would make CI prettier get unhappy. Further,
npm run prettieroryarn prettier(the recommended fix) never fixed the CI problems I was having.I've since realized that the reason that
npm run prettierwasn't working was that that command attempts to run prettier over only the changed files, but CI checks all files to make sure they are correctly formatted. And, for whatever reason,masterhas a few dozen files that are incorrectly formatted right now. I suspect these files creeped in because of some problem in CI that was causing the arbitrariness I was seeing, but I'm not entirely sure.This PR is just a result of running
npm run prettier-allover the codebase and then fixing one tiny problem with linting (prettier eliminated threeeslint-disable-linecomments inReactDOMServerIntegration-test.jswhich I had to reinstate).This PR doesn't fix the core problem that CI seems to sometimes approve of builds that violate prettier's formatting and thereby lets incorrectly formatted files in, but I honestly can't really figure out why that happens. In the meantime, though, I'm hoping that this checkin will reduce the number of times CI complains about my other PRs.