DoSomething / aurora

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

Prettier formatting #258

Closed weerd closed 4 years ago

weerd commented 4 years ago

What's this PR do?

This pull request adds Prettier to help format our JS, CSS and PHP.

How should this be reviewed?

Do not review via the "Files changed" tab or you might pass out; lots of JS & PHP files got formatted.

You mostly just need to check out the following commits:

The npm run format is separated out into different sub-commands that run prettier on different file formats. I found it useful to help make the format:php more readable, so I did the same thing to split out the JS and CSS(SCSS) formatting.

Any background context you want to provide?

This relates to RFC #11 for PHP Code Formatting. I wanted to apply it to an app or two to work out the configuration between Prettier and PHP CS Tool and setting up Prettier is the first step.

Relevant tickets

References Pivotal #174412695.

Checklist

weerd commented 4 years ago

StyleCI is expected to fail. After approval and before merging, I will be disabling StyleCI for this repository since it will no longer really apply given the new tools.