Skip to content

Merge pull request #101 from intechstudio/feat/hot-reload-web-component #196

Merge pull request #101 from intechstudio/feat/hot-reload-web-component

Merge pull request #101 from intechstudio/feat/hot-reload-web-component #196

name: Formatting validator
on: push
jobs:
formatting-validator:
name: Prettier validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ""
- name: Setup NodeJs
uses: actions/setup-node@v3
with:
node-version: "18.4.0"
- name: Formatting
run: |
npm i
npm run format
git status
touch format_error.txt
echo 'Changed Files:'
git diff --name-only
git diff --name-only >> format_error.txt
if [ -s format_error.txt ]; then
echo "ERROR IN FORMATTING, PLEASE RUN PRETTIER ON THE CODEBASE BEFORE COMMITTING"
echo "Files:"
cat format_error.txt
exit 1
fi