chore(prettier): add prettier for auto-spacing, husky to enforce#63
Merged
styfle merged 1 commit intostyfle:mainfrom Apr 11, 2021
mikehardy:prettier
Merged
chore(prettier): add prettier for auto-spacing, husky to enforce#63styfle merged 1 commit intostyfle:mainfrom mikehardy:prettier
styfle merged 1 commit intostyfle:mainfrom
mikehardy:prettier
Conversation
mikehardy
commented
Apr 5, 2021
mikehardy
commented
Apr 5, 2021
This was referenced Apr 5, 2021
styfle
reviewed
Apr 11, 2021
styfle
reviewed
Apr 11, 2021
The prettier config was adapted from the official GitHub Actions repo, bent to fit the prevailing style (where possible) already in the project The intent is not to be controversial or argue about whitespace, it is just to have a consistent easy-to-verify style specifically to avoid all arguments about whitespace. If anything in here is objectionable, just name the setting to alter and I can edit / re-format / re-push chore: add husky and hook build/format/lint checks to pre-commit This enforces the same checks locally that will execute in CI With this, everyone should have a clean / consistent dev environment, and it will be clear to contributors if they submit code that is not valid typescript Additionally, after doing the build it adds the dist/index.js output to the commit list so contributors can't forget to commit it lint(prettier): trailingComma preferred as all vs none Co-authored-by: Steven <steven@ceriously.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there!
You mentioned #62 was too much for one PR, so I'm splitting it up.
Formatting changes obviously perturb any visual review of any code so I'm doing those first.
There are zero functional changes in the code in this PR. It is all spacing, nothing else.
Discussions of formatting frequently devolve to strong opinions about how things should be formatted, I want to be 100% clear here that I do not actually care about how things are formatted at all, just as a developer and repo maintainer I want consistent formatting.
So I just took the github actions repo prettier as a hopefully non-controversial baseline, and then added husky (for local enforcement) and a github workflow (for CI enforcement).
It follows then that if any specific choice here is not something you like, great! I'll tweak the .prettierrc.json until it has things the way you like.