-
-
Notifications
You must be signed in to change notification settings - Fork 682
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
Update Prettier & EditorConfig files #1651
base: main
Are you sure you want to change the base?
Conversation
b48aef1
to
3259247
Compare
I won't format the files in this PR to avoid conflicts, but we should run the command at some point... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I'm all pro adding a formatter. Did you try running this and see if it has problems with the autogenerated files?
Also do you know whether or not this is run on any git hooks (this might lead to issues until all files in the repo are formatted)?
I don't really understand or use Git hooks but it looks to be the case: "lint-staged": {
"*.{js,css,md}": [
"prettier --write",
"git add"
]
}, I chose to avoid formatting it here because a) the diff is huge, +-30k lines, and b) I don't want to block other PRs.
What do you mean by autogenerated files? If there are any we can just add them to a That seems like an interesting approach to whatever that is! |
The files in https://github.com/11ty/11ty-website/tree/main/src/_data/community are generated by a GH action from the "Build With 11ty" issues. |
Ah, strange. Well, we can just run the format command after that step in the workflow. |
...where is that workflow? |
I think you are confusing this repo with https://github.com/11ty/11ty-community/tree/main/built-with-eleventy maybe? |
Ah yes, my mistake |
Is there anything else I need to do for this PR? I've ignored that one directory I mentioned that Prettier didn't like, so the command passes now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but since this is a fairly fundamental change how this repo is worked on, I'd like the opinion of @zachleat on this.
FYI, the formatting config files (.prettierrc.json, .editorconfig) that I've included here are directly copied from the core @11ty/eleventy repository. So there isn't anything Zach hasn't already approved, technically. |
I think that these configs have to be seen in the context of a project/repo. E.g. editorconfig settings can vary depending on the project. I do not expect Zach to oppose this change, but it makes me more comfortable to have his approval for now. |
@zachleat would you be able to take a look at this? Have some small & incremental improvements in mind for the docs that I'd love to test out but I'd like to have uniform formatting to make for minimal diffs if possible. |
FYI - I've just gone through and compared each of the modified/related files to formatting in this branch and the main branch of the 11ty/eleventy repo and they are (still) consistent. |
Closes #1610.