> deskcomm-crm@0.1.0 lint /Users/rafaelmelgaco/DeskcommCRM-canais
> eslint .
/Users/rafaelmelgaco/DeskcommCRM-canais/app/admin/(protected)/lgpd/_client.tsx
4:10 warning 'Button' is defined but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars
/Users/rafaelmelgaco/DeskcommCRM-canais/app/admin/(protected)/tenants/new/_form.tsx
143:21 warning Compilation Skipped: Use of incompatible library
This API returns functions which cannot be memoized without leading to stale UI. To prevent this, by default React Compiler will skip memoizing this component/hook. However, you may see issues if values from this API are passed to other components/hooks that are memoized.
/Users/rafaelmelgaco/DeskcommCRM-canais/app/admin/(protected)/tenants/new/_form.tsx:143:21
141 | });
142 |
> 143 | const planValue = watch("plan");
| ^^^^^ React Hook Form's `useForm()` API returns a `watch()` function which cannot be memoized safely.
144 |
145 | return (
146 |
react-hooks/incompatible-library
/Users/rafaelmelgaco/DeskcommCRM-canais/app/app/ai/agents/_components/AgentsList.tsx
25:9 warning The 'agents' logical expression could make the dependencies of useMemo Hook (at line 36) change on every render. To fix this, wrap the initialization of 'agents' in its own useMemo() Hook react-hooks/exhaustive-deps
/Users/rafaelmelgaco/DeskcommCRM-canais/app/app/ai/agents/_components/RenameAgentDialog.tsx
32: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/rafaelmelgaco/DeskcommCRM-canais/app/app/ai/agents/_components/RenameAgentDialog.tsx:32:15
30 |
31 | useEffect(() => {
> 32 | if (open) setName(agent.name);
| ^^^^^^^ Avoid calling setState() directly within an effect
33 | }, [open, agent.name]);
34 |
35 | const onSubmit = (e: React.FormEvent) => { react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/app/app/ai/followups/[id]/_components/TriggerConfigControl.tsx
100: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/rafaelmelgaco/DeskcommCRM-canais/app/app/ai/followups/[id]/_components/TriggerConfigControl.tsx:100:5
98 | if (open) return;
99 | const next = parseTriggerConfig(triggerConfig);
> 100 | setSaved(next);
| ^^^^^^^^ Avoid calling setState() directly within an effect
101 | setForm(next);
102 | }, [triggerConfig, open]);
103 | react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/app/app/templates/_components/TemplateFormDialog.tsx
70: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/rafaelmelgaco/DeskcommCRM-canais/app/app/templates/_components/TemplateFormDialog.tsx:70:5
68 | React.useEffect(() => {
69 | if (!open) return;
> 70 | setTitle(template?.title ?? "");
| ^^^^^^^^ Avoid calling setState() directly within an effect
71 | setBody(template?.body ?? "");
72 | setShortcut(template?.shortcut ?? "");
73 | setShared(template ? template.owner_user_id === null : false); react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/app/app/webhooks/_components/CreateSourceDialog.tsx
51: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/rafaelmelgaco/DeskcommCRM-canais/app/app/webhooks/_components/CreateSourceDialog.tsx:51:7
49 | React.useEffect(() => {
50 | if (!open) {
> 51 | setName("");
| ^^^^^^^ Avoid calling setState() directly within an effect
52 | setPipelineId("");
53 | setStageId("");
54 | setRedirectTo(""); react-hooks/set-state-in-effect
59: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/rafaelmelgaco/DeskcommCRM-canais/app/app/webhooks/_components/CreateSourceDialog.tsx:59:5
57 |
58 | React.useEffect(() => {
> 59 | setStageId("");
| ^^^^^^^^^^ Avoid calling setState() directly within an effect
60 | }, [pipelineId]);
61 |
62 | const onSubmit = async (e: React.FormEvent) => { react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/app/app/webhooks/_components/RuleEditor.tsx
114: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/rafaelmelgaco/DeskcommCRM-canais/app/app/webhooks/_components/RuleEditor.tsx:114:5
112 | React.useEffect(() => {
113 | if (!open) return;
> 114 | setName(rule?.name ?? "");
| ^^^^^^^ Avoid calling setState() directly within an effect
115 | setTriggerEvent((rule?.trigger_event as TriggerEvent) ?? "");
116 | setConditions(
117 | rule?.conditions.map((c) => ({ field: c.field, op: c.op, value: c.value })) ?? [], react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/app/design/lib/variant-context.tsx
114: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/rafaelmelgaco/DeskcommCRM-canais/app/design/lib/variant-context.tsx:114:9
112 | if (raw) {
113 | const parsed = JSON.parse(raw) as Partial
;
> 114 | setState((prev) => ({ ...prev, ...parsed }));
| ^^^^^^^^ Avoid calling setState() directly within an effect
115 | }
116 | } catch {}
117 | setHydrated(true); react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/app/global-error.tsx
20: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/rafaelmelgaco/DeskcommCRM-canais/app/global-error.tsx:20:5
18 | useEffect(() => {
19 | const id = Sentry.captureException(error);
> 20 | setEventId(id);
| ^^^^^^^^^^ Avoid calling setState() directly within an effect
21 | }, [error]);
22 |
23 | const displayId = eventId ?? error.digest ?? "—"; react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/components/ai/AgentEditor.tsx
107: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/rafaelmelgaco/DeskcommCRM-canais/components/ai/AgentEditor.tsx:107:5
105 | React.useEffect(() => {
106 | if (!agent) return;
> 107 | setFormState((prev) => prev ?? buildFormState(agent));
| ^^^^^^^^^^^^ Avoid calling setState() directly within an effect
108 | setBaselineState((prev) => prev ?? buildFormState(agent));
109 | }, [agent]);
110 | react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/components/ai/BudgetCard.tsx
130: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/rafaelmelgaco/DeskcommCRM-canais/components/ai/BudgetCard.tsx:130:7
128 | useEffect(() => {
129 | if (open) {
> 130 | setLimitBrl((status.monthly_limit_cents / 100).toFixed(2));
| ^^^^^^^^^^^ Avoid calling setState() directly within an effect
131 | setThresholdPct(status.alarm_threshold_pct);
132 | setAction(status.action_at_100pct);
133 | } react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/components/auth/TOTPInput.tsx
38: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/rafaelmelgaco/DeskcommCRM-canais/components/auth/TOTPInput.tsx:38:5
36 |
37 | useEffect(() => {
> 38 | setChars(Array.from({ length: LENGTH }, (_, i) => value[i] ?? ""));
| ^^^^^^^^ Avoid calling setState() directly within an effect
39 | }, [value]);
40 |
41 | useEffect(() => { react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/components/connections/AntiBanSheet.tsx
67: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/rafaelmelgaco/DeskcommCRM-canais/components/connections/AntiBanSheet.tsx:67:5
65 |
66 | useEffect(() => {
> 67 | setForm(item ? fromItem(item) : null);
| ^^^^^^^ Avoid calling setState() directly within an effect
68 | }, [item]);
69 |
70 | const label = useMemo(() => { react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/components/contacts/MergeDialog.tsx
52: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/rafaelmelgaco/DeskcommCRM-canais/components/contacts/MergeDialog.tsx:52:5
50 | if (!open || !queueItemId) return;
51 | let cancelled = false;
> 52 | setLoading(true);
| ^^^^^^^^^^ Avoid calling setState() directly within an effect
53 | const supabase = createClient();
54 | supabase
55 | .from("merge_queue") react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/components/feedback/SegmentError.tsx
23: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/rafaelmelgaco/DeskcommCRM-canais/components/feedback/SegmentError.tsx:23:5
21 | tags: segment ? { segment } : undefined,
22 | });
> 23 | setEventId(id);
| ^^^^^^^^^^ Avoid calling setState() directly within an effect
24 | }, [error, segment]);
25 |
26 | const displayId = eventId ?? error.digest ?? "—"; react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/components/inbox/CRMSidePanel.tsx
118: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/rafaelmelgaco/DeskcommCRM-canais/components/inbox/CRMSidePanel.tsx:118:7
116 | useEffect(() => {
117 | if (!contactId) {
> 118 | setLeads(null);
| ^^^^^^^^ Avoid calling setState() directly within an effect
119 | setOrders(null);
120 | setActivities(null);
121 | return; react-hooks/set-state-in-effect
/Users/rafaelmelgaco/DeskcommCRM-canais/components/inbox/composer/AttachmentPreviewDialog.tsx
20:19 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/rafaelmelgaco/DeskcommCRM-canais/components/inbox/composer/AttachmentPreviewDialog.tsx:20:19
18 | export function AttachmentPreviewDialog({ file, sending, onCancel, onSend }: Props) {
19 | const [caption, setCaption] = useState("");
> 20 | useEffect(() => setCaption(""), [file]);
| ^^^^^^^^^^ Avoid calling setState() directly within an effect
21 |
22 | const objectUrl = useMemo(() => (file && /^(image|video)\//.test(file.type) ? URL.createObjectURL(file) : null), [file]);
23 | useEffect(() => () => { react-hooks/set-state-in-effect
39:13 warning Using `
` could result in slower LCP and higher bandwidth. Consider using `` 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/rafaelmelgaco/DeskcommCRM-canais/components/inbox/media/ImageMedia.tsx
43:9 warning Using `
` could result in slower LCP and higher bandwidth. Consider using `` 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
48:11 warning Using `
` could result in slower LCP and higher bandwidth. Consider using `` 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/rafaelmelgaco/DeskcommCRM-canais/components/inbox/media/StickerMedia.tsx
16:7 warning Using `
` could result in slower LCP and higher bandwidth. Consider using `` 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/rafaelmelgaco/DeskcommCRM-canais/components/kanban/KanbanBoard.tsx
123:9 warning The 'data' conditional could make the dependencies of useMemo Hook (at line 141) change on every render. To fix this, wrap the initialization of 'data' in its own useMemo() Hook react-hooks/exhaustive-deps
123:9 warning The 'data' conditional could make the dependencies of useCallback Hook (at line 205) change on every render. To fix this, wrap the initialization of 'data' in its own useMemo() Hook react-hooks/exhaustive-deps
/Users/rafaelmelgaco/DeskcommCRM-canais/components/kanban/LeadTimeline.tsx
7:3 warning 'actorLabel' is defined but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars
/Users/rafaelmelgaco/DeskcommCRM-canais/components/kanban/NewLeadDialog.tsx
125:19 warning Compilation Skipped: Use of incompatible library
This API returns functions which cannot be memoized without leading to stale UI. To prevent this, by default React Compiler will skip memoizing this component/hook. However, you may see issues if values from this API are passed to other components/hooks that are memoized.
/Users/rafaelmelgaco/DeskcommCRM-canais/components/kanban/NewLeadDialog.tsx:125:19
123 | }
124 |
> 125 | const stageId = form.watch("stage_id");
| ^^^^ React Hook Form's `useForm()` API returns a `watch()` function which cannot be memoized safely.
126 |
127 | return (
128 |