代码封版点仍是 a0328a6;本提交只含验收证据与文档,用于把台账 §0 的「未达可判验收通过(唯一阻断 AUTH-D1)」改判为「封版通过 (含例外清单)」。 补齐 sealed 树上从未跑过的 5 项门禁并如实记录非全绿: - 全站 check:axe EXIT=0(34 路由 × 双引擎 × 双主题,violation=0) - 产物安全头 EXIT=0(每头单次,WARN 仅 HSTS 边缘注入) - 生产目标 E2E 91 passed / 1 failed(唯一红 = firefox 并发墙钟, 隔离与 4-project 复跑均绿;dev.db 指纹前后一致,未写库) - 视觉只读 94 passed / 31 failed(20 缺参照 + 11 已过时参照, 逐条归因;未写任何基线) - check:motion EXIT=1 / 23 处(与周期 2 同数,未新增) 更正 4 处文档假事实:DEC-N21b(/admin 实有服务端 gating,入口是 src/proxy.ts 而非 middleware.ts)、视觉基线「85 张未提交」(实测 107 张全在库)、「无需重跑 db:seed」(seed 改过 modelCode 而 permissions 精确匹配)、lint 105→104。
348 lines
28 KiB
Plaintext
348 lines
28 KiB
Plaintext
|
|
> ruixin-website-react@1.0.0-phase1 lint
|
|
> eslint
|
|
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/docs/acceptance/2026-09-21-gates/probe/probe-browser-name.spec.ts
|
|
8:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/prisma/seed.ts
|
|
182:5 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
187:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
190:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
203:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
206:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
321:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
356:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
358:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
361:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
616:5 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
620:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
640:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
642:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
648:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
650:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
668:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
670:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
672:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
674:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
722:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
724:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
726:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
728:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
730:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
732:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
734:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
737:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
768:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
771:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
807:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
809:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
852:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
854:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
890:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
892:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
913:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
915:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
938:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
940:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
949:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
951:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
999:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
1001:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
1062:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
1065:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
1067:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
1074:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
1075:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
1076:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
1077:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
1078:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/sentry.server.config.ts
|
|
40:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/(marketing)/home-content-v15.tsx
|
|
120:36 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
156:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
272:60 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
509:78 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
510:61 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
512:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
515:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
552:32 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
555:38 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
555:59 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
562:74 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
562:90 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
636:69 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
714:77 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
789:85 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
828:120 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
930:73 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
954:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
955:26 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
956:26 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
957:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/(marketing)/methodology/methodology-content.tsx
|
|
20:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/(marketing)/news/[slug]/NewsDetailClient.tsx
|
|
79:17 warning Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
|
|
113:29 warning Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/(marketing)/news/news-content-v3.tsx
|
|
37:13 warning Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/(marketing)/news/news-detail-content-v3.tsx
|
|
29:13 warning Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
|
|
105:17 warning Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/admin/content/[modelCode]/[itemId]/page.tsx
|
|
652:15 warning Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/admin/content/[modelCode]/page.tsx
|
|
106:15 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/admin/content/[modelCode]/page.tsx:106:15
|
|
104 | return;
|
|
105 | }
|
|
> 106 | if (user) fetchItems();
|
|
| ^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
107 | }, [user, authLoading, router, fetchItems]);
|
|
108 |
|
|
109 | const openDeleteDialog = (id: string) => { react-hooks/set-state-in-effect
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/admin/media/page.tsx
|
|
59:15 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/admin/media/page.tsx:59:15
|
|
57 | return;
|
|
58 | }
|
|
> 59 | if (user) fetchMedia();
|
|
| ^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
60 | }, [user, authLoading, router]);
|
|
61 |
|
|
62 | const handleUpload = async (e: React.ChangeEvent<HTMLInputElement>) => { react-hooks/set-state-in-effect
|
|
159:17 warning Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/admin/notifications/page.tsx
|
|
112:7 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/admin/notifications/page.tsx:112:7
|
|
110 | }
|
|
111 | if (user) {
|
|
> 112 | fetchNotifications();
|
|
| ^^^^^^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
113 | fetchUnreadCount();
|
|
114 | }
|
|
115 | }, [user, authLoading, router, fetchNotifications, fetchUnreadCount]); react-hooks/set-state-in-effect
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/admin/roles/page.tsx
|
|
77:15 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/admin/roles/page.tsx:77:15
|
|
75 | return;
|
|
76 | }
|
|
> 77 | if (user) fetchRoles();
|
|
| ^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
78 | }, [user, authLoading, router, fetchRoles]);
|
|
79 |
|
|
80 | const selectedRoleInfo = roles.find((r) => r.code === selectedRole); react-hooks/set-state-in-effect
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/admin/users/page.tsx
|
|
138:7 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/admin/users/page.tsx:138:7
|
|
136 | }
|
|
137 | if (user) {
|
|
> 138 | fetchUsers();
|
|
| ^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
139 | fetchRoles();
|
|
140 | }
|
|
141 | }, [user, authLoading, router, fetchUsers, fetchRoles]); react-hooks/set-state-in-effect
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/app/global-error.tsx
|
|
57:13 warning Do not use an `<a>` element to navigate to `/`. Use `<Link />` from `next/link` instead. See: https://nextjs.org/docs/messages/no-html-link-for-pages @next/next/no-html-link-for-pages
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/admin/auth-context.tsx
|
|
45:9 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/admin/auth-context.tsx:45:9
|
|
43 | if (savedToken && savedUser) {
|
|
44 | try {
|
|
> 45 | setToken(savedToken);
|
|
| ^^^^^^^^ Avoid calling setState() directly within an effect
|
|
46 | setUser(JSON.parse(savedUser));
|
|
47 | } catch {
|
|
48 | localStorage.removeItem('novalon_admin_token'); react-hooks/set-state-in-effect
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/analytics/GlobalErrorTracker.tsx
|
|
74:7 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/analytics/GoogleAnalytics.test.tsx
|
|
34:12 warning Synchronous scripts should not be used. See: https://nextjs.org/docs/messages/no-sync-scripts @next/next/no-sync-scripts
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/detail/detail-product-value.tsx
|
|
79:7 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/detail/detail-product-value.tsx:79:7
|
|
77 | if (!isInView) return;
|
|
78 | if (isNaN(numericValue)) {
|
|
> 79 | setDisplayValue(value);
|
|
| ^^^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
80 | return;
|
|
81 | }
|
|
82 | let frame = 0; react-hooks/set-state-in-effect
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/detail/detail-trust-section.tsx
|
|
30:7 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/detail/detail-trust-section.tsx:30:7
|
|
28 | const numericValue = parseFloat(value.replace(/[^0-9.]/g, ''));
|
|
29 | if (isNaN(numericValue)) {
|
|
> 30 | setDisplayValue(value);
|
|
| ^^^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
31 | return;
|
|
32 | }
|
|
33 | react-hooks/set-state-in-effect
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/detail/product-card.test.tsx
|
|
42:5 warning Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/layout/footer.test.tsx
|
|
23:5 warning Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/layout/header.test.tsx
|
|
30:5 warning Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/ui/loading-state.tsx
|
|
44:9 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/ui/loading-state.tsx:44:9
|
|
42 |
|
|
43 | if (!isLoading) {
|
|
> 44 | setShowSkeleton(false);
|
|
| ^^^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
45 | return;
|
|
46 | }
|
|
47 | react-hooks/set-state-in-effect
|
|
158:7 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/ui/loading-state.tsx:158:7
|
|
156 | useEffect(() => {
|
|
157 | if (!isLoading) {
|
|
> 158 | setShouldShow(false);
|
|
| ^^^^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
159 | return;
|
|
160 | }
|
|
161 | react-hooks/set-state-in-effect
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/ui/page-transition.tsx
|
|
41:5 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/components/ui/page-transition.tsx:41:5
|
|
39 |
|
|
40 | useEffect(() => {
|
|
> 41 | setMounted(true);
|
|
| ^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
42 | }, []);
|
|
43 |
|
|
44 | // SSR 和首次 hydration 阶段直接渲染子内容,避免 framer-motion DOM 差异导致 hydration mismatch react-hooks/set-state-in-effect
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/hooks/use-count-up.ts
|
|
30:7 warning Error: Calling setState synchronously within an effect can trigger cascading renders
|
|
|
|
Effects are intended to synchronize state between React and external systems such as manually updating the DOM, state management libraries, or other platform APIs. In general, the body of an effect should do one or both of the following:
|
|
* Update external systems with the latest state from React.
|
|
* Subscribe for updates from some external system, calling setState in a callback function when external state changes.
|
|
|
|
Calling setState synchronously within an effect body causes cascading renders that can hurt performance, and is not recommended. (https://react.dev/learn/you-might-not-need-an-effect).
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/hooks/use-count-up.ts:30:7
|
|
28 | useEffect(() => {
|
|
29 | if (!enabled) {
|
|
> 30 | setValue(end);
|
|
| ^^^^^^^^ Avoid calling setState() directly within an effect
|
|
31 | return;
|
|
32 | }
|
|
33 | react-hooks/set-state-in-effect
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/hooks/use-reduced-motion.ts
|
|
34:61 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
35:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
49:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
|
|
/Users/zhangxiang/Codes/Novalon/novalon-website/src/instrumentation-client.ts
|
|
88:3 warning Unexpected console statement. Only these console methods are allowed: warn, error no-console
|
|
|
|
✖ 104 problems (0 errors, 104 warnings)
|
|
|