219 lines
50 KiB
Plaintext
219 lines
50 KiB
Plaintext
|
|
> client@0.1.0 lint
|
|
> eslint
|
|
|
|
|
|
D:\Projects\CK-QR\client\src\app\admin\page.tsx
|
|
30:5 error 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).
|
|
|
|
D:\Projects\CK-QR\client\src\app\admin\page.tsx:30:5
|
|
28 |
|
|
29 | useEffect(() => {
|
|
> 30 | fetchUsers();
|
|
| ^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
31 | }, []);
|
|
32 |
|
|
33 | const handleTierChange = async (userId: string, newRole: string) => { react-hooks/set-state-in-effect
|
|
|
|
D:\Projects\CK-QR\client\src\app\admin\settings\page.tsx
|
|
16:5 error Error: Cannot access variable before it is declared
|
|
|
|
`fetchSettings` is accessed before it is declared, which prevents the earlier access from updating when this value changes over time.
|
|
|
|
D:\Projects\CK-QR\client\src\app\admin\settings\page.tsx:16:5
|
|
14 |
|
|
15 | useEffect(() => {
|
|
> 16 | fetchSettings();
|
|
| ^^^^^^^^^^^^^ `fetchSettings` accessed before it is declared
|
|
17 | }, []);
|
|
18 |
|
|
19 | const fetchSettings = async () => {
|
|
|
|
D:\Projects\CK-QR\client\src\app\admin\settings\page.tsx:19:3
|
|
17 | }, []);
|
|
18 |
|
|
> 19 | const fetchSettings = async () => {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
> 20 | try {
|
|
| ^^^^^^^^^
|
|
> 21 | const res = await api.get('/admin/settings');
|
|
| ^^^^^^^^^
|
|
> 22 | setSettings(res.data);
|
|
| ^^^^^^^^^
|
|
> 23 | } catch (err) {
|
|
| ^^^^^^^^^
|
|
> 24 | console.error(err);
|
|
| ^^^^^^^^^
|
|
> 25 | }
|
|
| ^^^^^^^^^
|
|
> 26 | };
|
|
| ^^^^^ `fetchSettings` is declared here
|
|
27 |
|
|
28 | const handleInputChange = (key: string, newValue: string) => {
|
|
29 | setSettings(prev => prev.map(s => s.key === key ? { ...s, value: newValue } : s)); react-hooks/immutability
|
|
57:7 error 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).
|
|
|
|
D:\Projects\CK-QR\client\src\app\admin\settings\page.tsx:57:7
|
|
55 | useEffect(() => {
|
|
56 | if (categories.length > 0 && !activeTab) {
|
|
> 57 | setActiveTab(categories[0]);
|
|
| ^^^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
58 | }
|
|
59 | }, [categories, activeTab]);
|
|
60 | react-hooks/set-state-in-effect
|
|
|
|
D:\Projects\CK-QR\client\src\app\company\about\page.tsx
|
|
27:65 error `'` can be escaped with `'`, `‘`, `'`, `’` react/no-unescaped-entities
|
|
|
|
D:\Projects\CK-QR\client\src\app\company\careers\page.tsx
|
|
27:90 error `'` can be escaped with `'`, `‘`, `'`, `’` react/no-unescaped-entities
|
|
|
|
D:\Projects\CK-QR\client\src\app\company\contact\page.tsx
|
|
23:79 error `'` can be escaped with `'`, `‘`, `'`, `’` react/no-unescaped-entities
|
|
|
|
D:\Projects\CK-QR\client\src\app\dashboard\create\page.tsx
|
|
191:11 error Parsing error: JSX element 'button' has no corresponding closing tag
|
|
|
|
D:\Projects\CK-QR\client\src\app\dashboard\edit\[id]\page.tsx
|
|
3:15 warning 'Options' is defined but never used @typescript-eslint/no-unused-vars
|
|
94:54 error 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).
|
|
|
|
D:\Projects\CK-QR\client\src\app\dashboard\edit\[id]\page.tsx:94:54
|
|
92 | let payload = '';
|
|
93 |
|
|
> 94 | if (dataType === 'Wi-Fi' && qrType !== 'static') setQrType('static');
|
|
| ^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
95 | if (dataType === 'App Store' && qrType !== 'dynamic') setQrType('dynamic');
|
|
96 |
|
|
97 | if (qrType === 'static') { react-hooks/set-state-in-effect
|
|
|
|
D:\Projects\CK-QR\client\src\app\dashboard\layout.tsx
|
|
9:36 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
|
|
D:\Projects\CK-QR\client\src\app\dashboard\page.tsx
|
|
15:16 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
27:9 warning 'router' is assigned a value but never used @typescript-eslint/no-unused-vars
|
|
75:5 error 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).
|
|
|
|
D:\Projects\CK-QR\client\src\app\dashboard\page.tsx:75:5
|
|
73 |
|
|
74 | useEffect(() => {
|
|
> 75 | fetchFolders();
|
|
| ^^^^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
76 | }, []);
|
|
77 |
|
|
78 | useEffect(() => { react-hooks/set-state-in-effect
|
|
79:5 error 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).
|
|
|
|
D:\Projects\CK-QR\client\src\app\dashboard\page.tsx:79:5
|
|
77 |
|
|
78 | useEffect(() => {
|
|
> 79 | fetchQRs();
|
|
| ^^^^^^^^ Avoid calling setState() directly within an effect
|
|
80 | }, [selectedFolder]);
|
|
81 |
|
|
82 | const handleCreateFolder = async (e: React.FormEvent) => { react-hooks/set-state-in-effect
|
|
80:6 warning React Hook useEffect has a missing dependency: 'fetchQRs'. Either include it or remove the dependency array react-hooks/exhaustive-deps
|
|
91:14 warning 'err' is defined but never used @typescript-eslint/no-unused-vars
|
|
103:14 warning 'err' is defined but never used @typescript-eslint/no-unused-vars
|
|
114:14 warning 'err' is defined but never used @typescript-eslint/no-unused-vars
|
|
124:14 warning 'err' is defined but never used @typescript-eslint/no-unused-vars
|
|
164:14 warning 'err' is defined but never used @typescript-eslint/no-unused-vars
|
|
174:14 warning 'err' is defined but never used @typescript-eslint/no-unused-vars
|
|
|
|
D:\Projects\CK-QR\client\src\app\dashboard\profile\page.tsx
|
|
64:41 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
|
|
D:\Projects\CK-QR\client\src\app\features\design-studio\page.tsx
|
|
27:106 error `'` can be escaped with `'`, `‘`, `'`, `’` react/no-unescaped-entities
|
|
|
|
D:\Projects\CK-QR\client\src\app\legal\cookies\page.tsx
|
|
29:104 error `'` can be escaped with `'`, `‘`, `'`, `’` react/no-unescaped-entities
|
|
|
|
D:\Projects\CK-QR\client\src\app\legal\terms\page.tsx
|
|
25:39 error `'` can be escaped with `'`, `‘`, `'`, `’` react/no-unescaped-entities
|
|
|
|
D:\Projects\CK-QR\client\src\app\login\page.tsx
|
|
26:19 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
|
|
D:\Projects\CK-QR\client\src\app\page.tsx
|
|
263:26 error `'` can be escaped with `'`, `‘`, `'`, `’` react/no-unescaped-entities
|
|
|
|
D:\Projects\CK-QR\client\src\app\register\page.tsx
|
|
22:19 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
|
|
D:\Projects\CK-QR\client\src\app\support\how-to-use\page.tsx
|
|
39:61 error `"` can be escaped with `"`, `“`, `"`, `”` react/no-unescaped-entities
|
|
39:75 error `"` can be escaped with `"`, `“`, `"`, `”` react/no-unescaped-entities
|
|
49:66 error `'` can be escaped with `'`, `‘`, `'`, `’` react/no-unescaped-entities
|
|
|
|
D:\Projects\CK-QR\client\src\app\verify-email\page.tsx
|
|
3:10 warning 'useRouter' is defined but never used @typescript-eslint/no-unused-vars
|
|
15:7 error 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).
|
|
|
|
D:\Projects\CK-QR\client\src\app\verify-email\page.tsx:15:7
|
|
13 | useEffect(() => {
|
|
14 | if (!token) {
|
|
> 15 | setStatus('error');
|
|
| ^^^^^^^^^ Avoid calling setState() directly within an effect
|
|
16 | setMessage('No verification token provided.');
|
|
17 | return;
|
|
18 | } react-hooks/set-state-in-effect
|
|
|
|
D:\Projects\CK-QR\client\src\components\HomeNavbar.tsx
|
|
17:16 warning 'err' is defined but never used @typescript-eslint/no-unused-vars
|
|
|
|
D:\Projects\CK-QR\client\src\components\qr-editor\DesignPanel.tsx
|
|
3:10 warning 'Options' is defined but never used @typescript-eslint/no-unused-vars
|
|
29:21 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
48:70 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
55:88 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
62:82 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
207: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
|
|
210: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
|
|
213: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
|
|
216: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
|
|
219: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
|
|
|
|
D:\Projects\CK-QR\client\src\components\qr-editor\LivePreview.tsx
|
|
31:13 warning 'frameOptions' is assigned a value but never used @typescript-eslint/no-unused-vars
|
|
|
|
Γ£û 45 problems (27 errors, 18 warnings)
|
|
|