refactor: reorganize project structure and improve code quality

- Move CI/CD configs to config/ci/ directory
- Reorganize scripts into categorized directories (deployment, monitoring, testing, utils)
- Consolidate documentation into docs/ directory with proper structure
- Update linting and testing configurations
- Remove obsolete test reports and performance summaries
- Add new documentation for code quality tools and contact form security
- Improve project organization and maintainability
- Fix lint-staged config to only lint JS/TS files
- Disable react/react-in-jsx-scope rule for Next.js compatibility
- Ignore scripts and test config directories in ESLint
This commit is contained in:
张翔
2026-03-24 13:38:58 +08:00
parent c06ac08510
commit 498bb3a3c8
62 changed files with 5473 additions and 6498 deletions
+2 -3
View File
@@ -3,7 +3,6 @@
import { useState, useMemo, useRef, useEffect, ChangeEvent } from 'react';
import { useInView } from 'framer-motion';
import { contentService } from '@/lib/api/services';
import { Card } from '@/components/ui/card';
import { Badge } from '@/components/ui/badge';
import { Input } from '@/components/ui/input';
import { Button } from '@/components/ui/button';
@@ -60,7 +59,7 @@ export default function CasesPage() {
}, []);
const filteredCases = useMemo(() => {
if (!cases || cases.length === 0) return [];
if (!cases || cases.length === 0) {return [];}
return cases.filter((caseItem) => {
const matchesIndustry = selectedIndustry === '全部' || caseItem.industry === selectedIndustry;
@@ -97,7 +96,7 @@ export default function CasesPage() {
return (
<div className="min-h-screen bg-white flex items-center justify-center">
<div className="text-center">
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-[#C41E3A] mx-auto mb-4"></div>
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-[#C41E3A] mx-auto mb-4" />
<p className="text-[#5C5C5C]">...</p>
</div>
</div>
+3 -3
View File
@@ -8,7 +8,7 @@ import { Badge } from '@/components/ui/badge';
import { Input } from '@/components/ui/input';
import { Button } from '@/components/ui/button';
import { PageHeader } from '@/components/ui/page-header';
import { Search, Calendar, ArrowLeft, Filter, ChevronLeft, ChevronRight } from 'lucide-react';
import { Search, Calendar, ArrowLeft, Filter, ChevronLeft, ChevronRight, ArrowRight } from 'lucide-react';
import Link from 'next/link';
import { motion } from 'framer-motion';
@@ -24,7 +24,7 @@ export default function NewsListPage() {
const { news, loading, error } = useNews();
const filteredNews = useMemo(() => {
if (!news || news.length === 0) return [];
if (!news || news.length === 0) {return [];}
return news.filter((newsItem) => {
const matchesCategory = selectedCategory === '全部' || newsItem.category === selectedCategory;
@@ -61,7 +61,7 @@ export default function NewsListPage() {
return (
<div className="min-h-screen bg-white flex items-center justify-center">
<div className="text-center">
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-[#C41E3A] mx-auto mb-4"></div>
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-[#C41E3A] mx-auto mb-4" />
<p className="text-[#5C5C5C]">...</p>
</div>
</div>
+6 -4
View File
@@ -1,10 +1,12 @@
import { NextRequest, NextResponse } from 'next/server';
import { NextResponse } from 'next/server';
import { SecurityLogger } from '@/lib/security/logger';
export async function GET(request: NextRequest) {
const securityLogger = new SecurityLogger();
export async function GET() {
try {
const logs = SecurityLogger.getRecentLogs(100);
const stats = SecurityLogger.getStats();
const logs = securityLogger.getRecentLogs(100);
const stats = securityLogger.getStats();
return NextResponse.json({
success: true,