Skip to content

Commit ca3ca4c

Browse files
committed
Add missing rule options sections to docs
1 parent 97a8497 commit ca3ca4c

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ function MyComponent() {
4646
}
4747
```
4848

49+
## Rule Options
50+
51+
This rule has a single integer option with the following values:
52+
53+
- `1` (Default): Always use shorthand syntax for boolean attributes.
54+
- `-1`: Never use shorthand syntax for boolean attributes.
55+
4956
## Implementation
5057

5158
- [Rule Source](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-boolean.ts)

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ function MyComponent() {
5454
}
5555
```
5656

57+
## Rule Options
58+
59+
This rule has a single integer option with the following values:
60+
61+
- `1` (Default): Always use shorthand syntax for fragments.
62+
- `-1`: Never use shorthand syntax for fragments.
63+
5764
## Implementation
5865

5966
- [Rule Source](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-fragment.ts)

packages/plugins/eslint-plugin-react-x/src/rules/no-forbidden-props.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Disallow certain props on components. This rule helps enforce consistent prop na
2424

2525
By default, this rule forbids snake\_case props (props containing underscores) to encourage camelCase naming conventions.
2626

27-
## Options
27+
## Rule Options
2828

2929
The rule accepts an object with the following properties:
3030

packages/plugins/eslint-plugin-react-x/src/rules/no-useless-fragment.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ const cat = <>meow</>
7777
<Fragment key={item.id}>{item.value}</Fragment>
7878
```
7979

80+
## Rule Options
81+
82+
This rule has a single options object with the following property:
83+
84+
- `allowExpressions` (default: `true`): Allow fragments that contain a single expression child.
85+
8086
## Note
8187

8288
[By default, this rule always allows single expressions in a fragment](https://github.com/Rel1cx/eslint-react/pull/188). This is useful in

0 commit comments

Comments
 (0)