DoSomething / aurora

:crescent_moon: The DoSomething.org admin interface.
https://admin.dosomething.org
MIT License
1 stars 2 forks source link

Specifying PHP version for Prettier #261

Closed weerd closed 4 years ago

weerd commented 4 years ago

What's this PR do?

This pull request updates the prettier config in package.json to specify the PHP version used by the app (when we upgrade to 7.4 on this app, lets also update for Prettier).

This setting allows Prettier to also consider new syntax available in the newer PHP versions and format accordingly. The updates that occurred in this PR were related to a new rule that allows for trailing commas in function calls which came with PHP 7.3.

How should this be reviewed?

👀 mostly for the config setting in package.json; the rest is all automated formatting!

After seeing a failure in CircleCI, it turns out the Prettier config setting to 7.3 helped flag that CircleCI was still on 7.2 so I updated the config file.

Also did a little cleanup in the helpers.php file.

Relevant tickets

References Pivotal #174412695.

Checklist

weerd commented 4 years ago

This should be the last of the formatting PRs for now! Just needed to work out the kinks! 😅