Skip to content

Commit ac78b51

Browse files
committed
quotes for json key, reordered information
1 parent 658379a commit ac78b51

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

docs/rules/jsx-no-target-blank.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,17 @@ This rule aims to prevent user generated links from creating security vulnerabil
1212
`rel='noreferrer noopener'` for external links, and optionally any dynamically generated links.
1313

1414
## Rule Options
15-
16-
There are two main options for the rule:
17-
18-
* `{"enforceDynamicLinks": "always"}` enforces the rule if the href is a dynamic link (default)
19-
* `{"enforceDynamicLinks": "never"}` does not enforce the rule if the href is a dynamic link
20-
2115
```json
22-
"react/jsx-no-target-blank": [<enabled>, { enforceDynamicLinks: <enforce> }]
16+
...
17+
"react/jsx-no-target-blank": [<enabled>, { "enforceDynamicLinks": <enforce> }]
18+
...
2319
```
2420

2521
* enabled: for enabling the rule. 0=off, 1=warn, 2=error. Defaults to 0.
26-
* enforce: optional string, defaults to "always"
27-
22+
* enforce: optional string, 'always' or 'never'
2823

2924
### always (default)
25+
`{"enforceDynamicLinks": "always"}` enforces the rule if the href is a dynamic link (default)
3026

3127
When {"enforceDynamicLinks": "always"} is set, the following patterns are considered errors:
3228

@@ -47,6 +43,8 @@ var Hello = <a></a>
4743

4844
### never
4945

46+
`{"enforceDynamicLinks": "never"}` does not enforce the rule if the href is a dynamic link
47+
5048
When {"enforceDynamicLinks": "never"} is set, the following patterns are **not** considered errors:
5149

5250
```jsx

0 commit comments

Comments
 (0)