diff --git a/docs/rules/jsx-no-target-blank.md b/docs/rules/jsx-no-target-blank.md index 438dc2f08a..dd0cdb4c9b 100644 --- a/docs/rules/jsx-no-target-blank.md +++ b/docs/rules/jsx-no-target-blank.md @@ -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": [, { enforceDynamicLinks: }] +... +"react/jsx-no-target-blank": [, { "enforceDynamicLinks": }] +... ``` * 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: @@ -47,6 +43,8 @@ var Hello = ### 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