Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

refactor: Updates app #246

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions .eslintrc.js

This file was deleted.

54 changes: 54 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"node": true,
"browser": true,
"es6": true
},
"plugins": [
"@typescript-eslint",
"react",
"react-hooks",
"import",
"jsx-a11y"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:jsx-a11y/strict",
"plugin:cypress/recommended",
"prettier"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018, // Allows for the parsing of modern ECMAScript features
"sourceType": "module" // Allows for the use of imports
},
"rules": {
"react/prop-types": "off", // Disable prop-types as we use TypeScript for type checking
"@typescript-eslint/explicit-function-return-type": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/react-in-jsx-scope": "off"
},
"overrides": [
// Override some TypeScript rules just for .js files
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off" //
}
}
]
}
6 changes: 5 additions & 1 deletion .github/CODEOWNERS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# These owners will be the default owners for everything in

# the repo. Unless a later match takes precedence,

# @code4puertorico/paravotar will be requested for

# review when someone opens a pull request.
* @code4puertorico/paravotar

- @code4puertorico/paravotar
22 changes: 12 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ''

assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/feedback.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
name: Feedback
about: A template to submit feedback to the ParaVotar team.
title: ''
title: ""
labels: feedback
assignees: ''

assignees: ""
---

<!--Thank you for taking an interest in our efforts. Before you submit this issue please take some time to look for similar issues that have already been submitted.
If you find one please feel free to participate in that discussion. If you didn't find one then please submit this one.
If you find one please feel free to participate in that discussion. If you didn't find one then please submit this one.

If this has to do with a Code of Conduct violation please email us at [email protected]

Thanks again! ❤️ -->

__Please write your feedback as detailed as possible bellow.__
**Please write your feedback as detailed as possible bellow.**

<!--Write you feedback here-->

**Have you thought about any possible solutions or ways to approach this? If so please let us know!**

__Have you thought about any possible solutions or ways to approach this? If so please let us know!__
<!--Write your thoughts here-->
17 changes: 6 additions & 11 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
name: Integration
on: [pull_request]
jobs:
cypress:
cypress-run:
runs-on: ubuntu-latest
strategy:
matrix:
machines: [1, 2, 3]
steps:
- name: Checkout
uses: actions/checkout@main
uses: actions/checkout@v4

- name: Install
run: yarn install --frozen-lockfile

- name: Build
run: yarn run build
run: npm ci

- name: Test
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v6
with:
browser: chrome
headless: true
start: yarn run serve
wait-on: 'http://localhost:8000'
build: npm run build
start: npm start
16 changes: 2 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,7 @@ jobs:
uses: actions/checkout@main

- name: Install
run: yarn install --frozen-lockfile
run: npm ci

- name: Tests
run: yarn run test

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main

- name: Install
run: yarn install --frozen-lockfile

- name: Lint
run: yarn run lint
run: npm test
33 changes: 19 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,49 @@

### Encontrar una tarea (issue)

