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
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,20 @@ 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
+
"customComponentNames":Array<string>,
33
+
}]
34
+
...
35
+
```
36
+
37
+
### customComponentNames
38
+
39
+
Defaults to `[]`, if you want to enable this rule for all custom components you can pass `customComponentNames` as `['*']`, or else you can pass specific components name to the array.
40
+
27
41
## When Not To Use It
28
42
29
43
If you are certain the content passed to dangerouslySetInnerHTML is sanitized HTML you can disable this rule.
0 commit comments