Open uncenter opened 9 months ago
I won't format the files in this PR to avoid conflicts, but we should run the command at some point...
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.
Did you try running this and see if it has problems with the autogenerated files?
What do you mean by autogenerated files? If there are any we can just add them to a .prettierignore
. There are some files that Prettier struggles with, quite understandably though:
That seems like an interesting approach to whatever that is!
What do you mean by autogenerated files?
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?
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.
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.