> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# cfra/prettier

Check and/or fix formatting of source code using prettier.
Source can be found at https://github.com/PicturePipe/prettier-orb/


## Commands

### commit-push

Perform a git commit and push it back upstream


| Parameter | Type | Default | Description |
|---|---|---|---|
| `remote-url` | string |  | Specify if the push should be made to a remote other than origin.
 |

### setup

Put standard .prettierrc.json if none is present


## Jobs

### check

Check formatting of source code using prettier. If your project does not contain a .prettierrc.json, a default style will be used.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `arguments` | string | './**' | Arguments to pass to prettier.
 |

### write-commit-push

Run prettier write and push new formatting of source code back to repository. If your project does not contain a .prettierrc.json, a default style will be used.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `arguments` | string | './**' | Arguments to pass to prettier.
 |
| `remote-url` | string |  | Specify if the push should be made to a remote other than origin.
 |

## Executors

### default

The docker image to use for running prettier tasks.


## Examples

### check

Check formatting of source code using prettier. If your project does not contain a .prettierrc.json, a default style will be used.


```yaml
orbs:
  prettier: picturepipe/prettier@volatile
version: 2.1
workflows:
  build:
    jobs:
      - prettier/check
```

### write-commit-push

Run prettier write and push new formatting of source code back to repository. If your project does not contain a .prettierrc.json, a default style will be used.


```yaml
orbs:
  prettier: picturepipe/prettier@volatile
version: 2.1
workflows:
  build:
    jobs:
      - prettier/write-commit-push
```