File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff 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
3127When {"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+
5048When {"enforceDynamicLinks": "never"} is set, the following patterns are ** not** considered errors:
5149
5250``` jsx
You can’t perform that action at this time.
0 commit comments