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

[BUG] Community plugin not recognized as valid #78

Closed
slaght opened this issue Dec 7, 2021 · 0 comments · Fixed by #87 or #88
Closed

[BUG] Community plugin not recognized as valid #78

slaght opened this issue Dec 7, 2021 · 0 comments · Fixed by #87 or #88
Labels
bug Something isn't working

Comments

@slaght
Copy link

slaght commented Dec 7, 2021

Hello,

First let me just say thank you for being such an active maintainer. This project looks amazing.

I'm trying to set this action up in a repository that hosts a Salesforce project. I'm trying to install prettier-plugin-apex, which is listed under the community plugins section of the official Prettier documentation.
However, the action doesn't seem to recognize this plugin as valid:

Screen Shot 2021-12-07 at 10 39 31 AM

It looks like entrypoint.sh is looking for the plugin string to contain @prettier/... although plugins named prettier-plugin-... are also valid according to Prettier's docs. Is this possible to do via this action or is it unable to install unofficial pugins?

Here is my full action for reference:

name: Prettify Code

on: [pull_request]

jobs:
  prettier:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2
        with:
          # Incremental diffs require fetch depth to be at 0 to grab the target branch
          fetch-depth: "0"

      - name: Prettify Modified Code
        uses: creyD/prettier_action@v4.1
        with:
          same_commit: true
          only_changed: true
          prettier_plugins: prettier-plugin-apex
          prettier_options: --write --config .prettierrc {html, cls, trigger, apex, cmp, page, component}
@slaght slaght added the bug Something isn't working label Dec 7, 2021
bercos added a commit to bercos/prettier_action that referenced this issue Jan 14, 2022
Fix creyD#78 by updating the regex.

I tested the regex but was not sure how to test the action. The regex should cover all three valid cases outlined here https://prettier.io/docs/en/plugins.html.
@bercos bercos mentioned this issue Jan 14, 2022
creyD added a commit that referenced this issue Jan 15, 2022
@creyD creyD closed this as completed in #88 Jan 15, 2022
levex pushed a commit to levex/prettier_action that referenced this issue Feb 1, 2022
Fix creyD#78 by updating the regex.

I tested the regex but was not sure how to test the action. The regex should cover all three valid cases outlined here https://prettier.io/docs/en/plugins.html.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant