Skip to content

Commit

Permalink
quotes for json key, reordered information
Browse files Browse the repository at this point in the history
  • Loading branch information
atomcorp committed Sep 19, 2018
1 parent 658379a commit ac78b51
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions docs/rules/jsx-no-target-blank.md
Expand Up @@ -12,21 +12,17 @@ This rule aims to prevent user generated links from creating security vulnerabil
`rel='noreferrer noopener'` for external links, and optionally any dynamically generated links.

## Rule Options

There are two main options for the rule:

* `{"enforceDynamicLinks": "always"}` enforces the rule if the href is a dynamic link (default)
* `{"enforceDynamicLinks": "never"}` does not enforce the rule if the href is a dynamic link

```json
"react/jsx-no-target-blank": [<enabled>, { enforceDynamicLinks: <enforce> }]
...
"react/jsx-no-target-blank": [<enabled>, { "enforceDynamicLinks": <enforce> }]
...
```

* enabled: for enabling the rule. 0=off, 1=warn, 2=error. Defaults to 0.
* enforce: optional string, defaults to "always"

* enforce: optional string, 'always' or 'never'

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

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

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

### never

`{"enforceDynamicLinks": "never"}` does not enforce the rule if the href is a dynamic link

When {"enforceDynamicLinks": "never"} is set, the following patterns are **not** considered errors:

```jsx
Expand Down

0 comments on commit ac78b51

Please sign in to comment.