Skip to content

[UXE-5924] chore: implements lint workflow #4

[UXE-5924] chore: implements lint workflow

[UXE-5924] chore: implements lint workflow #4

Workflow file for this run

name: Run Linters
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- dev
env:
HUSKY: 0
jobs:
eslint:
runs-on: ubuntu-latest
container:
image: node:18-alpine3.18
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install SO deps
run: apk add curl bash
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install packages
run: yarn ci
- name: Run eslint
run: yarn lint
- name: Run format
run: yarn format
- name: Check for uncommitted changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "❌ O código não está formatado corretamente. Rode 'yarn format' localmente e faça commit das mudanças antes de enviar a PR."
exit 1
fi