Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup prettier to run on pre-commit #93

Merged
merged 2 commits into from
Jul 15, 2021
Merged

Setup prettier to run on pre-commit #93

merged 2 commits into from
Jul 15, 2021

Conversation

reesscot
Copy link
Contributor

Description of changes:
This PR sets up Prettier to run on the pre-commit git hook (will run prettier on staged files right before being committed). I went with husky and lint-staged to run prettier because lint-staged works with ESLint which I will add in the next PR. I've also prettier-ified the entire repo. If anyone has objections to running prettier on the whole repo as opposed to running it as we change things, please let me know.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@eddiekeller eddiekeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2021-07-14 at 4 32 30 PM

Lmao uh...gonna just assume that Prettier did a good job

Copy link
Contributor

@wlee221 wlee221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I assume 1321332 is the only meaningful code change here.

ps. @eddiekeller this reminds me of a similar pr i made, but more intimidating 😆 aws-amplify/amplify-js#8136

Copy link
Contributor

@ericclemmons ericclemmons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice quality-of-life improvement!

@@ -0,0 +1 @@
_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's _?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an internal husky folder

Comment on lines +1 to +2
.next
.husky
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does prettier not automatically ignore what's in .gitignore? I assumed it did. TIL!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently not, it was trying to lint the .next folder

@reesscot
Copy link
Contributor Author

LGTM! I assume 1321332 is the only meaningful code change here.

ps. @eddiekeller this reminds me of a similar pr i made, but more intimidating 😆 aws-amplify/amplify-js#8136

Yup, the first commit is the real change. Second is just running prettier.

@reesscot reesscot merged commit f4e07f5 into aws-amplify:main Jul 15, 2021
@reesscot reesscot deleted the prettier branch July 15, 2021 16:02
@wlee221 wlee221 mentioned this pull request Jul 16, 2021
6 tasks
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.

4 participants