prettier
What it does
Automatically formats YAML files according to Prettier’s style rules, ensuring consistent formatting across all YAML files in your project.When to use it
Use this hook when you want to maintain consistent YAML formatting across your project.
Automatically formats YAML files according to Prettier’s style rules, ensuring consistent formatting across all YAML files in your project.When to use it
Use this hook when you want to maintain consistent YAML formatting across your project.
--write: Write changes directly to files--check: Check if files are formatted without modifying them--tab-width: Number of spaces per indentation level--use-tabs: Use tabs instead of spaces for indentation--prose-wrap: Control wrapping of prose (preserve, always, never)
Using rules in your .prettierrc file
To point pre-commit to use your custom.prettierrc rules file, you need to put the .prettierrc file in your repository root.
See also: