mirror of
https://github.com/ivuorinen/actions.git
synced 2026-01-26 03:23:59 +00:00
ivuorinen/actions/prettier-check
Prettier Check
Description
Run Prettier check on the repository with advanced configuration and reporting
Inputs
| name | description | required | default |
|---|---|---|---|
working-directory |
Directory containing files to check |
false |
. |
prettier-version |
Prettier version to use |
false |
latest |
config-file |
Path to Prettier config file |
false |
.prettierrc |
ignore-file |
Path to Prettier ignore file |
false |
.prettierignore |
file-pattern |
Files to include (glob pattern) |
false |
**/*.{js,jsx,ts,tsx,css,scss,json,md,yaml,yml} |
cache |
Enable Prettier caching |
false |
true |
fail-on-error |
Fail workflow if issues are found |
false |
true |
report-format |
Output format (json, sarif) |
false |
sarif |
max-retries |
Maximum number of retry attempts |
false |
3 |
plugins |
Comma-separated list of Prettier plugins to install |
false |
"" |
check-only |
Only check for formatting issues without fixing |
false |
true |
token |
GitHub token for authentication |
false |
"" |
Outputs
| name | description |
|---|---|
files-checked |
Number of files checked |
unformatted-files |
Number of files with formatting issues |
sarif-file |
Path to SARIF report file |
cache-hit |
Indicates if there was a cache hit |
Runs
This action is a composite action.
Usage
- uses: ivuorinen/actions/prettier-check@main
with:
working-directory:
# Directory containing files to check
#
# Required: false
# Default: .
prettier-version:
# Prettier version to use
#
# Required: false
# Default: latest
config-file:
# Path to Prettier config file
#
# Required: false
# Default: .prettierrc
ignore-file:
# Path to Prettier ignore file
#
# Required: false
# Default: .prettierignore
file-pattern:
# Files to include (glob pattern)
#
# Required: false
# Default: **/*.{js,jsx,ts,tsx,css,scss,json,md,yaml,yml}
cache:
# Enable Prettier caching
#
# Required: false
# Default: true
fail-on-error:
# Fail workflow if issues are found
#
# Required: false
# Default: true
report-format:
# Output format (json, sarif)
#
# Required: false
# Default: sarif
max-retries:
# Maximum number of retry attempts
#
# Required: false
# Default: 3
plugins:
# Comma-separated list of Prettier plugins to install
#
# Required: false
# Default: ""
check-only:
# Only check for formatting issues without fixing
#
# Required: false
# Default: true
token:
# GitHub token for authentication
#
# Required: false
# Default: ""