Skip to content

Commit 24ea6f3

Browse files
authored
Merge pull request #1149 from Adzz/patch-1
Prepend "react/" to rule options documentation code
2 parents 0ae6bb2 + 5f893e5 commit 24ea6f3

23 files changed

+28
-28
lines changed

docs/rules/display-name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var Hello = React.createClass({
2929

3030
```js
3131
...
32-
"display-name": [<enabled>, { "ignoreTranspilerName": <boolean> }]
32+
"react/display-name": [<enabled>, { "ignoreTranspilerName": <boolean> }]
3333
...
3434
```
3535

docs/rules/forbid-component-props.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The following patterns are not considered warnings:
3535

3636
```js
3737
...
38-
"forbid-component-props": [<enabled>, { "forbid": [<string>] }]
38+
"react/forbid-component-props": [<enabled>, { "forbid": [<string>] }]
3939
...
4040
```
4141

docs/rules/forbid-elements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This rule checks all JSX elements and `React.createElement` calls and verifies t
1010

1111
```js
1212
...
13-
"forbid-elements": [<enabled>, { "forbid": [<string|object>] }]
13+
"react/forbid-elements": [<enabled>, { "forbid": [<string|object>] }]
1414
...
1515
```
1616

docs/rules/jsx-closing-bracket-location.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ There are two ways to configure this rule.
3939
The first form is a string shortcut corresponding to the `location` values specified below. If omitted, it defaults to `"tag-aligned"`.
4040

4141
```js
42-
"jsx-closing-bracket-location": <enabled> // -> [<enabled>, "tag-aligned"]
43-
"jsx-closing-bracket-location": [<enabled>, "<location>"]
42+
"react/jsx-closing-bracket-location": <enabled> // -> [<enabled>, "tag-aligned"]
43+
"react/jsx-closing-bracket-location": [<enabled>, "<location>"]
4444
```
4545

4646
The second form allows you to distinguish between non-empty and self-closing tags. Both properties are optional, and both default to `"tag-aligned"`. You can also disable the rule for one particular type of tag by setting the value to `false`.
4747

4848
```js
49-
"jsx-closing-bracket-location": [<enabled>, {
49+
"react/jsx-closing-bracket-location": [<enabled>, {
5050
"nonEmpty": "<location>" || false,
5151
"selfClosing": "<location>" || false
5252
}]

docs/rules/jsx-curly-spacing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ There are two main options for the rule:
2020
Depending on your coding conventions, you can choose either option by specifying it in your configuration:
2121

2222
```json
23-
"jsx-curly-spacing": [2, "always"]
23+
"react/jsx-curly-spacing": [2, "always"]
2424
```
2525

2626
#### never
@@ -68,7 +68,7 @@ The following patterns are not warnings:
6868
By default, braces spanning multiple lines are allowed with either setting. If you want to disallow them you can specify an additional `allowMultiline` property with the value `false`:
6969

7070
```json
71-
"jsx-curly-spacing": [2, "never", {"allowMultiline": false}]
71+
"react/jsx-curly-spacing": [2, "never", {"allowMultiline": false}]
7272
```
7373

7474
When `"never"` is used and `allowMultiline` is `false`, the following patterns are considered warnings:
@@ -112,7 +112,7 @@ The following patterns are not warnings:
112112
You can specify an additional `spacing` property that is an object with the following possible values:
113113

114114
```json
115-
"jsx-curly-spacing": [2, "always", {"spacing": {
115+
"react/jsx-curly-spacing": [2, "always", {"spacing": {
116116
"objectLiterals": "never"
117117
}}]
118118
```

docs/rules/jsx-equals-spacing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ There are two options for the rule:
1818
Depending on your coding conventions, you can choose either option by specifying it in your configuration:
1919

2020
```json
21-
"jsx-equals-spacing": [2, "always"]
21+
"react/jsx-equals-spacing": [2, "always"]
2222
```
2323

2424
#### never

docs/rules/jsx-handler-names.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The following patterns are not considered warnings:
2828

2929
```js
3030
...
31-
"jsx-handler-names": [<enabled>, {
31+
"react/jsx-handler-names": [<enabled>, {
3232
"eventHandlerPrefix": <eventHandlerPrefix>,
3333
"eventHandlerPropPrefix": <eventHandlerPropPrefix>
3434
}]

docs/rules/jsx-indent-props.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ It takes an option as the second parameter which can be `"tab"` for tab-based in
3333

3434
```js
3535
...
36-
"jsx-indent-props": [<enabled>, 'tab'|<number>]
36+
"react/jsx-indent-props": [<enabled>, 'tab'|<number>]
3737
...
3838
```
3939

docs/rules/jsx-max-props-per-line.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The following patterns are not considered warnings:
3535

3636
```js
3737
...
38-
"jsx-max-props-per-line": [<enabled>, { "maximum": <number>, "when": <string> }]
38+
"react/jsx-max-props-per-line": [<enabled>, { "maximum": <number>, "when": <string> }]
3939
...
4040
```
4141

docs/rules/jsx-no-bind.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The following patterns are not considered warnings:
2121
## Rule Options
2222

2323
```js
24-
"jsx-no-bind": [<enabled>, {
24+
"react/jsx-no-bind": [<enabled>, {
2525
"ignoreRefs": <boolean> || false,
2626
"allowArrowFunctions": <boolean> || false,
2727
"allowBind": <boolean> || false

0 commit comments

Comments
 (0)