Skip to content

Commit 1617211

Browse files
committed
Merge branch 'main' into react-x/avoid-shorthand-fragment
2 parents 06d4366 + 1312a3e commit 1617211

File tree

8 files changed

+41
-25
lines changed

8 files changed

+41
-25
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ A series of future-proof ESLint rules for React and friends.
99

1010
## Features
1111

12-
- **Modern**: First-class support for TypeScript, React 19, and more.
13-
- **Flexible**: Increased flexibility with more granular severity control.
1412
- **Performant**: Built with performance in mind, optimized for large codebases.
15-
- **Comprehensive**: Handles complex scenarios and identifies problems that other tools might miss.
13+
- **Future-proof**: Forward-looking architecture that anticipates future React features.
14+
- **Precision Control**: Fully customizable rule severity levels, allowing you to enforce or relax rules as needed.
15+
- **Context-aware Linting**: Rules that understand the context of your code and project configuration, providing more accurate linting results.
1616

1717
## Public Packages
1818

apps/website/app/(home)/page.tsx

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
import { ESLintReact } from "#/components/ESLintReact";
22
import { Card, Cards } from "fumadocs-ui/components/card";
3-
import { Gauge, SearchCheck, Sliders, Zap } from "lucide-react";
3+
import { Eye, Shield, Sliders, Zap } from "lucide-react";
44
import { Link } from "next-view-transitions";
55

66
const features = [
7-
["Modern", "First-class support for TypeScript, React 19, and more.", Zap],
8-
["Flexible", "Increased flexibility with more granular severity control.", Sliders],
9-
["Performant", "Built with performance in mind, optimized for large codebases.", Gauge],
10-
["Comprehensive", "Identifies problems that other tools might miss.", SearchCheck],
7+
[
8+
"Performant",
9+
"Built with performance in mind, optimized for large codebases.",
10+
Zap,
11+
],
12+
[
13+
"Future-proof",
14+
"Forward-looking architecture that anticipates future React features.",
15+
Shield,
16+
],
17+
[
18+
"Precision Control",
19+
"Fully customizable rule severity levels, allowing you to enforce or relax rules as needed.",
20+
Sliders,
21+
],
22+
[
23+
"Context-aware Linting",
24+
"Rules that understand the context of your code and project configuration, providing more accurate linting results.",
25+
Eye,
26+
],
1127
] as const;
1228

1329
export default function HomePage() {

apps/website/content/docs/rules/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Linter rules can have false positives, false negatives, and some rules are depen
3737
| [`no-children-only`](./no-children-only) | 1️⃣ | | Disallow `Children.only` | |
3838
| [`no-children-prop`](./no-children-prop) | 0️⃣ | | Disallow passing `children` as a prop | |
3939
| [`no-children-to-array`](./no-children-to-array) | 1️⃣ | | Disallow `Children.toArray` | |
40-
| [`no-class-component`](./no-class-component) | 0️⃣ | | Disallow class component | |
40+
| [`no-class-component`](./no-class-component) | 0️⃣ | | Disallow class components except for error boundaries | |
4141
| [`no-clone-element`](./no-clone-element) | 1️⃣ | | Disallow `cloneElement` | |
4242
| [`no-comment-textnodes`](./no-comment-textnodes) | 1️⃣ | | Prevents comments from being inserted as text nodes | |
4343
| [`no-complex-conditional-rendering`](./no-complex-conditional-rendering) | 0️⃣ | `🧪` | Disallow complex conditional rendering in JSX expressions | |

packages/plugins/eslint-plugin-react-x/src/rules/no-class-component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ react-x/no-class-component
2323

2424
## Description
2525

26-
Disallow class components.
26+
Disallow class components except for error boundaries.
2727

2828
Component is the base class for the React components defined as JavaScript classes. Class components are still supported by React, but we don’t recommend using them in new code.
2929

packages/plugins/eslint-plugin-react-x/src/rules/no-class-component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ export default createRule<[], MessageID>({
1515
meta: {
1616
type: "problem",
1717
docs: {
18-
description: "Disallow class components.",
18+
description: "Disallow class components except for error boundaries.",
1919
[Symbol.for("rule_features")]: RULE_FEATURES,
2020
},
2121
messages: {
22-
noClassComponent: "Do not use class components. Use function components instead.",
22+
noClassComponent: "Avoid using class components. Use function components instead.",
2323
},
2424
schema: [],
2525
},

packages/plugins/eslint-plugin/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ A series of future-proof ESLint rules for React and friends.
99

1010
## Features
1111

12-
- **Modern**: First-class support for TypeScript, React 19, and more.
13-
- **Flexible**: Increased flexibility with more granular severity control.
1412
- **Performant**: Built with performance in mind, optimized for large codebases.
15-
- **Comprehensive**: Handles complex scenarios and identifies problems that other tools might miss.
13+
- **Future-proof**: Forward-looking architecture that anticipates future React features.
14+
- **Precision Control**: Fully customizable rule severity levels, allowing you to enforce or relax rules as needed.
15+
- **Context-aware Linting**: Rules that understand the context of your code and project configuration, providing more accurate linting results.
1616

1717
## Public Packages
1818

packages/shared/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@eslint-react/eff": "workspace:*",
4646
"@eslint-react/kit": "workspace:*",
4747
"@typescript-eslint/utils": "^8.29.1",
48-
"@zod/mini": "^4.0.0-beta.0",
48+
"@zod/mini": "^4.0.0-beta.20250411T005215",
4949
"picomatch": "^4.0.2",
5050
"ts-pattern": "^5.7.0"
5151
},

pnpm-lock.yaml

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)