@@ -40,19 +40,23 @@ ruleTester.run('checked-requires-onchange-or-readonly', rule, {
4040 "React.createElement('input', { checked: foo, onChange: noop, readOnly: true })" ,
4141 {
4242 code : '<input type="checkbox" checked />' ,
43- options : [ { ignoreMissingProperties : false } ] ,
43+ options : [ { ignoreMissingProperties : true } ] ,
4444 } ,
4545 {
4646 code : '<input type="checkbox" checked={true} />' ,
47- options : [ { ignoreMissingProperties : false } ] ,
47+ options : [ { ignoreMissingProperties : true } ] ,
4848 } ,
4949 {
5050 code : '<input type="checkbox" onChange={noop} checked defaultChecked />' ,
51- options : [ { ignoreExclusiveCheckedAttribute : false } ] ,
51+ options : [ { ignoreExclusiveCheckedAttribute : true } ] ,
5252 } ,
5353 {
5454 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 } ] ,
5660 } ,
5761 '<span/>' ,
5862 "React.createElement('span')" ,
@@ -99,13 +103,21 @@ ruleTester.run('checked-requires-onchange-or-readonly', rule, {
99103 } ,
100104 {
101105 code : '<input type="checkbox" checked defaultChecked />' ,
102- options : [ { ignoreMissingProperties : false } ] ,
106+ options : [ { ignoreMissingProperties : true } ] ,
103107 errors : [ { messageId : 'exclusiveCheckedAttribute' } ] ,
104108 } ,
105109 {
106110 code : '<input type="checkbox" checked defaultChecked />' ,
107- options : [ { ignoreExclusiveCheckedAttribute : false } ] ,
111+ options : [ { ignoreExclusiveCheckedAttribute : true } ] ,
108112 errors : [ { messageId : 'missingProperty' } ] ,
109113 } ,
114+ {
115+ code : '<input type="checkbox" checked defaultChecked />' ,
116+ options : [ { ignoreMissingProperties : false , ignoreExclusiveCheckedAttribute : false } ] ,
117+ errors : [
118+ { messageId : 'exclusiveCheckedAttribute' } ,
119+ { messageId : 'missingProperty' } ,
120+ ] ,
121+ } ,
110122 ] ) ,
111123} ) ;
0 commit comments