indykoning / grumphp-prettier
A Prettier task for GrumPHP.
Installs: 14 749
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Type:plugin
Requires
- phpro/grumphp: ^2.0.0
This package is auto-updated.
Last update: 2025-03-31 08:49:31 UTC
README
Installation
composer require indykoning/grumphp-prettier
And at the very least you need prettier installed in your node_modules folder.
yarn add prettier
Usage
In your grumphp.yml :
grumphp: extensions: - Indykoning\GrumPHPPrettier\ExtensionLoader tasks: prettier: # These are all optional command: "node_modules/.bin/prettier" triggered_by: ["js", "ts", "jsx", "tsx", "vue", "css", "less", "scss", "sass", "html", "blade.php", "antlers", "phtml"] ignore_patterns: [] # Whether it should immediately fix instead of asking to fix auto_fix: false # If auto fix is enabled should we stage it as well? # With both on it will fix and add the fixed files while you're committing auto_stage: false # These optional settings pass arguments to prettier, overwriting your .prettierrc # https://prettier.io/docs/en/options.html ignore_unknown: true arrow_parens: ignore_unknown: arrow_parens: bracket_same_line: no_bracket_spacing: end_of_line: html_whitespace_sensitivity: parser: print_width: prose_wrap: quote_props: no_semi: single_attribute_per_line: single_quote: tab_width: trailing_comma: use_tabs: vue_indent_script_and_style: