Skip to content

Commit

Permalink
Merge pull request #52 from InseeFr/rebase-project
Browse files Browse the repository at this point in the history
Rebase project
  • Loading branch information
EricThuaud authored Oct 2, 2023
2 parents 427e14a + 6003812 commit de8c07a
Show file tree
Hide file tree
Showing 84 changed files with 1,754 additions and 12,286 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
41 changes: 21 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
63 changes: 18 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,27 @@
# Platine Management
# React + TypeScript + Vite

Platine Management is a GitHub repository that houses the codebase for an innovative project developed by INSEE (National Institute of Statistics and Economic Studies) in France. This project aims to provide efficient management solutions for those involved in assistance and survey management.
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

## Table of Contents
Currently, two official plugins are available:

- [Platine Management](#platine-management)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Getting Started](#getting-started)
- [Contributing](#contributing)
- [License](#license)
- [@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

## Introduction
## Expanding the ESLint configuration

Platine Management is designed to streamline and enhance the collection and management of internet surveys within INSEE. It provides a comprehensive web application for administering surveys. The project leverages modern technologies to provide a user-friendly interface and efficient workflows for people in charge of managing and assistance of surveys.
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

## Getting Started
- Configure the top-level `parserOptions` property like this:

To get started with Platine Management, follow these steps:

1. **Clone the Repository**: Begin by cloning this repository to your local machine using the following command:

```bash
git clone https://github.com/InseeFr/Platine-Management.git
```js
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
```

2. **Installation**: Install the required dependencies by running the appropriate installation commands. Detailed instructions can be found in the project's documentation.

3. **Configuration**: Configure the project settings and any necessary environment variables as per the documentation guidelines.

## Contributing

Contributions to Platine Management are welcome and encouraged! If you would like to contribute to the project, please follow these guidelines:

1. Fork the repository.

2. Create a new branch for your feature or bug fix.

3. Commit your changes, providing descriptive commit messages.

4. Push your branch to your forked repository.

5. Submit a pull request, detailing the changes you have made.

Please ensure that your contributions align with the project's coding conventions and best practices. Review the project's documentation for further information on the development process and contribution guidelines.

## License

The Platine Management project is released under the [MIT License](LICENSE). You can find more details in the [LICENSE](LICENSE) file.

---

Thank you for your interest in Platine Management! For any further questions or clarifications, contact the project maintainers.
- 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
25 changes: 25 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600&family=Open+Sans:wght@400;600;700&display=swap"
rel="stylesheet"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
body {
margin: 0;
padding: 0;
}
</style>
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
82 changes: 25 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,37 @@
{
"name": "platine-management",
"version": "0.2.12",
"private": true,
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.13.7",
"@mui/material": "^5.13.7",
"@mui/styles": "^5.13.7",
"@mui/x-data-grid": "^6.9.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"date-fns": "^2.30.0",
"keycloak-js": "21.1.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.14.1",
"react-scripts": "5.0.1",
"web-vitals": "^3.3.2"
},
"version": "1.0.0",
"type": "module",
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build && copy-and-watch configuration/* build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint:check": "eslint . --ext .js,.jsx",
"dev": "vite",
"build": "tsc && vite build",
"lint:check": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "npm run lint:check -- --fix",
"_format": "prettier '**/*.{js,jsx,json,md}'",
"_format": "prettier '**/*.{ts,tsx,json,md}'",
"format": "npm run _format -- --write",
"format:check": "npm run _format -- --list-different",
"prepare": "husky install"
},
"lint-staged": {
"*.{js,jsx}": [
"eslint --fix"
],
"*.{js,jsx,json,md}": [
"prettier --write"
]
"preview": "vite preview"
},
"eslintConfig": {
"extends": [
"eslint:recommended",
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.11",
"@mui/material": "^5.14.10",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"copy-and-watch": "^0.1.6",
"eslint": "^8.44.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.3",
"prettier": "^3.0.0"
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.45.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"prettier": "^3.0.0",
"typescript": "^5.0.2",
"vite": "^4.4.5"
}
}
Binary file added public/logoInsee.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file removed src/App.css
Empty file.
77 changes: 0 additions & 77 deletions src/App.jsx

This file was deleted.

8 changes: 0 additions & 8 deletions src/App.test.js

This file was deleted.

11 changes: 11 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Home } from "./pages/home/Home";
import { ThemeProvider } from "@mui/material";
import { theme } from "./theme";

export function App() {
return (
<ThemeProvider theme={theme}>
<Home />
</ThemeProvider>
);
}
37 changes: 0 additions & 37 deletions src/core/api/fetcher.js

This file was deleted.

Loading

0 comments on commit de8c07a

Please sign in to comment.