Skip to content

Commit 2a40d34

Browse files
committed
docs: update rules overview page
1 parent dbeb37c commit 2a40d34

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed

apps/website/content/docs/rules/meta.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"jsx-no-comment-textnodes",
66
"jsx-no-duplicate-props",
77
"jsx-no-undef",
8+
"jsx-shorthand-boolean",
9+
"jsx-shorthand-fragment",
810
"jsx-uses-react",
911
"jsx-uses-vars",
1012
"no-access-state-in-setstate",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ The `jsx-*` rules check for issues exclusive to JSX syntax, which are absent fro
3434
| [`jsx-no-comment-textnodes`](./jsx-no-comment-textnodes) | 1️⃣ | | Prevents comments from being inserted as text nodes | |
3535
| [`jsx-no-duplicate-props`](./jsx-no-duplicate-props) | 1️⃣ | | Disallow duplicate props in JSX elements | |
3636
| [`jsx-no-undef`](./jsx-no-undef) | 0️⃣ | | Disallow undefined variables in JSX elements | |
37+
| [`jsx-shorthand-boolean`](./jsx-shorthand-boolean) | 0️⃣ | `🔧` `⚙️` | Enforces the use of shorthand syntax for boolean attributes | |
38+
| [`jsx-shorthand-fragment`](./jsx-shorthand-fragment) | 0️⃣ | `🔧` `⚙️` | Enforces the use of shorthand syntax for fragments | |
3739
| [`jsx-uses-react`](./jsx-uses-react) | 1️⃣ | | Marks React variables as used when JSX is used | |
3840
| [`jsx-uses-vars`](./jsx-uses-vars) | 1️⃣ | | Marks variables used in JSX elements as used | |
3941
| [`no-access-state-in-setstate`](./no-access-state-in-setstate) | 2️⃣ | | Disallow accessing `this.state` inside `setState` calls | |

packages/plugins/eslint-plugin-react-x/src/plugin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { name, version } from "../package.json";
22
import jsxNoCommentTextnodes from "./rules/jsx-no-comment-textnodes";
33
import jsxNoDuplicateProps from "./rules/jsx-no-duplicate-props";
44
import jsxNoUndef from "./rules/jsx-no-undef";
5+
import jsxShorthandBoolean from "./rules/jsx-shorthand-boolean";
6+
import jsxShorthandFragment from "./rules/jsx-shorthand-fragment";
57
import jsxUsesReact from "./rules/jsx-uses-react";
68
import jsxUsesVars from "./rules/jsx-uses-vars";
79
import noAccessStateInSetstate from "./rules/no-access-state-in-setstate";
@@ -65,6 +67,8 @@ export const plugin = {
6567
"jsx-no-comment-textnodes": jsxNoCommentTextnodes,
6668
"jsx-no-duplicate-props": jsxNoDuplicateProps,
6769
"jsx-no-undef": jsxNoUndef,
70+
"jsx-shorthand-boolean": jsxShorthandBoolean,
71+
"jsx-shorthand-fragment": jsxShorthandFragment,
6872
"jsx-uses-react": jsxUsesReact,
6973
"jsx-uses-vars": jsxUsesVars,
7074
"no-access-state-in-setstate": noAccessStateInSetstate,

packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-boolean.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ react-x/jsx-shorthand-boolean
2020

2121
## Description
2222

23-
Enforces shorthand syntax for boolean attributes.
23+
Enforces the use of shorthand syntax for boolean attributes.
2424

2525
## Examples
2626

packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-fragment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ react-x/jsx-shorthand-fragment
2020

2121
## Description
2222

23-
Enforces shorthand syntax for fragments.
23+
Enforces the use of shorthand syntax for fragments.
2424

2525
## Examples
2626

0 commit comments

Comments
 (0)