You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/no-danger.md
+19
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,25 @@ var React = require('react');
24
24
var Hello =<div>Hello World</div>;
25
25
```
26
26
27
+
## Rule Options
28
+
29
+
```js
30
+
...
31
+
"react/no-danger": [<enabled>, {
32
+
"checkCustomComponents": boolean,
33
+
"customComponentNames":Array<string>,
34
+
}]
35
+
...
36
+
```
37
+
38
+
### checkCustomComponents
39
+
40
+
Defaults to `false`, when `enabled` allows the rule to check for custom components.
41
+
42
+
### customComponentNames
43
+
44
+
If you want to enable this rule for a specific set of custom components, you can pass `checkCustomComponents` as `true` and `customComponentNames` as the array of name of your custom components.
45
+
27
46
## When Not To Use It
28
47
29
48
If you are certain the content passed to dangerouslySetInnerHTML is sanitized HTML you can disable this rule.
0 commit comments