Skip to content

Commit 7b9093e

Browse files
ihabadhamclaude
andcommitted
Fix ESLint failures surfaced on the base PR's first lint run
Sub-PR workflows skip lint_test.yml (it triggers only on PRs targeting master), so these slipped through into the integration branch: - SimpleCommentScreen.jsx: pre-existing line-form disable for max-classes-per-file broke when #729 inserted `'use client'` ahead of it (the rule reports at file position 1:1; line-form disable on the import below no longer covered). Switch to a block-form disable at file top. - ServerComponentsPage.jsx, LiveActivity.jsx, CommentsFeed.jsx: block-form disable for react/prop-types. React 19 removed runtime propTypes validation; the new components rely on ES default destructuring rather than dead PropTypes declarations. - LiveActivityRefresher.jsx: line-form disable for react/no-unstable-nested-components on the ErrorBoundary's fallbackRender prop. The render-prop API is canonical for react-error-boundary when the fallback needs a closure; it cannot be hoisted without losing access to parent state (refreshKey, setRefreshKey, refetchComponent via buildRetry). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4c2a3e9 commit 7b9093e

5 files changed

Lines changed: 10 additions & 1 deletion

File tree

client/app/bundles/comments/components/SimpleCommentScreen/ror_components/SimpleCommentScreen.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
/* eslint-disable max-classes-per-file */
12
'use client';
23

3-
// eslint-disable-next-line max-classes-per-file
44
import React from 'react';
55
import request from 'axios';
66
import Immutable from 'immutable';

client/app/bundles/server-components/components/CommentsFeed.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable react/prop-types -- React 19 no longer validates propTypes at runtime; using ES default destructuring instead */
2+
13
import React from 'react';
24
import { Marked } from 'marked';
35
import { gfmHeadingId } from 'marked-gfm-heading-id';

client/app/bundles/server-components/components/LiveActivityRefresher.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ const LiveActivityRefresher = () => {
7070
<span className="text-xs text-slate-500 ml-2">Refresh count: {refreshKey}</span>
7171
</div>
7272
<ErrorBoundary
73+
// react-error-boundary's fallbackRender is a render-prop API by design;
74+
// the closure captures buildRetry which depends on parent state.
75+
// eslint-disable-next-line react/no-unstable-nested-components
7376
fallbackRender={({ error, resetErrorBoundary }) => (
7477
<div className="bg-rose-50 border border-rose-200 rounded-lg p-4">
7578
<p className="text-rose-700 font-semibold mb-1">Server component fetch failed</p>

client/app/bundles/server-components/ror_components/LiveActivity.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable react/prop-types -- React 19 no longer validates propTypes at runtime; using ES default destructuring instead */
2+
13
import React from 'react';
24
import os from 'os';
35

client/app/bundles/server-components/ror_components/ServerComponentsPage.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// It can use Node.js APIs and server-only dependencies directly.
33
// None of these imports are shipped to the client bundle.
44

5+
/* eslint-disable react/prop-types -- React 19 no longer validates propTypes at runtime; using ES default destructuring instead */
6+
57
import React, { Suspense } from 'react';
68
import ServerInfo from '../components/ServerInfo';
79
import CommentsFeed from '../components/CommentsFeed';

0 commit comments

Comments
 (0)