mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-05 16:37:46 +00:00
68a1dbe671
* chore(deps): upgrade ESLint 9 → 10 with plugin compatibility fixes - eslint: ^9 → ^10.0.0 (backend + frontend) - @eslint/js: ^9 → ^10.0.0 (backend + frontend) - eslint-plugin-react-refresh: ^0.4.24 → ^0.5.2 (ESM, config factory API) - Update frontend eslint.config.js: destructured import for react-refresh, call configs.vite() as factory function (0.5 API change) - Downgrade new ESLint 10 rules (no-useless-assignment, preserve-caught-error) to warnings for existing code patterns - eslint-plugin-react-hooks stays at 7.0.1 (stable) with --legacy-peer-deps until a stable release adds ESLint 10 peer support * chore(deps): upgrade recharts 2.x to 3.8 with chart.tsx type fixes recharts 3.x moved Tooltip/Legend props to context-based API. Updated chart.tsx to use explicit prop interfaces with internal recharts type imports (LegendPayload, TooltipPayload, TooltipFormatter). * chore(deps): upgrade TypeScript 5.9 to 6.0 - Remove deprecated baseUrl from frontend tsconfig (paths works standalone in TS 6) - Add react-is dependency required by recharts 3.x at build time - Backend and frontend both compile and lint cleanly * chore(deps): upgrade Vite 7.3 to 8.0 and @vitejs/plugin-react to 6.0 Vite 8 replaces Rollup+esbuild with Rolldown, significantly improving build speed (~2s vs ~18s). No config changes required. * fix(ci): add .npmrc with legacy-peer-deps for CI and Docker builds typescript-eslint@8.x requires typescript <6.0.0 and eslint-plugin-react-hooks@7.0.1 requires eslint <=9. Until upstream packages release compatible versions, legacy-peer-deps is needed. * docs: add logo assets and re-ignore CLAUDE.md * fix(ci): copy .npmrc into prod-deps Docker stage The prod-deps stage also runs npm ci with backend/package.json but was missing the .npmrc needed to bypass peer dep conflicts.
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])