GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — All Contributors should respect a .prettierrc if one is found · Issue #347 · all-contributors/cli

All Contributors should respect a .prettierrc if one is found #347

New issue
Copy link
New issue
Copy link
Closed
Closed
All Contributors should respect a .prettierrc if one is found#347
Copy link
Labels
type: bugSomething isn't working

Description

@JoshuaKGoldberg
JoshuaKGoldberg
opened on Dec 12, 2022
Issue body actions

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.

See https://github.com/JoshuaKGoldberg/template-typescript-node-package/pull/99/files#diff-cb22095514d0cab1f755ae3a7902f7d64d10199da210fbd1eb2b29eb758b38d2

To Reproduce
Steps to reproduce the behavior:

  1. Create a new repo
  2. Create a .prettierrc file like https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/3b1bbc2b57a4ec40492d1e94814d3e48d9deb910/.prettierrc
  3. Set up allcontributors

Expected behavior
Prettier settings should be applied when formatting the file.

Activity

  1. JoshuaKGoldberg
    added
    type: bugSomething isn't working
    on Dec 12, 2022
  2. Berkmann18 commented on Jan 5, 2023

    @Berkmann18
    Berkmann18
    on Jan 5, 2023
    Member
    More actions

    That's an excellent point, do you know of any project or have a PoC that respects .prettierrc?

  3. JoshuaKGoldberg commented on Jan 5, 2023

    @JoshuaKGoldberg
    JoshuaKGoldberg
    on Jan 5, 2023
    ContributorAuthor
    More actions

    Yup, the repo linked in the OP uses Prettier for formatting files. It has an explicit override to ignore .all-contributorsrc because of this issue.

    https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/129e4560bb966339ec5bf4b73741e07fb5b5262f/.prettierignore#L4-L5

  4. Berkmann18 commented on May 19, 2023

    @Berkmann18
    Berkmann18
    on May 19, 2023
    Member
    More actions

    That makes sense! Do you have an idea of how the bot could appropriately take it into account?

  5. JoshuaKGoldberg commented on May 19, 2023

    @JoshuaKGoldberg
    JoshuaKGoldberg
    on May 19, 2023
    ContributorAuthor
    More actions

    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).

  6. Berkmann18 commented on May 20, 2023

    @Berkmann18
    Berkmann18
    on May 20, 2023
    Member
    More actions

    I see, so it seems like something that could be integrated into the CLI (especially since the bot uses it to an extent).

    Reacted by Josh Ghoulberg 👻
  7. JoshuaKGoldberg
    closed this as completedon Jun 13, 2023
  8. JoshuaKGoldberg
    added a commit that references this issue on Sep 5, 2023

    fix: remove .all-contributorsrc from .prettierignore (#806)

    8dbde91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.