Skip to content

Commit

Permalink
[Docs] jsx-no-target-blank: adjust options description
Browse files Browse the repository at this point in the history
  • Loading branch information
gebsh authored and ljharb committed Nov 6, 2021
1 parent 7b3d728 commit e672316
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel

### Changed
* [Tests] test on the new babel eslint parser ([#3113] @ljharb)
* [Docs] [`jsx-no-target-blank`]: adjust options description ([#3214] @gebsh)

[#3214]: https://github.com/yannickcr/eslint-plugin-react/pull/3214
[#3122]: https://github.com/yannickcr/eslint-plugin-react/pull/3122
[#3113]: https://github.com/yannickcr/eslint-plugin-react/pull/3113
[#3112]: https://github.com/yannickcr/eslint-plugin-react/pull/3112
Expand Down
10 changes: 5 additions & 5 deletions docs/rules/jsx-no-target-blank.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ This rule aims to prevent user generated link hrefs and form actions from creati
"react/jsx-no-target-blank": [<enabled>, {
"allowReferrer": <allow-referrer>,
"enforceDynamicLinks": <enforce>,
"warnOnSpreadAttributes": <warn>,
"links": <boolean>,
"forms": <boolean>,
}]
...
```

* `allowReferrer`: optional boolean. If `true` does not require `noreferrer` (i. e. `noopener` alone is enough, this leaves IE vulnerable). Defaults to `false`.
* `enabled`: for enabling the rule.
* `enforceDynamicLinks`: optional string, 'always' or 'never'
* `allowReferrer`: optional boolean. If `true` does not require `noreferrer` (i. e. `noopener` alone is enough, this leaves IE vulnerable). Defaults to `false`.
* `enforceDynamicLinks`: optional string, `'always'` or `'never'`.
* `warnOnSpreadAttributes`: optional boolean. Defaults to `false`.
* `enforceDynamicLinks` - enforce: optional string, 'always' or 'never'
* `links` - Prevent usage of unsafe `target='_blank'` inside links, defaults to `true`
* `forms` - Prevent usage of unsafe `target='_blank'` inside forms, defaults to `false`
* `links`: prevent usage of unsafe `target='_blank'` inside links, defaults to `true`.
* `forms`: prevent usage of unsafe `target='_blank'` inside forms, defaults to `false`.

### `enforceDynamicLinks`

Expand Down

0 comments on commit e672316

Please sign in to comment.