parent
7a614325f0
commit
48558e66de
@ -1,18 +1,18 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
env: { browser: true, es2020: true },
|
env: { browser: true, es2023: true },
|
||||||
extends: [
|
extends: [
|
||||||
'eslint:recommended',
|
"eslint:recommended",
|
||||||
'plugin:@typescript-eslint/recommended',
|
"plugin:@typescript-eslint/recommended",
|
||||||
'plugin:react-hooks/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 },
|
|
||||||
],
|
],
|
||||||
},
|
ignorePatterns: ["dist", ".eslintrc.cjs"],
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
plugins: ["react-refresh"],
|
||||||
|
rules: {
|
||||||
|
"react-refresh/only-export-components": [
|
||||||
|
"warn",
|
||||||
|
{ allowConstantExport: true },
|
||||||
|
],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,22 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
parser: '@typescript-eslint/parser',
|
parser: "@typescript-eslint/parser",
|
||||||
plugins: [
|
plugins: ["@typescript-eslint", "react", "react-hooks"],
|
||||||
'@typescript-eslint',
|
|
||||||
'react',
|
|
||||||
'react-hooks'
|
|
||||||
],
|
|
||||||
extends: [
|
extends: [
|
||||||
'eslint:recommended',
|
"eslint:recommended",
|
||||||
'plugin:@typescript-eslint/recommended',
|
"plugin:@typescript-eslint/recommended",
|
||||||
'plugin:react/recommended',
|
"plugin:react/recommended",
|
||||||
'plugin:react/jsx-runtime',
|
"plugin:react/jsx-runtime",
|
||||||
'plugin:react-hooks/recommended'
|
"plugin:react-hooks/recommended",
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
|
"prefer-const": ["error", {
|
||||||
|
"destructuring": "all"
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
react: {
|
react: {
|
||||||
version: 'detect'
|
version: "detect",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
$finder = (new PhpCsFixer\Finder())->in(__DIR__);
|
|
||||||
|
|
||||||
return (new PhpCsFixer\Config())
|
|
||||||
->setRules([
|
|
||||||
'@PER-CS' => true,
|
|
||||||
'@PHP74Migration' => true,
|
|
||||||
'array_syntax' => ['syntax' => 'short'],
|
|
||||||
'braces_position' => [
|
|
||||||
'classes_opening_brace' => 'same_line',
|
|
||||||
'functions_opening_brace' => 'same_line'
|
|
||||||
]
|
|
||||||
])
|
|
||||||
->setIndent(" ")
|
|
||||||
->setFinder($finder);
|
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"bracketSameLine": true,
|
"bracketSameLine": true,
|
||||||
"trailingComma": "all",
|
"trailingComma": "all",
|
||||||
"printWidth": 80,
|
"printWidth": 80,
|
||||||
"tabWidth": 4,
|
"tabWidth": 4,
|
||||||
"semi": false
|
"semi": false
|
||||||
}
|
}
|
@ -1,3 +1,3 @@
|
|||||||
* [Description.md](Description.md)
|
- [Description.md](Description.md)
|
||||||
* [Conception.md](Conception.md)
|
- [Conception.md](Conception.md)
|
||||||
* [how-to-dev.md](how-to-dev.md)
|
- [how-to-dev.md](how-to-dev.md)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# IQBall - Web Application
|
# IQBall - Web Application
|
||||||
|
|
||||||
This repository hosts the IQBall application for web
|
This repository hosts the IQBall application for web
|
||||||
|
|
||||||
## Read the docs !
|
## Read the docs !
|
||||||
|
|
||||||
You can find some additional documentation in the [Documentation](Documentation) folder,
|
You can find some additional documentation in the [Documentation](Documentation) folder,
|
||||||
and in the [wiki](https://codefirst.iut.uca.fr/git/IQBall/Application-Web/wiki).
|
and in the [wiki](https://codefirst.iut.uca.fr/git/IQBall/Application-Web/wiki).
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/src/assets/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/src/assets/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Vite + React + TS</title>
|
<title>Vite + React + TS</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script type="module" src="/src/main.tsx"></script>
|
<script type="module" src="/src/main.tsx"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,41 +1,42 @@
|
|||||||
{
|
{
|
||||||
"name": "iqball_web",
|
"name": "iqball_web",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@loadable/component": "^5.16.3",
|
"@loadable/component": "^5.16.3",
|
||||||
"@testing-library/jest-dom": "^5.17.0",
|
"@testing-library/jest-dom": "^5.17.0",
|
||||||
"@testing-library/react": "^13.4.0",
|
"@testing-library/react": "^13.4.0",
|
||||||
"@testing-library/user-event": "^13.5.0",
|
"@testing-library/user-event": "^13.5.0",
|
||||||
"@types/jest": "^27.5.2",
|
"@types/jest": "^27.5.2",
|
||||||
"@types/node": "^16.18.59",
|
"@types/node": "^16.18.59",
|
||||||
"@types/react": "^18.2.31",
|
"@types/react": "^18.2.31",
|
||||||
"@types/react-dom": "^18.2.14",
|
"@types/react-dom": "^18.2.14",
|
||||||
"eslint-plugin-react-refresh": "^0.4.5",
|
"eslint-plugin-react-refresh": "^0.4.5",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-draggable": "^4.4.6",
|
"react-draggable": "^4.4.6",
|
||||||
"react-router-dom": "^6.22.0",
|
"react-router-dom": "^6.22.0",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"vite": "^4.5.0",
|
"vite": "^4.5.0",
|
||||||
"vite-plugin-css-injected-by-js": "^3.3.0"
|
"vite-plugin-css-injected-by-js": "^3.3.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite --host",
|
"start": "vite --host",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"test": "vite test",
|
"test": "vite test",
|
||||||
"format": "prettier --config .prettierrc 'front' --write",
|
"format": "prettier --config .prettierrc '.' --write",
|
||||||
"tsc": "tsc"
|
"tsc": "tsc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
"@types/loadable__component": "^5.13.8",
|
||||||
"@typescript-eslint/parser": "^6.11.0",
|
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||||
"@vitejs/plugin-react": "^4.1.0",
|
"@typescript-eslint/parser": "^6.11.0",
|
||||||
"eslint": "^8.53.0",
|
"@vitejs/plugin-react": "^4.1.0",
|
||||||
"eslint-plugin-react": "^7.33.2",
|
"eslint": "^8.53.0",
|
||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react": "^7.33.2",
|
||||||
"prettier": "^3.1.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"typescript": "^5.2.2",
|
"prettier": "^3.1.0",
|
||||||
"vite-plugin-svgr": "^4.1.0"
|
"typescript": "^5.2.2",
|
||||||
}
|
"vite-plugin-svgr": "^4.1.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import React from 'react'
|
import React from "react"
|
||||||
import ReactDOM from 'react-dom/client'
|
import ReactDOM from "react-dom/client"
|
||||||
import './index.css'
|
import "./index.css"
|
||||||
import App from "./App.tsx";
|
import App from "./App.tsx"
|
||||||
|
|
||||||
|
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<App/>
|
<App />
|
||||||
</React.StrictMode>,
|
</React.StrictMode>,
|
||||||
)
|
)
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
import {useLocation} from "react-router-dom";
|
import { useLocation } from "react-router-dom"
|
||||||
import {BASE} from "../Constants.ts";
|
import { BASE } from "../Constants.ts"
|
||||||
export default function NotFoundPage() {
|
export default function NotFoundPage() {
|
||||||
|
|
||||||
const target = useLocation()
|
const target = useLocation()
|
||||||
|
|
||||||
return <div>
|
return (
|
||||||
<h1>{target.pathname} NOT FOUND !</h1>
|
<div>
|
||||||
<button onClick={() => location.pathname = BASE + "/"}>go back to home</button>
|
<h1>{target.pathname} NOT FOUND !</h1>
|
||||||
</div>
|
<button onClick={() => (location.pathname = BASE + "/")}>
|
||||||
|
go back to home
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
export default function CreateTeamPage() {
|
export default function CreateTeamPage() {
|
||||||
return <h1>Create Team Page</h1>
|
return <h1>Create Team Page</h1>
|
||||||
}
|
}
|
@ -1,23 +1,23 @@
|
|||||||
import React, { CSSProperties, useState } from "react"
|
// import React, { CSSProperties, useState } from "react"
|
||||||
import "../style/visualizer.css"
|
// import "../style/visualizer.css"
|
||||||
import Court from "../assets/court/full_court.svg"
|
// import Court from "../assets/court/full_court.svg"
|
||||||
|
//
|
||||||
export default function Visualizer({ id, name }: { id: number; name: string }) {
|
// // export default function Visualizer({ id, name }: { id: number; name: string }) {
|
||||||
const [style, setStyle] = useState<CSSProperties>({})
|
// // const [style, setStyle] = useState<CSSProperties>({})
|
||||||
|
// //
|
||||||
return (
|
// // return (
|
||||||
<div id="main">
|
// // <div id="main">
|
||||||
<div id="topbar">
|
// // <div id="topbar">
|
||||||
<h1>{name}</h1>
|
// // <h1>{name}</h1>
|
||||||
</div>
|
// // </div>
|
||||||
<div id="court-container">
|
// // <div id="court-container">
|
||||||
<img
|
// // <img
|
||||||
id="court"
|
// // id="court"
|
||||||
src={Court}
|
// // src={Court}
|
||||||
style={style}
|
// // style={style}
|
||||||
alt="Basketball Court"
|
// // alt="Basketball Court"
|
||||||
/>
|
// // />
|
||||||
</div>
|
// // </div>
|
||||||
</div>
|
// // </div>
|
||||||
)
|
// // )
|
||||||
}
|
// // }
|
||||||
|
@ -1,25 +1,26 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2020",
|
"target": "ES2020",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
||||||
"module": "ESNext",
|
"types": ["vite/client", "vite-plugin-svgr/client"],
|
||||||
"skipLibCheck": true,
|
"module": "ESNext",
|
||||||
|
"skipLibCheck": true,
|
||||||
|
|
||||||
/* Bundler mode */
|
/* Bundler mode */
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"allowImportingTsExtensions": true,
|
"allowImportingTsExtensions": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
|
|
||||||
/* Linting */
|
/* Linting */
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"references": [{ "path": "./tsconfig.node.json" }]
|
"references": [{ "path": "./tsconfig.node.json" }]
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"strict": true
|
"strict": true
|
||||||
},
|
},
|
||||||
"include": ["vite.config.ts"]
|
"include": ["vite.config.ts"]
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,20 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from "vite"
|
||||||
import react from '@vitejs/plugin-react'
|
import react from "@vitejs/plugin-react"
|
||||||
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
|
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js"
|
||||||
import svgr from "vite-plugin-svgr";
|
import svgr from "vite-plugin-svgr"
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
build: {
|
||||||
react(),
|
target: 'es2023',
|
||||||
cssInjectedByJsPlugin({
|
},
|
||||||
relativeCSSInjection: true,
|
plugins: [
|
||||||
}),
|
react(),
|
||||||
svgr({
|
cssInjectedByJsPlugin({
|
||||||
include: "**/*.svg?react"
|
relativeCSSInjection: true,
|
||||||
})
|
}),
|
||||||
]
|
svgr({
|
||||||
|
include: "**/*.svg?react",
|
||||||
|
}),
|
||||||
|
],
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in new issue