We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8e1185 commit 8ac873dCopy full SHA for 8ac873d
lib/rules/no-danger.js
@@ -63,7 +63,7 @@ module.exports = {
63
items: {
64
type: 'string',
65
},
66
- minItems: 1,
+ minItems: 0,
67
type: 'array',
68
uniqueItems: true,
69
@@ -79,8 +79,7 @@ module.exports = {
79
JSXAttribute(node) {
80
const functionName = node.parent.name.name;
81
82
- const enableCheckingCustomComponent = customComponentNames.length > 0
83
- && customComponentNames.some((name) => minimatch(functionName, name));
+ const enableCheckingCustomComponent = customComponentNames.some((name) => minimatch(functionName, name));
84
85
if ((enableCheckingCustomComponent || jsxUtil.isDOMComponent(node.parent)) && isDangerous(node.name.name)) {
86
report(context, messages.dangerousProp, 'dangerousProp', {
0 commit comments