Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ dist-ssr
*.sln
*.sw?
.env

cambios.txt
47 changes: 40 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,45 @@
# React + Vite
# redema-front

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
## Configuración del entorno

Currently, two official plugins are available:
1. Se requiere Node.js para ejecutar la aplicación. [Descargar](https://nodejs.org/es/download)
2. Se recomienda Visual Studio Code como IDE. [Descargar](https://code.visualstudio.com/)
3. Se recomienda instalar la extensión de ESLint (Microsoft) para detectar errores.
4. Se recomienda instalar la extensión de Prettier (Prettier), usar Prettier como Default Formatter y activar Format On Save.

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
## Comandos útiles

## Expanding the ESLint configuration
- ´npm install´ instala las dependencias. Ejecutar siempre después de hacer un pull.
- ´npm run --dev´ ejecuta la aplicación en modo developer.
- ´npx eslint --fix´ eslint detecta errores en el proyecto y corrige los que puede.
- ´npx prettier . --write´ prettier formatea todo el código del proyecto.

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project.
## Estructura del proyecto

```
redema-front/
├── src/
│ ├── main.tsx // define las rutas
│ ├── global.css // estilo de todas páginas
│ ├── components/
│ │ ├── shared/ // componentes personalizados
│ │ └── ui/ // componentes importados
│ └── else/ // páginas que NO usan el MainLayout
│ ├── GoogleLogin.jsx // página para iniciar sesión
│ └── admin/ // páginas para el rol administrador
│ └── ...
│ └── main/ // páginas que usan el MainLayout
│ ├── MainLayout.jsx // implementa las barras de navegación lateral y superior
│ └── pages/
│ ├── Home.jsx // página inicial
│ ├── Post.jsx // página para crear publicación
│ ├── Profile.jsx // página para ver perfil
│ ├── Settings.jsx // página para configuraciones
│ ├── View.jsx // página para ver publicaciones
│ └── Browse.jsx // página para navegar entre las publicaciones
│ └── models/
│ └── ...
│ └── services/
│ └── ...
├── eslint.config.js // configuración de eslint
```
42 changes: 14 additions & 28 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,19 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import js from "@eslint/js";
import globals from "globals";
import pluginReact from "eslint-plugin-react";
import { defineConfig } from "eslint/config";

export default [
{ ignores: ['dist'] },
export default defineConfig([
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
files: ["**/*.{js,mjs,cjs,jsx}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: { globals: globals.browser },
settings: {
react: {
version: "detect",
},
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
pluginReact.configs.flat.recommended,
]);
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="es-AR">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/logo.ico" />
<link rel="icon" href="/assets/icons/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Redema</title>
</head>
Expand Down
13 changes: 13 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
"target": "ES2024",
"jsx": "react-jsx",
"allowImportingTsExtensions": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strict": true
},
"exclude": ["node_modules", "**/node_modules/*"]
}
Loading