-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add prettier #467
Add prettier #467
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #467 +/- ##
===================================
Coverage 100% 100%
===================================
Files 58 58
Lines 509 509
Branches 83 83
===================================
Hits 509 509 Continue to review full report at Codecov.
|
Thanks, but I'm not sure if this is a must do change, since the format rules of prettier has a little different with es-lint in .js files. But markdown format looks great. |
@iamkun I understand this is not a must-do change, but rather a nice-to-have feature. However with more and more people starting to contribute on this project, coding style will become more important. While people still have to manually fix their styles even with eslint, with the help of Prettier, complying consistent coding styles will be super easy. I tried to match the rules of eslint to Prettier. And should any difference be found, I will definitely make sure they are in sync. |
@wangyiz4262 Sounds great. But please allow me some time to think it over. |
@iamkun Of course! And I would be very much pleased to help if possible. |
@wangyiz4262 one more thing, it would be great if you could make a new PR with only prettier added to the project as well as the pre-commit lint or something alike, and we could do prettier during our CI running. A PR 104 files change make it impossible to review. |
@iamkun Very happy to. I will get that done tomorrow. Actually it is not necessary to make a new PR. I can force push the changes so that this PR will be updated accordingly. |
@wangyiz4262 that would be nice, take your time please. |
bb9f458
to
369ae19
Compare
Hi @iamkun, I added Prettier into CI but disabled pre-commit because it wouldn't let me commit without updating all the files. Therefore I need you to approve the PR first, and then I will create another PR to re-enable eslint in the pre-commit hook. |
@iamkun I just realized this won't work because just adding Prettier to CI will only prettify files on the fly. The real source files still don't change. There has to be a big change contain all the prettified files. |
How about we just start from |
369ae19
to
1734efd
Compare
@iamkun I added Prettier configuration without hook up to eslint, and also formatted all the markdown files in a separate commit. |
Looks good, but better revert the last commit and leave the only change with add prettier. There's no need to review diffs made by prettier. |
1734efd
to
6d50cad
Compare
@iamkun Got you. I have reverted the last commit. The source files can be prettified at any time later. |
🎉 This PR is included in version 1.8.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Use Prettier to format source files