Skip to content

Commit d29de5f

Browse files
ihabadhamclaude
andcommitted
Disable react/prop-types project-wide; drop dead PropTypes from TogglePanel
React 19 removed runtime propTypes validation. The rule still ships in plugin:react/recommended (jsx-eslint/eslint-plugin-react#3753 tracks removing it) but no longer reflects this codebase's reality. - .eslintrc: set react/prop-types: 0 with rationale pointing at the upstream issue. - ServerComponentsPage / LiveActivity / CommentsFeed: drop the per-file `/* eslint-disable react/prop-types */` workarounds from 7b9093e; the rule is now off everywhere. - TogglePanel: drop the prop-types import and the `TogglePanel.propTypes` declaration we introduced; React 19 doesn't validate them. Existing components elsewhere with their own PropTypes are unaffected — the rule only ever required declarations, never validated; disabling just stops the requirement. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7b9093e commit d29de5f

5 files changed

Lines changed: 5 additions & 12 deletions

File tree

.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ rules:
3737
# currently deprecated https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-onchange.md
3838
jsx-a11y/no-onchange: 0
3939

40+
# React 19 removed runtime propTypes validation; the rule is still in
41+
# plugin:react/recommended (jsx-eslint/eslint-plugin-react#3753 tracks
42+
# removing it) but no longer relevant in this codebase.
43+
react/prop-types: 0
44+
4045
settings:
4146
import/core-modules:
4247
- react-redux

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

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

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client';
22

33
import React, { useState } from 'react';
4-
import PropTypes from 'prop-types';
54

65
const TogglePanel = ({ title, children }) => {
76
const [isOpen, setIsOpen] = useState(false);
@@ -32,9 +31,4 @@ const TogglePanel = ({ title, children }) => {
3231
);
3332
};
3433

35-
TogglePanel.propTypes = {
36-
title: PropTypes.string.isRequired,
37-
children: PropTypes.node.isRequired,
38-
};
39-
4034
export default TogglePanel;

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

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

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
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-
75
import React, { Suspense } from 'react';
86
import ServerInfo from '../components/ServerInfo';
97
import CommentsFeed from '../components/CommentsFeed';

0 commit comments

Comments
 (0)