From 49895aa37c07ecaece2b88508223b2445ed32b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Aaberg?= Date: Tue, 19 Dec 2017 08:50:43 +0100 Subject: [PATCH] jsx-no-target-blank Update documentation with new options links and forms --- docs/rules/jsx-no-target-blank.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/rules/jsx-no-target-blank.md b/docs/rules/jsx-no-target-blank.md index 3dc65900ed..abd93e6ef5 100644 --- a/docs/rules/jsx-no-target-blank.md +++ b/docs/rules/jsx-no-target-blank.md @@ -26,26 +26,26 @@ var Hello = ### Options -There is only one option: - -* `preventInForms` - Prevent usage of unsafe `target='_blank'` inside forms +```js +"react/jsx-no-target-blank": [, { + "links": , + "forms": +}] +``` -To use, you can specify like the following: +* `links` - Prevent usage of unsafe `target='_blank'` inside links, defaults to `true` +* `forms` - Prevent usage of unsafe `target='_blank'` inside forms, defaults to `false` -```json -"react/jsx-no-target-blank": [{"preventInForms": true}] -``` -In this configuration, the following are considered errors: +When option `forms` is set to `true`, the following is considered an error: ```jsx var Hello =
``` - -The following are **not** considered errors: +When option `links` is set to `true`, the following is considered an error: ```jsx -var Hello =
+var Hello = ``` ## When Not To Use It