-
-
Notifications
You must be signed in to change notification settings - Fork 308
30 lines (26 loc) · 808 Bytes
/
prettier.yml
File metadata and controls
30 lines (26 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Formating validation
on:
pull_request:
push:
branches: [ main, dev ]
jobs:
prettier:
name: Prettier Check
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Run Prettier
id: prettier-run
uses: rutajdash/prettier-cli-action@v1.0.0
with:
config_path: ./.prettierrc
file_pattern: "*.{js,jsx,ts,tsx,json}"
# This step only runs if prettier finds errors causing the previous step to fail
# This steps lists the files where errors were found
- name: Prettier Output
if: ${{ failure() }}
shell: bash
run: |
echo "The following files aren't formatted properly:"
echo "${{steps.prettier-run.outputs.prettier_output}}"