mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-12 19:30:30 +02:00
Code Quality Improvements
This commit is contained in:
@@ -8,7 +8,7 @@ A GitHub action for styling files with [prettier](https://prettier.io).
|
||||
|
||||
| Parameter | Required | Default | Description |
|
||||
| - | - | - | - |
|
||||
| prettier_options | :x: | '--write "{,!(node_modules)/**/}*.js"' | Prettier options (by default it applies to the whole repository) |
|
||||
| prettier_options | :x: | '--write **/*.js' | Prettier options (by default it applies to the whole repository) |
|
||||
| commit_options | :x: | - | Custom git commit options |
|
||||
| commit_message | :x: | 'Prettified Code!' | Custom git commit message |
|
||||
| file_pattern | :x: | '*' | Custom git add file pattern |
|
||||
|
||||
@@ -18,7 +18,7 @@ inputs:
|
||||
prettier_options:
|
||||
description: Options for the 'prettier' command
|
||||
required: false
|
||||
default: "--write '**/*.js'"
|
||||
default: "--write **/*.js"
|
||||
branch:
|
||||
description: Branch which the changes are merged to
|
||||
required: true
|
||||
|
||||
@@ -21,7 +21,7 @@ EOF
|
||||
echo "Installing prettier..."
|
||||
npm install --silent --global prettier
|
||||
echo "Prettifing files..."
|
||||
prettier $INPUT_PRETTIER_OPTIONS
|
||||
prettier $INPUT_PRETTIER_OPTIONS || echo "Problem while prettifying your files!"
|
||||
|
||||
if ! git diff --quiet
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user