* Puedes [buscar en las tareas](https://github.com/Code4PuertoRico/papeleta-pr/projects) que se quieren poder terminar para la próxima versión que se subirá al site.
- Puedes [buscar en las tareas](https://github.com/Code4PuertoRico/papeleta-pr/projects) que se quieren poder terminar para la próxima versión que se subirá al site.

### Escoger una tarea
- Comenta en la tarea dejando saber que lo vas a trabajar.

- Comenta en la tarea dejando saber que lo vas a trabajar.
- Si la tarea **no** tiene un comentario indicando la persona que lo trabajará o alguien asignado, la puedes trabajar.

### Someter cambios
- Copia (fork) el proyecto a tu cuenta de github.

- Copia (fork) el proyecto a tu cuenta de github.
- Crea un branch con un nombre descriptivo a la tarea.
- Usa el [README](https://github.com/Code4PuertoRico/papeleta-pr/blob/master/README.md) como referencia para comenzar el setup.
- Usa el [README](https://github.com/Code4PuertoRico/papeleta-pr/blob/master/README.md) como referencia para comenzar el setup.
- Una vez termines, crea un [pull request](https://help.github.com/en/articles/creating-a-pull-request).

## 🔍 Reportando Errores (Bugs)
## 🔍 Reportando Errores (Bugs)

### Antes de reportar un error

Antes de reportar un error debes verificar en [esta lista](https://github.com/Code4PuertoRico/papeleta-pr/issues?q=is%3Aissue+label%3Abug) por si ya alguna otra persona lo reportó.
Antes de reportar un error debes verificar en [esta lista](https://github.com/Code4PuertoRico/papeleta-pr/issues?q=is%3Aissue+label%3Abug) por si ya alguna otra persona lo reportó.

**Nota:** Si encuentras una tarea en [`closed issues`](https://github.com/Code4PuertoRico/papeleta-pr/issues?q=is%3Aissue+is%3Aclosed) que parece estar relacionada al error que quieres reportar, crea un nuevo issue y añade el enlace al issue anterior.
**Nota:** Si encuentras una tarea en [`closed issues`](https://github.com/Code4PuertoRico/papeleta-pr/issues?q=is%3Aissue+is%3Aclosed) que parece estar relacionada al error que quieres reportar, crea un nuevo issue y añade el enlace al issue anterior.

### Template para reportar un error
- Incluye todos los detalles que puedas.
- Pasos a seguir para reproducir / ver el error.

- Incluye todos los detalles que puedas.
- Pasos a seguir para reproducir / ver el error.
- Screenshot(s) **requerido**

## 💡 Sugiriendo Mejoras

### Antes de sugerir mejoras

Antes de sugerir mejoras o compartir ideas, verifica en [esta lista](https://github.com/Code4PuertoRico/papeleta-pr/issues?q=is%3Aopen+is%3Aissue) por si ya alguna otra persona lo sugirió (o sugirió algo parecido que pueda discutirse en el mismo thread).
Antes de sugerir mejoras o compartir ideas, verifica en [esta lista](https://github.com/Code4PuertoRico/papeleta-pr/issues?q=is%3Aopen+is%3Aissue) por si ya alguna otra persona lo sugirió (o sugirió algo parecido que pueda discutirse en el mismo thread).

Si encuentras alguna sugerencia parecida pero consideras que es lo suficientemente diferente a la tuya, crea un nuevo issue y añade el enlace al issue anterior.
Si encuentras alguna sugerencia parecida pero consideras que es lo suficientemente diferente a la tuya, crea un nuevo issue y añade el enlace al issue anterior.

### Template para sugerir una mejora o idea

- Incluye todos los detalles que puedas.
- Funcionalidad esperada
- Screenshot(s) / Sketches de ser necesario.
- Screenshot(s) / Sketches de ser necesario.

## Personas Contacto

- [Emmanuel Luciano](https://twitter.com/eLuciiano)
- [José Padilla](https://twitter.com/jpadilla1293)
- [José Padilla](https://twitter.com/jpadilla1293)
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
# Para Votar
# React + TypeScript + Vite

![CI](https://github.com/Code4PuertoRico/paravotar/workflows/CI/badge.svg)
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

## Development
Currently, two official plugins are available:

```shell
# Install Gatsby CLI
yarn global add gatsby-cli
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

# Clone the repository
git clone [email protected]:Code4PuertoRico/paravotar.git
## Expanding the ESLint configuration

# Navigate into your new site’s directory
cd paravotar
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

# Install dependencies
yarn install
- Configure the top-level `parserOptions` property like this:

# Run development server
npm start
```js
export default {
// other rules...
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: ["./tsconfig.json", "./tsconfig.node.json"],
tsconfigRootDir: __dirname,
},
}
```

## Deployment

Deployments are managed by Netlify. The site will update automatically when we merge something into master.
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
Loading