# Prettier

Paradime provides native integration with [Prettier](https://prettier.io/playground/), enabling automatic formatting of YAML files in your dbt™ project directly from the IDE. This integration helps maintain consistent code style and catch potential YAML errors early.

### Integration Features

* One-click YAML formatting through the Lint button
* Built-in error detection
* Native IDE integration
* Customizable formatting rules

***

### Using the Integration

1. Open a `.sql` file in your editor
2. Click the **Lint** button in the [Command Panel](https://docs.paradime.io/app-help/documentation/code-ide/command-panel)
3. Review the changes made in [Git Lite](https://docs.paradime.io/app-help/documentation/code-ide/left-panel/git-lite)
   * Syntax errors
   * Style violations
   * Formatting suggestions
4. If satisfied with Lint updates, [Commit and Push](https://docs.paradime.io/app-help/code-ide/left-panel/git-lite#commit-and-push-your-changes) your changes to your remote branch.&#x20;

<figure><img src="https://2337193041-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHET0AD04uHMgdeLAjptq%2Fuploads%2FQberK7Y9UOljlUsO4CAm%2Fimage.png?alt=media&#x26;token=28f2b4cc-d075-4c42-93c2-83d3dc6ff8ec" alt=""><figcaption></figcaption></figure>

## Configuration

While the integration works out of the box, you can customize Prettier's behavior:

1. Create a `.prettierrc.yaml` file in your dbt™ project root directory (same location as your `dbt_project.yml`)
2. Add your configuration:

<pre class="language-yaml" data-title=".prettierrc.yaml example file"><code class="lang-yaml"># .prettierrc.yaml example file
<strong>yamlCopyparser: yaml
</strong>trailingComma: es5
tabWidth: 4
semi: false
singleQuote: true
printWidth: 100
</code></pre>

{% @arcade/embed flowId="mhDEXtnZo6K5nV53VADe" url="<https://app.arcade.software/share/mhDEXtnZo6K5nV53VADe>" %}

{% hint style="info" %}
Visit [prettier documentation](https://prettier.io/docs/en/configuration.html) a complete list of configuration options.
{% endhint %}

### Error Detection

When the integration runs Prettier on a `.yml` file, it automatically:

* Validates YAML syntax
* Flags potential errors
* Shows formatting issues
* Provides error details in the output tab

{% @arcade/embed flowId="5wCjYb0dIBV6pmwN3i0u" url="<https://app.arcade.software/share/5wCjYb0dIBV6pmwN3i0u>" %}

***

{% hint style="info" %}
Want to automate YAML formatting? Learn how to set up [Prettier pre-commit hooks](https://docs.paradime.io/app-help/documentation/integrations/code-ide/pre-commit/prettier-hooks) to format files before each commit.
{% endhint %}
