diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..b1f5de4 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,37 @@ +module.exports = { + root: true, + env: { + browser: true, + es2020: true, + }, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:react-hooks/recommended", + "plugin:react/recommended", + ], + ignorePatterns: ["dist", ".eslintrc.cjs"], + parser: "@typescript-eslint/parser", + plugins: [ + "react-refresh", + "react", + "react-hooks", + "@typescript-eslint", + "prettier", + ], + rules: { + "no-unused-vars": "off", + "react-refresh/only-export-components": [ + "warn", + { + allowConstantExport: true, + }, + ], + "prettier/prettier": [ + "error", + { + endofLine: "auto", + }, + ], + }, +}; diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..965f4a5 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1 @@ +npx gitmoji --hook diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..ab3be30 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "singleQuote": false, + "trailingComma": "all", + "useTabs": false, + "arrowParens": "always", + "bracketSpacing": true, + "bracketSameLine": false +} diff --git a/eslint.config.js b/eslint.config.js index 092408a..79a552e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,28 +1,28 @@ -import js from '@eslint/js' -import globals from 'globals' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' -import tseslint from 'typescript-eslint' +import js from "@eslint/js"; +import globals from "globals"; +import reactHooks from "eslint-plugin-react-hooks"; +import reactRefresh from "eslint-plugin-react-refresh"; +import tseslint from "typescript-eslint"; export default tseslint.config( - { ignores: ['dist'] }, + { ignores: ["dist"] }, { extends: [js.configs.recommended, ...tseslint.configs.recommended], - files: ['**/*.{ts,tsx}'], + files: ["**/*.{ts,tsx}"], languageOptions: { ecmaVersion: 2020, globals: globals.browser, }, plugins: { - 'react-hooks': reactHooks, - 'react-refresh': reactRefresh, + "react-hooks": reactHooks, + "react-refresh": reactRefresh, }, rules: { ...reactHooks.configs.recommended.rules, - 'react-refresh/only-export-components': [ - 'warn', + "react-refresh/only-export-components": [ + "warn", { allowConstantExport: true }, ], }, }, -) +); diff --git a/package.json b/package.json index 039feff..c5349f8 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,17 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "eslint .", - "preview": "vite preview" + "preview": "vite preview", + "prepare": "husky" }, "dependencies": { + "@tanstack/react-query": "4", + "axios": "^1.7.9", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "react-router-dom": "^7.0.2", + "styled-components": "^6.1.13", + "zustand": "^5.0.2" }, "devDependencies": { "@eslint/js": "^9.15.0", @@ -22,6 +28,7 @@ "eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-refresh": "^0.4.14", "globals": "^15.12.0", + "husky": "^9.1.7", "typescript": "~5.6.2", "typescript-eslint": "^8.15.0", "vite": "^6.0.1" diff --git a/src/App.tsx b/src/App.tsx index 3d7ded3..dbac9a1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,35 +1,17 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import viteLogo from '/vite.svg' -import './App.css' +import { Outlet } from "react-router-dom"; +import Header from "./components/layout/Header"; +import Footer from "./components/layout/Footer"; +import GlobalStyles from "./styles/GlobalStyle"; function App() { - const [count, setCount] = useState(0) - return ( <> -
- - Vite logo - - - React logo - -
-

Vite + React

-
- -

- Edit src/App.tsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

+ +
+ +