{"id":25600611,"url":"https://github.com/rutajdash/prettier-cli-action","last_synced_at":"2025-04-13T06:22:25.185Z","repository":{"id":65161594,"uuid":"433011704","full_name":"rutajdash/prettier-cli-action","owner":"rutajdash","description":"A GitHub action to run Prettier CLI Checks.","archived":false,"fork":false,"pushed_at":"2024-02-01T17:10:00.000Z","size":17,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T03:02:48.601Z","etag":null,"topics":["actions","check","cli","formatter","github","javascript","linter","marketplace","open-source","prettier","tool","typescript","workflow"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/prettier-check","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rutajdash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-11-29T11:14:27.000Z","updated_at":"2024-04-20T19:36:12.000Z","dependencies_parsed_at":"2024-02-01T18:52:26.647Z","dependency_job_id":"cb059ea8-9215-4db8-bf36-115d840d7132","html_url":"https://github.com/rutajdash/prettier-cli-action","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rutajdash%2Fprettier-cli-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rutajdash%2Fprettier-cli-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rutajdash%2Fprettier-cli-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rutajdash%2Fprettier-cli-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rutajdash","download_url":"https://codeload.github.com/rutajdash/prettier-cli-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240038490,"owners_count":19738149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","check","cli","formatter","github","javascript","linter","marketplace","open-source","prettier","tool","typescript","workflow"],"created_at":"2025-02-21T15:27:08.447Z","updated_at":"2025-02-21T15:27:09.198Z","avatar_url":"https://github.com/rutajdash.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prettier CLI Check\n\nA GitHub action to run [Prettier](https://prettier.io/) CLI Checks. This project was **heavily** inspired by other actions available and a shoutout to [@creyD](https://github.com/creyD). The goal of this project was to create a simple action which would be easy to use.\n\n[![Code Style][code-style-shield]][code-style-url]\n[![Latest Release][release-shield]][release-url]\n[![MIT License][license-shield]][license-url]\n[![Issues][issues-shield]][issues-url]\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n\n## Usage\n\n### Parameters\n\n| Parameter        |        Default        | Description                                                                                                                                                     |\n| ---------------- | :-------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| file_pattern     |      `'**/*.js'`      | The file pattern prettier will check. Follow [glob syntax](https://github.com/mrmlnc/fast-glob#pattern-syntax).                                                 |\n| config_path      |         `''`          | The path to the `prettierrc` file. Read more [here](https://prettier.io/docs/en/configuration.html).                                                            |\n| ignore_path      | `'./.prettierignore'` | The path to the `prettierignore` file. This file should list file patterns to skip using the [glob syntax](https://github.com/mrmlnc/fast-glob#pattern-syntax). |\n| prettier_version |      `'latest'`       | The version of prettier to use. Find versions [here](https://www.npmjs.com/package/prettier?activeTab=versions).                                                |\n| fail_on_error    |        `true`         | Whether the action should fail if prettier finds errors in formatting.                                                                                          |\n\n### Output\n\nYou can access the list of files prettier found errors using the actions context like `steps.\u003cstep-id\u003e.outputs.prettier_output`. The returned value is a list of files as a string, one per line.\n\n### Examples\n\n```yaml\nname: Continuous Integration\n\n# This action works with pull requests and pushes on the main branch\non:\n  pull_request:\n  push:\n    branches: [main]\n\njobs:\n  prettier:\n    name: Prettier Check\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Repository\n        uses: actions/checkout@v2\n\n      - name: Run Prettier\n        id: prettier-run\n        uses: rutajdash/prettier-cli-action@v1.0.0\n        with:\n          config_path: ./.prettierrc.yml\n\n      # This step only runs if prettier finds errors causing the previous step to fail\n      # This steps lists the files where errors were found\n      - name: Prettier Output\n        if: ${{ failure() }}\n        shell: bash\n        run: |\n          echo \"The following files are not formatted:\"\n          echo \"${{steps.prettier-run.outputs.prettier_output}}\"\n```\n\nMore documentation for writing a workflow can be found [here](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions).\n\n## Issues\n\nPlease report all bugs and feature requests using the [GitHub issues function](https://github.com/rutajdash/prettier-cli-action/issues/new/choose). Thanks!\n\n## Contributing\n\nPull Requests are always welcome! Feel free to pick any [issue][issues-url] or raise a new [feature request][feature-request-url]!\nDo read the [contributing guidelines][contributing-guidelines-url] and [code of conduct][code-of-conduct-url].\n\n[code-style-shield]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=plastic\n[code-style-url]: https://github.com/prettier/prettier\n[release-shield]: https://img.shields.io/github/v/release/rutajdash/prettier-cli-action?style=plastic\n[release-url]: https://github.com/rutajdash/prettier-cli-actions/releases\n[contributors-shield]: https://img.shields.io/github/contributors/rutajdash/prettier-cli-action?style=plastic\n[contributors-url]: https://github.com/rutajdash/prettier-cli-action/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/rutajdash/prettier-cli-action?style=plastic\n[forks-url]: https://github.com/rutajdash/prettier-cli-action/network/members\n[stars-shield]: https://img.shields.io/github/stars/rutajdash/prettier-cli-action?style=plastic\n[stars-url]: https://github.com/rutajdash/prettier-cli-action/stargazers\n[issues-shield]: https://img.shields.io/github/issues/rutajdash/prettier-cli-action?style=plastic\n[issues-url]: https://github.com/rutajdash/prettier-cli-action/issues\n[feature-request-url]: https://github.com/rutajdash/prettier-cli-action/issues/new?assignees=\u0026labels=enhancement\u0026template=feature_request.md\u0026title=feat%3A\n[license-shield]: https://img.shields.io/github/license/rutajdash/prettier-cli-action?style=plastic\n[license-url]: https://github.com/rutajdash/prettier-cli-action/blob/main/LICENSE\n[contributing-guidelines-url]: https://github.com/rutajdash/prettier-cli-action/blob/main/CONTRIBUTING.md\n[code-of-conduct-url]: https://github.com/rutajdash/prettier-cli-action/blob/main/CODE_OF_CONDUCT.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frutajdash%2Fprettier-cli-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frutajdash%2Fprettier-cli-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frutajdash%2Fprettier-cli-action/lists"}