Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Adding Prettier Formatter #10

Closed
kauppfbi opened this issue Sep 29, 2019 · 6 comments
Closed

Adding Prettier Formatter #10

kauppfbi opened this issue Sep 29, 2019 · 6 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@kauppfbi
Copy link
Contributor

Hi,

When I forked the project, adding Prettier was one of my first steps.
As it is very popular and provides standard formatting for every contribution, I suggest to use Prettier.

If you like me to do so, I would prepare a PR with Prettier configured. I could also add pretty-quick and husky to enforce formatting in a pre-commit hook.

Let me know how you think about it 👂

@JohannesHoppe
Copy link
Member

If you not only add it, but also format everything: please do so! 😉

@dianjuar
Copy link
Collaborator

I also set prettier in ngx-deploy-npm

Is very useful and I love it

@JohannesHoppe
Copy link
Member

JohannesHoppe commented Nov 6, 2019

@kauppfbi Thanks for the PR! This is my first time using prettier and I like it. 😄👍

Since ngx-deploy-starter is an example project, we should make it as easy as possible for a beginner.

  1. We need some README in the docs folder with a short introduction.

    • an explanation of --check and --write
    • some words about pretty-quick and the husky pre-commit hook
  2. I also think the pattern must be adjusted:

cd src
npx prettier -c ./*

will only look at files from the top level. But we also have the deploy and engine folder.
When I run npx prettier --write '**/*' i get some nasty errors:

[error] No parser could be inferred for file: .DS_Store
[error] No parser could be inferred for file: dist/deploy/actions.js.map

So my silly .DS_Store and the dist folder should be ignored.

Can you help me out? 😇

@JohannesHoppe JohannesHoppe added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 6, 2019
@fmalcher
Copy link
Member

fmalcher commented Nov 7, 2019

Related side note: We should also enable "formatOnSave" for VSCode so that prettier runs whenever you hit save in the editor. Super useful in the workflow because you never need to think about how to format code again.

@kauppfbi
Copy link
Contributor Author

kauppfbi commented Nov 9, 2019

Hi @JohannesHoppe,

sure, I can help you with that.

Then I will prepare a PR with

  1. Some Docs about the setup and tooling
  2. Adjustments of the pattern
  3. VSCode settings for formatOnSave + prettier as recommend plugin

fine for you?

@JohannesHoppe
Copy link
Member

Sounds awesome! 👍

JohannesHoppe added a commit to angular-schule/angular-cli-ghpages that referenced this issue Nov 18, 2020
JohannesHoppe added a commit to angular-schule/angular-cli-ghpages that referenced this issue Nov 25, 2020
* work in progress

* docs: keeping track of all the forks

* chore: migrate from `configuration` to `buildTarget`

- only unit tests are evaluated right now
- no real tests were done yet

* ci: bump node version to see if this fixes the break

cause it works on my machine (tm)

* Revert "ci: bump node version to see if this fixes the break"

This reverts commit b300026.

* tweaking dependencies / peerDependencies

as seen in angularfire: https://github.com/angular/angularfire/blob/2ce41aa0af8c5f42df65f5ac5b2b5a50fb6f4300/package.json#L41-L68

commander has some breaking changes, so let's risk nothing here and rollback

* fixing build and tests, cleanup

see angular-schule/ngx-deploy-starter#10

* minor: docs + removes astronaut emoij

... since 👨‍🚀 emoij is combined (🧑‍🚀) and breaks on some cmds

* docs: breaking change, 1.0.0-rc.1

* docs: suggestion from @fmalcher

* Apply suggestions from code review

many thanks to @fmalcher

Co-authored-by: Ferdinand Malcher <ferdinand@malcher.media>

Co-authored-by: Ferdinand Malcher <ferdinand@malcher.media>
@JohannesHoppe JohannesHoppe added this to the v1.0.0-rc.1 milestone Dec 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants