You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
All Contributors should respect a .prettierrc if one is found #347
Describe the bug
I have a .prettierrc in a repo that indicates its .allcontributorsrc file should be formatted as JSON with tabs. But the allcontributors bot is still formatting it as JSON with two spaces.
In theory you can run npx prettier .all-contributorsrc --write and that'll pick up whatever Prettier config is checked into the repo (as long as the bot has done at least a shallow clone).
Activity
Berkmann18 commentedon Jan 5, 2023
That's an excellent point, do you know of any project or have a PoC that respects
.prettierrc?JoshuaKGoldberg commentedon Jan 5, 2023
Yup, the repo linked in the OP uses Prettier for formatting files. It has an explicit override to ignore
.all-contributorsrcbecause of this issue.https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/129e4560bb966339ec5bf4b73741e07fb5b5262f/.prettierignore#L4-L5
Berkmann18 commentedon May 19, 2023
That makes sense! Do you have an idea of how the bot could appropriately take it into account?
JoshuaKGoldberg commentedon May 19, 2023
In theory you can run
npx prettier .all-contributorsrc --writeand that'll pick up whatever Prettier config is checked into the repo (as long as the bot has done at least a shallow clone).Berkmann18 commentedon May 20, 2023
I see, so it seems like something that could be integrated into the CLI (especially since the bot uses it to an extent).
fix: remove .all-contributorsrc from .prettierignore (#806)