Code Quality Improvements

This commit is contained in:
2020-01-24 20:00:58 +01:00
parent f18a80caf3
commit 554e56f267
3 changed files with 3 additions and 3 deletions

View File

@@ -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 |

View File

@@ -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

View File

@@ -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