@@ -112,7 +112,7 @@ const tests = {
112
112
});
113
113
const Hello = React.createClass({
114
114
getInitialState: function() {
115
- return { condition: true, condition2: true };
115
+ return { condition: true, condition2: true };
116
116
},
117
117
render: function() {
118
118
return (
@@ -135,7 +135,7 @@ const tests = {
135
135
});
136
136
const Hello = React.createClass({
137
137
getInitialState: function() {
138
- return { condition: true };
138
+ return { condition: true };
139
139
},
140
140
render: function() {
141
141
return (
@@ -175,7 +175,7 @@ const tests = {
175
175
code : `
176
176
const Hello = React.createClass({
177
177
getInitialState: function() {
178
- return { condition: true };
178
+ return { condition: true };
179
179
},
180
180
render: function() {
181
181
const myStyle = this.state.condition ? styles.text : styles.text2;
@@ -276,6 +276,16 @@ const tests = {
276
276
errors : [ {
277
277
message : 'Unused style detected: styles.bar' ,
278
278
} ] ,
279
+ } , {
280
+ code : `
281
+ const styles = StyleSheet.create({
282
+ text: {}
283
+ })
284
+ const Hello = () => (<><Text style={styles.b}>Hello</Text></>);
285
+ ` ,
286
+ errors : [ {
287
+ message : 'Unused style detected: styles.text' ,
288
+ } ] ,
279
289
} ] ,
280
290
} ;
281
291
0 commit comments