Skip to content

Commit

Permalink
Merge pull request #9 from Pedro0505/ci-tests-linter
Browse files Browse the repository at this point in the history
Ci in frontend checking lint
  • Loading branch information
Pedro0505 authored Aug 19, 2023
2 parents 11c79aa + 6b4e2fd commit 4857c0d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/checking-eslint-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Rodando o eslint para encontrar erros no frontend

on:
pull_request:
push:
branches:
- master

jobs:
checking-eslint-web:
runs-on: ubuntu-20.04
steps:
- name: Verifica o repositório do Git
uses: actions/checkout@v3

- name: Instalando node na versão 16
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Instalando as dependencias
run: cd frontend && npm install

- name: Rodando o eslint para buscar erros
run: cd frontend && npm run lint:check
2 changes: 1 addition & 1 deletion .github/workflows/tests-api.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rodando os testes automatizados
name: Rodando os testes automatizados da api

on:
pull_request:
Expand Down
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"lint:check": "npx eslint . --ext .ts,.tsx"
},
"eslintConfig": {
"extends": [
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';

const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);

root.render(
<React.StrictMode>
<App />
</React.StrictMode>
</React.StrictMode>,
);

0 comments on commit 4857c0d

Please sign in to comment.