Sets up prettier to help us enforce an opinionated coding style
Configures the linter to not conflict with choices made by prettier
prettier will enforce style choices; linter will still be used to detect other issues
Adds scripts to package.json:
style:check: Check formatting
style:fix: Fix formatting. For folks with prettier integaration in their editor / IDE (for instance, I'm using prettier-vscode) style violations can be fixed automatically when files are saved. Undoubtedly, not every contributor will have this set up -- which is why this script exists. When someone's contributions fail the style check, instead of walking them through editor-specific setup, we can just ask that they run yarn style:fix and amend their PR.
Integrates style checks into CI; runs concurrently with linter
3297c74678804c7be045f4d3c38d983a418189bf -- Remediate all outstanding issues; this was accomplished by running yarn style:fix and contains no manual edits.
Fixes #39
Follow-up to #37
This PR does the following:
package.json
:style:check
: Check formattingstyle:fix
: Fix formatting. For folks with prettier integaration in their editor / IDE (for instance, I'm using prettier-vscode) style violations can be fixed automatically when files are saved. Undoubtedly, not every contributor will have this set up -- which is why this script exists. When someone's contributions fail the style check, instead of walking them through editor-specific setup, we can just ask that they runyarn style:fix
and amend their PR.The PR is broken into two commits:
yarn style:fix
and contains no manual edits.