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

Add prettier #1687

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

janschoenherr
Copy link
Contributor

This can be run with npx prettier . --check or npx prettier . --write

It will currently only check the ./src folder.

@hansmorb
Copy link
Contributor

hansmorb commented Dec 8, 2024

Hält sich das denn an in der .editorconfig definierten Codestyle?

@datengraben
Copy link
Contributor

@janschoenherr From my perspective you can add the includes and tests folder also.

  • Question: What are you thoughts on configuring it only for php or for all of html/js/php?
    The template files php and js maybe incompatible with getting formatted.

  • Question: What @janschoenherr and @hansmorb think if we add in the next step the git-blame ignore list.
    Github Docs

    Because in the next step we are going to commit big changes into the log that are only cosmetic refactorings. They will pollute the git-blame view. A file with the commits that are cosmetic nature, seems to be a good practice. gutenberg Repo

    But that does not have to be part of this PR.

@datengraben datengraben mentioned this pull request Dec 10, 2024
@janschoenherr
Copy link
Contributor Author

janschoenherr commented Dec 10, 2024

We are using it for JavaScript, JSON, etc. however we did have problems in the past with php template files (html and php in one file). I can't recall specifics though. So we might want to try those too.

@hansmorb We would probably have to adjust the .editorconfig file to match the behavior. Personally, I am not sure you need so many fine grained settings in that file, if you are combining it with prettier.

Regarding the git-blame ignore list. I didn't know about that :-) Seems to make sense! As you said, I would separate the actual prettier run from this PR though.

I updated the PR to include /includes and /tests/php folders.

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.32%. Comparing base (6307143) to head (dbf8002).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1687   +/-   ##
=========================================
  Coverage     50.32%   50.32%           
  Complexity     2723     2723           
=========================================
  Files            99       99           
  Lines         11317    11317           
=========================================
  Hits           5695     5695           
  Misses         5622     5622           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hansmorb
Copy link
Contributor

Du hast doch auch PHPStorm, entspricht dass, was Prettier aus dem Code machen will dem in der .editorconfig definierten Codestyle? Wenn ja passt das. Wenn nein müssen wir nochmal überlegen, da wir uns eigentlich geeinigt hatten uns an diesen Codestyle zu halten.

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.

3 participants