Skip to content

Upgrade prettier to v2#68

Open
ahutchings wants to merge 2 commits intoashleyw:masterfrom
ahutchings:feature/prettier@2
Open

Upgrade prettier to v2#68
ahutchings wants to merge 2 commits intoashleyw:masterfrom
ahutchings:feature/prettier@2

Conversation

@ahutchings
Copy link
Contributor

@ahutchings ahutchings commented Apr 9, 2020

The previous glob configured in the lint:prettier task (src/**/*) did not match the implementation files directly under src/, only files 1 level down from that (in src/__tests__/), so I upgraded prettier to v2 in order to take advantage of the new prettier --write . support.

  • Changed to a blacklist strategy (using .prettierignore) rather than whitelist so that editors configured to run prettier on save only run on files we care about.
  • Ran prettier on all files via yarn lint:prettier
  • Dropped Node.js 8 from the test matrix, since it is end-of-life and no longer supported by Prettier in v2

The previous glob configured in the lint:prettier task (src/**/*) did not match the implementation files directly under src/, only files 1 level down from that (in src/__tests__/). Upgraded prettier to v2 in order to take advantage of the new "prettier --write ." support (prettier/prettier#6085). Also changed to a blacklist strategy using .prettierignore rather than whitelist so that editors configured to run prettier on save only run on files we care about.
Node 8 is no longer maintained, and Prettier dropped support for Node < 10 in v2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant