Prettier

Prettier Integration: Lint and format your dbt™ yml files to maintain better coding standards and improve readability.

Prettier is a code formatter that makes your code more consistent and readable. Prettier helps you finding formatting errors and maintaining code style consistency in your YAML files.

Paradime provides an integration out of the box for you to run Prettier in your dbt™️ project.

Configuration

Prettier comes pre-installed and uses default configurations provided by Prettier library. A configuration file is not required to get started.

You can add custom configurations by creating a file called .prettierrc.yaml in your dbt™️ root directory (this is in the same directory where your dbt_project.yml lives.

.prettierrc.yaml
  "parser": "yaml",
  "trailingComma": "es5",
  "tabWidth": 4,
  "semi": false,
  "singleQuote": true

Running Prettier

With Paradime you can execute Prettier with one click using the Prettify button in the terminal toolbar.

Simply open the YAML file you want to lint and click on the Prettify button.

Find YAML errors

When running Prettify on a .yml file Prettier will flag yaml errors that could break your dbt™️ project. You can open the output tab to find and debug your .yml file.

Last updated