@@ -40,19 +40,23 @@ ruleTester.run('checked-requires-onchange-or-readonly', rule, {
40
40
"React.createElement('input', { checked: foo, onChange: noop, readOnly: true })" ,
41
41
{
42
42
code : '<input type="checkbox" checked />' ,
43
- options : [ { ignoreMissingProperties : false } ] ,
43
+ options : [ { ignoreMissingProperties : true } ] ,
44
44
} ,
45
45
{
46
46
code : '<input type="checkbox" checked={true} />' ,
47
- options : [ { ignoreMissingProperties : false } ] ,
47
+ options : [ { ignoreMissingProperties : true } ] ,
48
48
} ,
49
49
{
50
50
code : '<input type="checkbox" onChange={noop} checked defaultChecked />' ,
51
- options : [ { ignoreExclusiveCheckedAttribute : false } ] ,
51
+ options : [ { ignoreExclusiveCheckedAttribute : true } ] ,
52
52
} ,
53
53
{
54
54
code : '<input type="checkbox" onChange={noop} checked={true} defaultChecked />' ,
55
- options : [ { ignoreExclusiveCheckedAttribute : false } ] ,
55
+ options : [ { ignoreExclusiveCheckedAttribute : true } ] ,
56
+ } ,
57
+ {
58
+ code : '<input type="checkbox" onChange={noop} checked defaultChecked />' ,
59
+ options : [ { ignoreMissingProperties : true , ignoreExclusiveCheckedAttribute : true } ] ,
56
60
} ,
57
61
'<span/>' ,
58
62
"React.createElement('span')" ,
@@ -99,13 +103,21 @@ ruleTester.run('checked-requires-onchange-or-readonly', rule, {
99
103
} ,
100
104
{
101
105
code : '<input type="checkbox" checked defaultChecked />' ,
102
- options : [ { ignoreMissingProperties : false } ] ,
106
+ options : [ { ignoreMissingProperties : true } ] ,
103
107
errors : [ { messageId : 'exclusiveCheckedAttribute' } ] ,
104
108
} ,
105
109
{
106
110
code : '<input type="checkbox" checked defaultChecked />' ,
107
- options : [ { ignoreExclusiveCheckedAttribute : false } ] ,
111
+ options : [ { ignoreExclusiveCheckedAttribute : true } ] ,
108
112
errors : [ { messageId : 'missingProperty' } ] ,
109
113
} ,
114
+ {
115
+ code : '<input type="checkbox" checked defaultChecked />' ,
116
+ options : [ { ignoreMissingProperties : false , ignoreExclusiveCheckedAttribute : false } ] ,
117
+ errors : [
118
+ { messageId : 'exclusiveCheckedAttribute' } ,
119
+ { messageId : 'missingProperty' } ,
120
+ ] ,
121
+ } ,
110
122
] ) ,
111
123
} ) ;
0 commit comments